Online Compiler: rui_device_get_battery_level undefined

Hi there,

I´m working on a custom firmware for the RAK811-H. Using Bootloader V3.0.2 and the example application provided on github as basis, I was able to write a simple script implementing the rui_gpio-API, which works perfectly well.

The next step was to make use of “rui_device_get_battery_level(float *voltage)” as defined in rui.h. Sadly though the Online Compiler returned this:
_build/app_RAK811.o: In function app_loop': /home/rui/vdb/rui_root/user/[email protected]/build/stm/RUI/build/..//Source/stm/STML151/application/app_RAK811.c:97: undefined reference to rui_device_get_battery_level’
collect2: error: ld returned 1 exit status
stm/Makefile_stm32l151cb:254: recipe for target ‘_build/stm_xx.elf’ failed
make: *** [_build/stm_xx.elf] Error 1

Is there an issue with the RUI implementation for the RAK811-H or is this method deliberately not implemented as the RAK811 simply doesn´t support it?


Dear Fredrik,

You can refer RAK5205 code,Because RAK811 does not use the battery power.

Ok, Thank you!
Is there any documentation about which modules support which functions from rui.h?

The fact that it is described as a common header suggests that all functions are supported by all modules. Being told the opposite is a little confusing.

Dear FWilke,

Please refer this web:

Refer to RAK5205 just to express, he has an example to read the battery power, while RAK811 needs you to add by yourself.

Best regards!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.