OK so I am sending the speed signal to the F9R using the SparkFun GNSS library.
I am stealing heavily from the canned example in the library.
I am also using https://github.com/cturvey/RandomNinjaC … ESFspeed.c for as and example for the UBX-ESF-MEAS (0x10 0x02) message.
#define max_pckt_size 16//defines maximum custom packet size
uint16_t maxWait = 2000; // Wait for up to 250ms (Serial may need a lot longer e.g. 1100)
uint8_t customPayload[max_pckt_size] = { 0 }; // This array holds the payload data bytes. MAX_PAYLOAD_SIZE defaults to 256. The Speed payload is only 12 bytes!
// The next line creates and initializes the packet information which wraps around the payload
ubxPacket customCfg = {0, 0, 0, 0, 0, customPayload, 0, 0, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED};
customCfg.cls = UBX_CLASS_ESF; // This is the message Class
customCfg.id = UBX_ESF_MEAS; // This is the message ID
customCfg.len = 12; // Setting the len 8 + numMeas·4 + [0,1]·4(sending speed only.)
.
.
.
if (myGNSS.sendCommand(&customCfg, maxWait) != SFE_UBLOX_STATUS_DATA_SENT) // This time we are only expecting an ACK
{
#ifdef F9_speed_debug
ConSerial.println(F("sendCommand (set) failed!"));
#endif
return false;
}
Not I am using serial at 115200 but I am never getting an acknowledge even with 2000 ms? (I wend overboard just to make sure.)
My message keeps getting rejected:
F9R Payload(in hex): 77,71,00,00,00,08,00,00,41,FE,FF,0B
So per the “F9-HPS-1.21_InterfaceDescription_UBX-21019746.pdf” (I am actually running firmware HPS 1.20).
00 00 71 77 is from the Arduino millis() which is the system clock in ms.
Per the above examples, all the flags are 0 and I am sending 1 sensor.
Bit 3 of the send byte (bit 11 overall is set for sending 1 sensor therefore a 0x08 in the second byte)
08 00
00 00 for the ID (like the example)
0B FF FE 41 for the sensor type 11 (aka 0x0B) and 1 mph is reverse aka -447 mm/s.
Any idea what I am missing?
Thanks
Bruce