Embedded applications controller mode
sure it is valid report. If so, the report is stored in the
database, and a count is incremented. Once the count
reaches 10, or a day has passed since an update was
last sent, the radio device resets into Normal Mode to
send the status update.
• DoGSM() - Restore the database, and reads out each
new record, storing them in the SMS string, before
deleting the record. Once all the records have been
transferred, the SMS is sent. The radio device then
resets into Controller Mode and awaits further data.
3.2 Running the Example Script
In order to run this example script:
1
2
3
4
Connect the UART3 Tx and Rx lines via an RS232
level shifter to a COM Port on your PC, the Demo
Board which comes with the developers kit can be
used for this.
Load the script into the Editor, and replace the
SMS_NUMBER field with a valid mobile number the
SMS reports should be sent to.
Download the script, making sure to check the “Run
Script on Startup” box. This will enable the application
to run on every startup – crucial for the functionality
with Controller Mode.
Run the script. (You can see the debug outputs if you
monitor the UART2 port (115200 baud, 8 data bits, no
parity) and set the service pin HIGH prior to power on)
The radio device will have reset into Controller Mode and
be waiting for data. To enter data, use a terminal package
and send packets of the form “SxxxxxxxxxxxxxE” where x
is any 7-bit ASCII value. Once 10 valid packets have been
received, or a day has passed, the radio device will reset
and send the data in an SMS to the number you have
entered.
LZT 123 8015 R1A 8