I've been tooling around with the commands trying to get a better idea of how this works. There are a few things I've figured out.
AT+CGPS=1 will turn on the GPS.
From there, AT+CGPSINFO will print the location data. If I do AT+CGPSINFO=<1-255>, the HAT will send the location data to the buffer once every x seconds depending on the number. If I don't read the buffer, more lines will continue to stack. If I send another command, the HAT will execute that command but will also dump all of the data in the buffer to a print command. This was pretty confusing until I figured it out.
The AT+CGPSNMEA command documentation (Page 375-376) shows the data I'm looking to get to and there's also an AT+CGPSINFOCFG command with the same NMEA bit legend (page 382-383). As I've been writing this I've been reading more and poking some more and I think I found an important clue.
Page 384 has the AT+CGPSMD command, but more importantly the documentation has a similar bit legend as the NMEA command. At the bottom there's a line of text that says "Example, support standalone, UP MS-based and UP MS-assisted, set Binary value 0000 0111, is 7."
I wasn't thinking in Binary because the numbers were either much larger than the octets I'm used to and the examples were reduced by one. Thinking in binary, I wrote out the sequence (in reverse, obviously)
1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144
The range for the NMEA command is 0 to 262143. This is one below the 262144 which likely means the binary sequence would be 0's with 18 1's at the end. The number of 0's would depend on whatever the bit length is. Probably 64 bits. One of their "example" lines is "AT+CGPSNMEA=200191" which doesn't really fit unless that sequence activates multiple bits at once.
Still poking, but if anyone has experience with this I would greatly appreciate the input.
AT+CGPS=1 will turn on the GPS.
From there, AT+CGPSINFO will print the location data. If I do AT+CGPSINFO=<1-255>, the HAT will send the location data to the buffer once every x seconds depending on the number. If I don't read the buffer, more lines will continue to stack. If I send another command, the HAT will execute that command but will also dump all of the data in the buffer to a print command. This was pretty confusing until I figured it out.
The AT+CGPSNMEA command documentation (Page 375-376) shows the data I'm looking to get to and there's also an AT+CGPSINFOCFG command with the same NMEA bit legend (page 382-383). As I've been writing this I've been reading more and poking some more and I think I found an important clue.
Page 384 has the AT+CGPSMD command, but more importantly the documentation has a similar bit legend as the NMEA command. At the bottom there's a line of text that says "Example, support standalone, UP MS-based and UP MS-assisted, set Binary value 0000 0111, is 7."
I wasn't thinking in Binary because the numbers were either much larger than the octets I'm used to and the examples were reduced by one. Thinking in binary, I wrote out the sequence (in reverse, obviously)
1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144
The range for the NMEA command is 0 to 262143. This is one below the 262144 which likely means the binary sequence would be 0's with 18 1's at the end. The number of 0's would depend on whatever the bit length is. Probably 64 bits. One of their "example" lines is "AT+CGPSNMEA=200191" which doesn't really fit unless that sequence activates multiple bits at once.
Still poking, but if anyone has experience with this I would greatly appreciate the input.
Statistics: Posted by MadDokK — Sat Feb 24, 2024 1:47 am