CellLocate Service-to-Service access
The prerequisites to complete the procedure are:
you have access to the u-blox Thingstream portal and you have already created a domain. If not, we invite you to start with this step that takes few minutes and it's free.
you have registered a credit card in the portal or you have a credit line active, just in case you want to use a paid plan. But you can start even with the developer plan that is free of charge.
you have knowledge and tools about how to send an API request
The mains steps of this procedure are
Create a CellLocate S2S Thing, just one for all your fleet.
Select the preferred pricing plan or the developer plan
Get the credentials for REST API access
Setup your application platform to receive the measurements from the device, used for location estimation
Send the measurements using the API and get the location back
Create a CellLocate S2S Thing
The first step is to create a CellLocate S2S things that provides you all the parameters to issue the API:
username and password
The Thing let also you to:
modify the pricing plan
deactivate/ reactivate the access
monitor the usage of the service
and look at the the events
Sign-in into the Thingstream portal and select the Location Things item from the Location Services section. Click the button to create a new Location Thing and browse to the CellLocate section from where you can select the wizard to create CellLocate S2S Thing.
During the creation steps you are suggested to assign a price plan. If you skip this step the Thing will not be automatically activated and cannot be used. When you are ready to assign a plan, open the Thing panel and assign the preferred one.
The module can be configured using the same AT command reported in the Getting started guide
primary server is the url of your application server
secondary server is optional and can be a fallback url of your application server
optional_device_ID can be a custom alphanumeric string, used to identify the device (for example it can be the IMEI) when your application server receives the HTTP request explained in the next section. It's an alphanumeric string of maximum 22 characters:
capital and small
underscore ( _ ) and dash ( _ ) special characters
This ID is for your internal use and you do not need to forward it to CellLocate endpoint
Setup your application platform
The picture below displays the flow of data to obtain a position estimation:
The CEL module is triggered through the ULOC command (see Getting started guide) to generate a raw measurement containing all the information required for position estimation
Once the raw measurement is ready, the CEL module automatically sends the payload through a HTTP request to the server configured above (your application platform). The request is:
where the token parameter is the information configured through the UGSRV command described in the previous section and can represent a device identifier
The application on your server shall
get the request through an http server and extract the payload
send the dummy response to the module in the format specified in the next section to close the loop
generate the API as described in the specifications and get the estimated position back. The API payload contains the raw measurement just extracted at step 1.
Dummy response format
A dummy response is required to close the loop, and acknowledge the CEL module request so that it stop listening for the answer.
The dummy response to be sent by your application server to the device (CEL module) , shall contain:
the status line HTTP /1.1 200 OK
the response body with a dummy payload in the format of a UBX-MGA-INI-TIME_UTC frame that has the structure reported below. You can use the standard dummy payload reported here:
In this why the device stops the +ULOC procedure, used to request the position, and print out
NOTE: since it's a dummy response, it shall be ignored by the device application
UBX-MGA-INI-TIME_UTC frame structure
Send a measurement and get a position
As explained above, to trigger on the module the generation of the measurements used to get a position estimation you can use the +ULOC AT command exactly in the same way described in the Getting started guide.
Once you have received the measurement on your application server, to obtain a position you need to use the API
as described in the CellLocate API documentation where:
username and password
can be retrieved in the credential section of your just created CellLocate S2S thing
The API response is in JSON format as reported below