Card.voltage mode returning USB when not connected to USB

Hi,

Documentation is a little confusing here card Requests - API Reference - Blues Developers.

In the response members section it states that “mode” can return USB if the card is connected to USB. My notecard is not connected to USB but it is installed on a Notecarrier F which is connected to a Solar panel.

Is it safe to say that the returning of USB for the mode is related to a voltage threshold and so when the battery is being charged by the solar panel we can also get USB for the mode field ?

Thanks,
Serge

Hi @ssozonoff,

You should only see "mode": "usb" paired with "usb":true in the response, and only if the Notecard is directly powered via the USB port on its host Notecarrier. If you’re seeing other behavior, please let us know and we can look into this more closely!

Rob

Hi @RobLauer,

So I am definitely seeing mode change between high and USB with the Notecarrier F when the LIPO is being charged via a solar panel. I am running Notecard firmware 6.2.2.16520.

And it is not accompanied by “usb”:true

The unit is in the field so most certainly not connected to a USB source.

Kind Thanks,
Serge

Hi @ssozonoff,

Just to confirm - you’re using the green Notecarrier AF? And not the black Notecarrier A or F? Just want to be sure. Thanks!

Sorry that was a typo. Notecarrier F is what I am using.

Hi @ssozonoff,

Can you please issue this request and let me know what the response is?

{
  "req": "card.voltage",
  "mode": "?"
}

Hey Rob,

So at the moment I cannot, the device is up in the mountains accessible only by helicopter.
I will perform that command as soon as I get a chance however.

Thanks,
Serge

Ah ok, good to know! What I expect to see returned from your device is something like:

{"mode":"usb"}

Why? My suspicion is you may have run a command like:

{
  "req": "card.voltage",
  "mode": "usb"
}

And why would that be an issue? Because mode is an arbitrary string that must conform to a pattern of label:voltage;label:voltage; like this:

"usb:4.6;high:4.0;normal:3.5;low:3.2;dead:0"

And yes, it can also be one of our shortcuts/aliases of “lipo”, “l91”, “alkaline”, “tad”, “lic”, or “default” which map to their own custom strings that are documented in the card.voltage API docs.

Therefore, if you’re always seeing “usb” returned, it means that you either set this (which is bad because the Notecard interprets this as returning “usb” for any voltage level):

{
  "req": "card.voltage",
  "mode": "usb"
}

Or maybe you customized the string to have the “usb” value be low enough that your LiPo battery’s voltage is high enough to trigger it, like so:

{
  "req": "card.voltage",
  "mode": "usb:4.0;low:3.2;dead:0"
}