User's Manual

_________________________________________________________
www.btwtag.com
46
Ver. 2.0
Tokens
The btwTAGs Firmware contains a token-primitive, this token will be placed in the header of the /add
call, it will be the job of the server return an object (JSON) in the response within which to insert the key
new_token and as a value a new alphanumeric token of 8 figures that the btwTAG will encapsulate in the
header of subsequent calls to /date type.
Note: Of course, you can return to all Tags the same new token; for security reasons we encourage you to
use a unique token for each Tag.
The server (for example) will need to receive the /add call:
1. verify that the primitive token is present and is correct
2. verify that the payload contains the device key with the hw_id (unique serial of the device) and
possibly the company_token (that is, an identifier of the ecosystem in which it will operate).
3. Save the Tag and all its parameters to a database and generate a 8-digit alphanumeric token.
4. Return the JSON (as per snippet) as a response within the to insert the new token.
5. From this moment on, the Tag will always only send type /data and in the header of these will
encapsulate the token generated received in the response to the /add call.
. . .
Before we see the /data call let's see what the parameters that the Tag sends to the first recording.
Configuration Parameters
The btwTAG has several configuration parameters. tend to be used by the standard user because could go
to change the functioning of radio frequency and then the performance of contact-tracing, however one
person properly trained can achieve ad hoc performance by modifying them.
Let's see the list of parameters
param:'hw': Unique hardware identifier of the tag
ex: ID-00124B001BCA3C37
param:'ct': company token
Identification of the company in which it is used
param:'bt': battery level
param:'sy': sync time with the server
It is the time window (in minutes) at the end of which the tag will
turn on the Wi-Fi and try to send the data to the Server.
param:'pi': broadcast message time.
This is the frequency (in seconds) of the message's sending time
broadcast of "presence" that other Tags "listen" to determine the
contact.
NOTE: The tag automatically sends
data to the server whenever it has
filled the event memory available on
the device regardless of scheduled
times.