Download new firmware to a wireless module

Warning: Downloading new firmware on your RF module can break the module if it fails during the upload. We've done 1000's of uploads without any issues so it's not a major risk, but something to be aware of. 

Here are the instructions to load new firmware on the wireless module. The firmware determines the "personality" of the device. There are four personalities you can load:

1. Base station personality
2. Temperature sensor personality
3. Wireless switch personality
4. Wireless relay personality


Pre-requisites:
  • If you have purchased a wireless switch or temperature sensor then these devices are in sleep mode, which conserves battery power and only awakes when then need to send a message. You need to awaken these devices before loading new firmware, or changign the configuration.You can find the tutorial on how to do that here.

Hardware:

For XRF:
Make sure you have the "awake" wireless device seated the Slice of Pi which if connected to the Raspberry Pi. This will not work wirelessly to a a wireless module in a wireless sensor case kit.

For Wireless Temperature Sensor or Wireless Switch 2.0. connect the 3V, GND, RX and TX to the corresponding pins on the raspberry pi (RX->TX & TX->RX). 

Software:

Log in to your raspberry Pi as the root user and go to a directory where you want to keep the wireless module firmware.

$ cd \home
$ mkdir wireless
$ cd wireless

Download the up-loader program:

$ wget www.privateeyepi.com/downloads/xrf/xrf_uploader.cpp

Download the firmware you want.

Base station personality:

$ wget www.privateeyepi.com/downloads/xrf/SerialPassThru-V0.82-24MHz.bin

Temperature sensor personality:

Thermistor:
$ wget www.privateeyepi.com/downloads/xrf/llapThermistor-V0.60-24MHz.bin

DS18B20
$ wget www.privateeyepi.com/downloads/xrf/llapDallas-V0.60-24MHz.bin


Wireless switch personality:

$ wget www.privateeyepi.com/downloads/xrf/llapOneButton-V82-24MHz.bin

Has a single button input XRF pin 9 (P1_4), this matches BUTTONA for the CCB V1.9 (Blue board)

  • Supports Cyclic sleep, reporting the battery status once per cycle, this is used as a “I’m still here” message
  • Supports the following special commands
    • aXXDEBnnnnnn -  set the debounce time in mS, default 100
    • aXXSTSnnnnnn - set the settling sleep time in mS – the device will poll the input at this interval until the input has settled
    • aXXWOSnnnnnn - set the polling time, used when the switch is closed waiting for it to open
    • aXXMSGxxxxxx -  sets the message to be sent followed by ON (switch is closed) or OFF (switch is open), defaults to BUTTON
  • This is a low power device designed for use on e.g. a windows or door where the switch may be open or closed for extended periods.
  • BETA release - use with care there may be issues - please report if found
  • Typical use - set the device name, interval for the battery messages, set the MSG to "BTN" and place into cyclic sleep.

a--CHDEVIDYY

a--REBOOT---

aYYMSGBTN---

aYYREBOOT---

aYYINTVL001H

aYYCYCLE----


Wireless relay personality:

$ wget www.privateeyepi.com/downloads/xrf/llapRelay-V0.60-24MHz.bin

Compile the up-loader program:

g++ xrf_uploader.cpp -o xrf_uploader
$ chmod +x xrf_uploader


Run the upload.

Base station personality:

./xrf_uploader -d /dev/ttyAMA0 -f ./SerialPassThru-V0.82-24MHz.bin

Temperature sensor personality:

./xrf_uploader -d /dev/ttyAMA0 -f ./llapThermistor-V0.60-24MHz.bin

Dallas DS18B20 personality:

./xrf_uploader -d /dev/ttyAMA0 -f ./llapDallas-V0.60-24MHz.bin

Wireless switch personality:

./xrf_uploader -d /dev/ttyAMA0 -f  ./llapButtonV3XRFV2-V0.68-24MHz.bin

Wireless relay personality:

./xrf_uploader -d /dev/ttyAMA0 -f ./llapRelay-V0.60-24MHz.bin


Configure the device:

Connect to your Raspberry Pi using SSH and a program like Putty. The reason you do this is because you will need to send commends to the device from the terminal window and the best way to do it is by copy and pasting the commands into the window. Typing them work work because you likely wont be able to type them fast enough.

cd /usr/bin

python miniterm.py /dev/ttyAMA0

Example commands to configure a wireless switch and set the device ID to 82:

a--CHDEVID82

a--REBOOT---

a82TYP8-----

a82SLEEP----

 

Example commands to configure a temperature sensor and set the device ID to 93:

a--TEMP-----

a--CHDEVID93

a--REBOOT---

a93INTVL005M

a93CYCLE----


Example commands to configure a relay switch and set the device ID to 82:

a--CHDEVID82

a--REBOOT---


Example commands to switch a relay with an ID of 82 ON/OFF

a--RELAYA---

a--RELAYAON-

a--RELAYAOFF-


a--RELAYB---

a--RELAYBON-

a--RELAYBOFF-


Comments