The Track-and-Trace Product Kit has been pre-loaded with a demo sketch. Here we will show you how to get this demo running in no-time!
If you are using the AllThingsTalk Product kit, the Arduino LoRaWAN SDK and PDK are already installed on your Sodaq ONE.
If you did the basic example on the previous page, your device is already created and ready for use.
If not, please check the create device and enter keys sections on that page.
First we need to know to which COM port our device is connected.
powershell
to get into powershell command mode[System.IO.Ports.SerialPort]::getportnames()
Next we will use PuTTy as a terminal emulator to show the settings menu and the communication of the device.
Regardless of the terminal tool you use, once the serial connection is established, you should see something similar to this
The default is Terminal which you can find in your Utilities folder
Ls /dev/tty.*
screen <port-name> <baud_rate>
to establish a simple serial connection,If all went well, you should now be connected and see the configuration menu of your Track-and-Trace device
Below you will find a list of commands to slightly alter the behaviour of your Track-and-Trace device.
q
quit (this will start the demo application)s
save the current settings and quit the menu (this will start the demo application)r
do a factory reset. This resets all values to their default valuedev
set the DEVEUI for your Track-and-Trace deviceapp
set the application sessions keynwk
set the network session keyThere are 2 different modes
0
accelerometer is not used. Interval for sending data is a fixed time interval1
sending data is triggered by the accelerometerCommand ac
, for example
Set the sensitivity of your accelerometer. Range between 1 and 10.
Command acs
, for example
Time interval between sending of data in minutes.
Command int
, for example
Amount of retries the GPS module attempts to get a fix before giving up.
Command gps
, for example
To run our demo, we need to fill in the keys of our device. You can find them under SETTINGS > CONNECTIVITY of your device in AllThingsTalk.
Fill in these keys using the terminal Keys commands above
For example to set the APPSKEY typ
The LoRaWAN™ based Track-and-Trace device will enter into configuration mode
- when you press the button within 5 seconds after you power on the device
- or when no device keys are entered yet
Else the device will start running the Track-and-Trace application straight away.
Make sure the correct payload format is set for your device under SETTINGS > Payload Formats in AllThingsTalk. This example uses our default json format so make sure the ABCL checkbox is unchecked.
After saving your keys, the Track-and-Trace application will start automatically.
To visualise your data, all you have to do is click the New pinboard icon. All pinned controls are preset for you!
For more information on pinboards, please check how to use pinboards.