cancel
Showing results for 
Search instead for 
Did you mean: 

www.st.com

Francesco Virlinzi
ST Employee

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.

41 REPLIES 41
EHuse
Associate II

I am trying to use this guide to test access to the server and am having trouble. We are using the Teseo-LIV3F device. I have been able to get a password from the device using the $PSTMSTAGPS8PASSGEN command. But trying to access the server using that password and device id returns a 401 Unauthorized.

Application note AN5160 sections 4.1.1.4 implies that a password needs to be assigned by a location.io administrator. Is this no longer true and there is no requirement to first contact location.io?

Francesco Virlinzi
ST Employee

Hi

The AN5160 is a generic application note which covers all the TeseoIII IC and modules.

In case of TeseoIII IC a dedicated account has to be provided for each customer.

In case of Teseo-LIV3F, the module has a dedicated account assigned on location.io system.

You can follow the presentation (link) to test your access to location.io.

Thanks

Regards

Francesco

EHuse
Associate II

Hello,

Okay so that is good to know. So this is what I am attempting to test from a PC running Ubuntu. I'm using Curl but without the proxy setting. Can you look at this and tell me if I'm doing something incorrectly?

curl --verbose --header "Content-Type: application/json" --header "Accept: application/json" --header "Authorization: RXN-SP cId=ZYDLLXxEH94dEeX2,mId=MYST,dId=00513730383638361400759E,pw=xrhjr7hbCP464UpZdA0Oxearolh8DX++JpbRXdwxcJk=" --data "[{\"ee\":{\"version\":8,\"constellations\":[\"gps\"],\"seedAge\":0}}]" http://stm.api.location.io:80/rxn-api/locationApi

*  Trying 72.51.26.210...

* TCP_NODELAY set

* Connected to stm.api.location.io (72.51.26.210) port 80 (#0)

> POST /rxn-api/locationApi HTTP/1.1

> Host: stm.api.location.io

> User-Agent: curl/7.58.0

> Content-Type: application/json

> Accept: application/json

> Authorization: RXN-SP cId=ZYDLLXxEH94dEeX2,mId=MYST,dId=00513730383638361400759E,pw=xrhjr7hbCP464UpZdA0Oxearolh8DX++JpbRXdwxcJk=

> Content-Length: 59

* upload completely sent off: 59 out of 59 bytes

< HTTP/1.1 401 Unauthorized

< Content-Language: 

< Content-Type: text/html

< Date: Tue, 12 Mar 2019 15:14:22 GMT

< Content-Length: 994

* Connection #0 to host stm.api.location.io left intact

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>Error report</title><style type="text/css"><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 401 - Unauthorized</h1><hr/><p><b>type</b> Status report</p><p><b>message</b>Unauthorized</p><p><b>description</b>This request requires HTTP authentication.</p><hr/></body></html>

Looking the field they seem correct to me.

Did you evaluate the <gpsTime> to create the password? It's the  current time expressed in the number of seconds since midnight 06-Jan-1980

Thanks

Regards

Francesco

EHuse
Associate II

That leads me to a question. Do I need to update the password every time I access the server? If so, how many seconds is a password valid for? Right now for my test I'm doing things by hand. Sending the command to the chip on our board, then copy/paste the result into my PC to run the command.

I tried the test again with keeping the time as close as possible and it still failed. I'm using the GPS seconds reported from this web site http://leapsecond.com/java/gpsclock.htm

I did experiment with the $PSTMSTAGPS8PASSGEN  and it returns the same password for wide ranges of seconds but does eventually change with a large enough number change. So I'm guessing that the same password is valid for some length of time.

EHuse
Associate II

Okay, so that website was giving me a bad number for seconds. 🙂 I found the right value and generated a password and it worked fine.

But I still have the question of how long a password is valid for? I'll probably reset it everytime we power up so not a big issue.

Thanks for your help.

EHuse
Associate II

Okay, so I have a response coming back from the server now. But I'm a little confused about what to do with the data coming back. I see some NMEA commands listed to program seeds. I see the command $PSTMSTAGPSSEEDBEGIN, $PSTMSTAGPSBLKTYPE can be used. I assume this is programmed with the "seed" value coming back in a JSON response?

Does this data require an initial general location? (i.e. using cell site or wifi address)

There is also a command $PSTMEPHEM, which can program ephemeris data? Is this command still used?

Hi

> Do I need to update the password every time I access the server?

Yes. You do.

> If so, how many seconds is a password valid for?

each password is valid several minutes (~10 minutes)

Regards

Francesco

Ciao

From location.io you can access two kind of data:

  • Real-Time ephemeris data
  • Extented ephemeris (to predict 2weeks ephemeris data)

Which data you download depends on the HTTP_REQ you did.

iolocation provides you a JSON file.

The JSON file has to be parsed to fill the '$PSTMSTAGPSSEEDBEGIN, $PSTMSTAGPSBLKTYPE' (for Extended Ephemeris) or $PSTMEPHEM (for Real Time data) command and inject the data into the Teseo-LIV3F.

BUT the JSON-File description is under NDA (you can read a subset in the AN5160 which is public)

To avoid NDA as ST we prepared a prebuilded library available in the X-CUBE-GNSS1 (the STM32 drivers but the Library is ARM-Cortex-M0 oriented to be portable) to provide a library which parses the JSON file and injects the data in Teseo-LIV3F