There are some issues on batteryService though, I cannot find /sys/devices/i2c-0/i2c-2/2-0064/power_supply/LTC2942 anywhere. Is this only for the Green board? If so, is there a working API available or should I configure the existing one?
Or do you even need to run anything for battery to charge on Red? Or is it enough to have a chargeable battery connected and board connected to PC for example? Thanks!
If all you want to charge the battery, then pull pin 5 of SW401 high. This will enable charging using battery charger.
Only Single Li-Po battery supported.
Once you connect a battery, you should be able to see the LTC2942 in the /sys/device. For now, I would recommend not using the BatteryService api itself.
Thanks for the answer! Sorry I was probably a little unclear in my question. I would like to run the board on battery (removed the jumper from CN804) and recharge battery when connected to a power source (pin 5 is on). From the docs I also understood that you can recharge using the API, but maybe it is not needed?
And from what power source can you charge it, can you use both CF3 USB and Console USB?
Oh only Li-Po batteries are supported. I have a Li-Ion in use. Maybe this is why I cannot find LTC2942 under /sys/device. According to the batteryService API both Li-Po and Li-Ion batteries are supported, but only Li-Po for the Red I suppose?
Yes, could only find the paths:
/sys/devices/i2c-0/i2c-2/2-006b/power_supply/bq24190-charger
/sys/devices/i2c-0/i2c-2/2-006b/power_supply/bq24190-battery
but there is no /sys/devices/i2c-0/i2c-2/2-0064 path available, or any other with LTC2942.
Do you need jumper on CN804 for it to charge though?
There is an issue with the kernel, but it should only affect the validity of the data in sysfs. The device should still be present. Can you confirm that the mangOH Red you have says revision 5.0 on the PCB?
Do you have any ideas on how to solve this. Tried now on another mangOH Red with WP8548 (same as the other) and cannot find /sys/devices/i2c-0/i2c-2/2-0064/power_supply/LTC2942
When installing batteryService app, and starting. I get error:
Jan 6 17:37:24 | supervisor[3788]/supervisor T=main | app.c CreateFileLink() 1478 | Could not stat file at '/sys/devices/i2c-0/i2c-2/2-0064/power_supply/LTC2942/charge_counter'. No such file or directory Jan 6 17:37:24 | supervisor[3788]/supervisor T=main | app.c CreateFileLink() 1581 | Failed to create link at '/sys/devices/i2c-0/i2c-2/2-0064/power_supply/LTC2942/charge_counter' in app 'batteryService'.
Again, is there perhaps something wrong with the kernel on Revision 14 firmware for this module? Thanks!
I would like to use the battery API, and I am getting the same errors as well. After inserting the battery and ls of the LTC2942 folder, I get the following. Is there no way to find out the charge level?
ls -l /sys/devices/i2c-0/i2c-2/2-0064/power_supply/LTC2942/
-rw-r--r-- 1 root root 4096 Jan 6 00:07 charge_avg
-r--r--r-- 1 root root 4096 Jan 6 00:07 constant_charge_current
lrwxrwxrwx 1 root root 0 Jan 6 00:07 device -> ../../../2-0064
drwxr-xr-x 2 root root 0 Jan 6 00:07 power
-r--r--r-- 1 root root 4096 Jan 6 00:07 scope
lrwxrwxrwx 1 root root 0 Jan 6 00:07 subsystem -> ../../../../../../class/power_supply
-r--r--r-- 1 root root 4096 Jan 6 00:07 temp_alert_min
-rw-r--r-- 1 root root 4096 Jan 6 00:05 uevent
-r--r--r-- 1 root root 4096 Jan 6 00:07 voltage_avg
Is this required for the WP85 as well? I can see the module is loaded by running lsmod (it shows 0_ltc294x 5520 0 - Live 0xbf168000 (O)), but Iām still not seeing the device (Failed to create link at '/sys/devices/i2c-0/i2c-2/2-0064/power_supply/LTC2942/charge_counter' in app 'batteryService'.). If this is required I would really appreciate some instructions on how to go about this.