Particle.publishVitals(); returns err: -210 for battery charge state

Hi all,

My team and I have been working with the Particle Boron for a few years now, and after experiencing some bugs with PMIC behavior here and there we now manually set all the values in the BQ24195L registers ourselves, and this has proven to work well for us in our application. Since the release of Particle OS 3.0.0, we added a few lines to disable the System Power Features via “SystemPowerConfiguration::DISABLE” so that we can just manually write the registers as we normally do. However, since the addition of the lines of code to disable the System Power Features, we now are unable to see the battery charge data in the Particle Dashboard. When the vitals are sent to the cloud via Particle.publishVitals(); the battery charge reported is always “err”:"-210". Any ideas on why this might be happening?

Thanks in advance,
Sara

Hi @sara_mich1 , welcome to the Forum !

I recently found (thanks @chipmc) that resetting the Config prior to making changes corrected the “-210 error” for me.
You can try calling :
System.setPowerConfiguration(SystemPowerConfiguration());
in a Startup() Macro and then your DISABLE and PMIC calls to see if that helps.

You may want to look at this thread:

Thanks,

Chip