nickdademo / cp2112_demo

Demo code for reading SMBus battery parameters using the Silicon Labs CP2112 board.
15 stars 10 forks source link

ERROR: Could not perform SMBus read. #1

Open otofoto opened 5 years ago

otofoto commented 5 years ago

Shows error if reading SBS 1.0 battery

Device successfully opened. Device successfully configured. Voltage = 5273 mV Current = 0 mA RSOC = 0 % Remaining Capacity = 0 mAh Average Time to Empty = 0 min(s) Manufacturer Name = SDI ERROR: Could not perform SMBus read.

nickdademo commented 5 years ago

What is your hardware setup like? Might be useful to check the bus with a logic analyzer.

otofoto commented 5 years ago

It seems it fails on reading charger status. I have generic cp2112 CJMCU board which have different pins. It works correctly with BE2Works demo and seems to work with this demo just not clear how the charger has to be communicated.

0r10nV commented 4 years ago

the charger is different SMBUS device so if you quaering battery only it's expected it would throw "charger SMBUS read error". It would be better to change this error message to something like "charger not connected".