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!
First please check how to create a LoRa device.
After you have created a device using the above link, connect your device to your computer with a USB cable. We will now use a terminal emulator to set up a serial connection with the device, using the correct COM port and baud rate.
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
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 LoRaWAN™ based Track-and-Trace device will enter into configuration mode
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 valueTo run our demo, we need to fill in the credentials of our device. You can find them under 2. CONFIGURE YOUR DEVICE of the setup tab of your device in AllThingsTalk.
Fill in these keys using the terminal. The commands to do so are between brackets in the Settings: menu.
Commands used are dev
, app
and nwk
respectively.
For example to set the APPSKEY typ
There 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 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.
Below you will find a description of the behaviour of the track-and-trace demonstrator. As explained under the accelerometer parameter, there are
two major modes to run your device in. Send GPS coordinates at a fixed interval or use the accelerometer to check and only send when we have acceleration.
Start up
Setup
retries
times or until a GPS fix is foundRunning
The following is repeated over and over:
interval
minutesretries
times or until a GPS fix is foundSimilar Start up and Setup as above
Running
The following is repeated over and over: