I am struggling to find this in the forum and docs.
I am trying to get rssi and bars values from card.wireless and store it in two variables. I see it is in “net”
{“status”:“{network-up}”,“count”:4,“net”:{“iccid”:“….”,“modem”:“BG95M3LAR02A03_01.006.01.006”,“band”:“GSM 900”,“rat”:“gsm”,“rssir”:-61,“rssi”:-62,“bars”:4,“mcc”:274,“mnc”:2,“lac”:102,“cid”:20441}}
my code is like such, I assume it does not peek into nested key value pair.
double signal_rssi = 0;
double signal_bars = 0;
rsp = notecard.requestAndResponse(notecard.newRequest(“card.wireless”));
if (rsp != NULL)
{
signal_rssi = JGetNumber(rsp, “rssi”);
usbSerial.print(signal_rssi);
signal_bars = JGetNumber(rsp, “bars”);
usbSerial.print(signal_bars);
notecard.deleteResponse(rsp);
}
Bonus question, is there another better way to get this data out on a note? Than fetching with card.wireless and loading into note.add