Gl Mifi Battery MCU

Hey there
i´m planning to use stock openwrt, but i want to notified when the battery is low, in the glinet firmware there is a app called gl-mifi-mcu, so i´m looking to get the voltage readings by SPI, or i2c, is there a way i can get voltage readings using my own program?

thanks!

Maybe you can just take the binary of gl-mifi-mcu and put in your own firmware.

It reads the battery info and store in a file (cannot remember) and you can just read the file.

Hi Alzhao,
Thanks!

i know there is a file called
cat /tmp/mcu_data
but i´m interested on which GPIO i can talk to the MCU, is there a voltage reading instead of percent?

i knew the battery has many cables and the mcu is on the battery itself, so you got a datasheet of the battery so i can have a look?

thanks!

some more infos for DIY Use would be usefull :slight_smile:

push
please give maybe the chip markings so i can google myself

i´m a little bit sad you cannot give informations about that, anything is build for DIY Use, but when you want use those diy features (i´m assuming the MCU is connected to 2 GPIO pins of the domino core) you cannot get any documentation about that.

or how about just make the gl-mifi-mcu package open source?

@luochongjun pls have a look at this.

Sorry, I just saw the messages, I need some time to sort out the documents, I expect to give them to you tomorrow.

thank you very much for looking into this.

dont want to bother, but are there
any updates?

I made a simple demo and didn’t have time to write down the instructions. I hope I can help you。mcu-demo.zip (9.5 KB)

This feature is using a soft uart which apparently is based in GitHub - adrianomarto/soft_uart: Software-based serial port module for Raspberry Pi.. Since the source are not available in the package, can you specify the GPIO_TX and GPIO_RX?

Thanks

soft-uart.zip (86.8 KB) Here is the source of the driver.