Hi Youssif,
I’ll present the suggested "req"uests along with the results .. I used the “USB browser” to issue the commands & receive the response. I also include the commands sent by my micro-controller (connected to the Notecard via I2C)
{"req":"card.location.mode"}
RESPONSE --- {"mode":"periodic"}
J *req = NoteNewRequest("card.location.mode");
if (req != NULL)
{
//
// how often tracks (_track.qo) are created -- update with time
JAddStringToObject(req, "mode", "periodic");
JAddIntToObject(req, "seconds", 120);
success = NoteRequest(req);
}
Here, the mode is correct -- the "seconds" field (in the response) is missing when issuing the command via browser
{“req”:“card.location.track”}
RESPONSE
{
“file”: “_track.qo”,
“start”: true,
“minutes”: 10,
“heartbeat”: true,
“sync”: true
}
J *req = NoteNewRequest(“card.location.track”);
if (req != NULL)
{
JAddBoolToObject(req, “start”, true);
JAddBoolToObject(req, “heartbeat”, true);
JAddBoolToObject(req, “sync”, true);
JAddIntToObject(req, “hours”, -10);
JAddStringToObject(req, “file”, “_track.qo”);
J *rsp = NoteRequestResponse(req);
Here the ‘heartbeat’ is 10 minutes – the event list indicated this correctly
(when GPS was disabled). The “minus” sign for ‘minutes’ was documented yet seemed odd
– but it did work (prior to July firmware installation) – so I didn’t mess with it.
"req":"card.motion.mode"
RESPONSE
{
"start": true,
"seconds": 10
}
J *req = NoteNewRequest("card.motion.mode");
if (req != NULL)
{
JAddBoolToObject(req, "start", true);
JAddIntToObject(req, "sensitivity", 2);
JAddIntToObject(req, "seconds", 10);
success = NoteRequest(req);
}
Here again, the response has a "missing" field (sensitivity)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> {"req":"hub.get"}
RESPONSE
{
"secure": true,
"mode": "continuous",
"host": "a.notefile.net",
"product": "com.xxxxxxxxxxxxxxxxxxxxxxx",
"device": "dev:xxxxxxxxxxxxxxxxxxx",
"inbound": 240,
"outbound": 1
}
Here, all the fields match my Notecard.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here's another tidbit .. keeping in mind I'm using an EXTERNAL GPS feed -- at times (again prior to firmware update) I've seen the GPS status show fields similar to the internal GPS.
Note the Lat/Lon in the GPGGA & GPRMC NMEA sentences (as provided by a GPS simulator) -- they don't match the Notecard values as returned by NoteGetLocation() [helper function] --- that was also working. It's as if the Lat/Lon fields are not being accepted by the note card -- even though I "giggled" the board to wake up the accelerometer.
Status Buf:GPS is off {gps-inactive}
Location Mode:periodic
$GPGGA,222533,4500.36,N,07323.038391106,W,2,08,1.1,200.000,M,-32.6,M,34,0000*45
$GPRMC,222534,A,4500.36,N,07323.036001246,W,6.083,90,170725,0,W*71
Lat:24.613057
Lon:-77.688662
Again, thanks for the help .. I have a duplicate system that has not been updated with the "July 7" firmware update -- and it is working properly.
regards, Rich ..