2018-12-17 07:43 AM
Hi all
Have a look @
https://www.st.com/resource/en/application_presentation/teseo-3-quick-testing-guide.pdf
it's an easy way to test the connection to the Teseo III server based Assisted GNSS without special equipment and/or tool.
2019-03-20 12:57 PM
Hello again,
So I'm "almost" there. :) I have code that processes the output of the 'curl' command and seems to generate proper commands from it. Unfortunately, I always get an error response when I try to send it to the GPS.
Here is an example line
$PSTMEPHEM,1,64,fd07dc50dc50282828b007002ca68e001506472a4c055d0507007500513200002769421d9f02ecf9fd369c961545b8c393922bafa03e6d110c00bdff4bf3c803*08
$PSTMEPHEMERROR*17
I have verified that I can get an okay response by dumping the existing ephemeris in the GPS and then writing it back.
I'm assuming that I have done something incorrect in generating the string. Do you have any suggestions on what I can use to debug this? I've used the code from the library provided and it didn't generate any errors.
Should this ephemeris data from the server look the same as what is already stored in the device by itself?
I'll keep debugging, thanks for any pointers you can offer.
Eric
2019-03-21 01:12 AM
Hi
humm... it's strange...
What are you decoding?
RealTime-data or Seed-Data?
Which PSTM command is raising the error?
Thansk
Ciao
Francesco
2019-03-21 06:58 AM
From my example line above, the $PSTMEPHEM is generating the error. Actually any of the lines I've generated (both PSTMEPHEM and the PSTALMANAC) return an error. I'm doing a RT-assistance request for GPS data.
Here is a response that I got... (my translation to PST command is below)
{"rtAssistance":{"body":[{"GPS:1NAC":"HwAD\/QBKKGABAAAALQAtAAA3hHYAlCAcAGAb0XNZDAAAYK4A\/73\/+e4kCUUzFU9CKDAH9ARc\/qMIHqENM\/9grgAZ\/6O5ls2U\/+Uns57lJugb3vFT\/\/+jiQVZAQP9AEooYAEBAABjAGMAAD+EdgCUIBwAYBvRc1nUAABgrgD\/rP\/6dWQJ5TUpWzaM9QgzCbCWiwkjoQ1Wr2CuAB8AX7bYDrz\/eybaCVkjurhjBnj\/\/6YcBX0CA\/0ASihgAQEAAGsAawAAP4R2AJQgHABgG9FzWQUAAGCuAAAIAAYgXPNANAQovHfA9GEA\/reGDwyhDHiEYK4AHwAf5BVx8gAjJzhmGh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v+3VfkAODl6\/8UbVQAnAAESTXwAkBnH\/WoAAAChDLn\/kq9CADd8n\/+Xm1X+nQABEyO5AJD39\/0YAAAAoQzf\/98lXgBeYDD\/wSGlAiUAABTK8wCQAzH9PQAAAKENuv+2+kj\/xHsH\/4XgqP8SAAIVO60AkPXb\/RQAAAChC9P\/4SNt\/8cZ8QAIpYn9Qf\/+Fmo6AJAA3\/1PAAAAoQyQAA3jWv+i8VX\/7fwy\/zYAABdDmQCQ\/bH9LAAAAKENWgA3R1oAGJJB\/9pZ0\/+9AAAYRKUAkBKB\/TIAAAChDXcAZB9kACOSBP+KkfD8+\/\/\/GR5\/AJAGU\/0iAAAAoQwfAGMBvAAF5xMAb6afAKUAAxo4jACQF6r9ZAAAAKEMyf+OhlcAEkZ4ACd4R\/+f\/\/4bnNkAkBpD\/UIAAAChDTQAZ6TV\/8QWBQBJNbwDJAAAHAbWAJAcKv1tAAAAoQwY\/5E+1wA7slQASVZ5AP7\/\/h0e4wCQ\/y79KwAAAKEMcwA7HDT\/hScw\/7aWh\/+z\/\/4eS64AkAuf\/T4AAAChDEAAOnwX\/\/\/TqP+l8lgANf\/\/HxaLAJAJpv1YAAAAoQ3IAA5U6P+W5xEAQ5Vp\/1EABQ=="}],"status":200}}
And here is my list of decoded commands
Send $PSTMEPHEM command...
$PSTMEPHEM,1,64,fd07ae60ae602d2d2d64150089a56e004509e8261e08f407e5ffa3ff15330000e5a0227ba3ffcb57ff347cf43029b1a294cf050d53f34d6f0c00bdff24efe803*55
$PSTMEPHEM,2,64,fd07ae60ae60636363f415001ca86e00e509ba23230933087bff5f0029350000590b497a8b971f5daf577cf4f58da5aebc10470a7808d20bd400acff6476e913*58
$PSTMEPHEM,3,64,fd07ae60ae606b6b6bb4e7002aa66e0040f3331e0c0f61f423001f00043400001a68a77a86b86d5484797bf4c0782b7cf2738437c5744d6b050008005c21f513*54
$PSTMEPHEM,5,64,fd07ae60ae6037373788ec0014a56e005ef30920140c0df5dfff56002f370000b44c1e7ae6f348564e327cf4c33ae61a052e7636c39a3570e8000000ed0aef03*50
truncated to keep the post length down.
2019-03-21 08:38 AM
Okay, this may actually complicate the issue more, but I noticed that the response I get back from the Curl request does not have the outer set of brackets "[]". If I add these into the message before I decode it, the JSON parsing crashes with a segment fault on my PC. One of the string compares locks it up.
I noticed this when I added the "seed_valid()" function into my code and it rejected the JSON message because it did not have the outer set of brackets.
2019-03-21 09:29 AM
Another question, is the STAGPS on by default?
Does the setting of its state via the $PSTMSTAGPSONOFF command survive a power cycle?
2019-03-21 11:48 AM
Also, what is the default value of $PSTMSTAGPSSETCONSTMASK? Do I have to set the mask to make the STAGPS work properly?
2019-03-21 01:36 PM
Would the endianess of my machine have any impact on decoding? I ran the mbedtls_base64_self_test() function and it did pass.
2019-03-22 01:29 AM
Ciao
" $PSTMSTAGPSONOFF" doesn't survive to a power cycle.
To be active by default is has to enabled in the firmware configuration:
CDB-ID: 200 bit-4 (0x10)
But in the default firmware configuration STAGPS is already enabled.
On $PSTMSTAGPSSETCONSTMASK it changes the constellation managed by ST-AGPS.
In the default-configuration it is GPS & Glonass.
Ciao
Francesco
2019-03-22 02:20 PM
Just FYI. I solved the issue. The code library that was shared under NDA seemed to have a bug in it when I ran it on my Ubuntu PC. The routine was extract_dword(). I changed this line
*dword += (local_buffer[0] << 24) + (local_buffer[1] << 16) + (local_buffer[2] << 8) + local_buffer[3];
to
*dword += ((local_buffer[0] << 24) & 0xFF000000) +
((local_buffer[1] << 16) & 0x00FF0000) +
((local_buffer[2] << 8) & 0x0000FF00) +
(local_buffer[3] & 0x000000FF);
Seems like the shift was putting in garbage bits that needed to be masked off. Not sure why, I believe the former code should work but did cause issues on my platform.
Thanks,
Eric
2019-03-25 01:02 AM
Ciao
It's interesting...
It seems there is some difference in the compilation results...
On Ubuntu... you have a GCC... and at the end also the compiler used on STM32 is a "GCC-like"...
Is your PC 32bits or 64 bits?
Ciao
Francesco