AirDuino and AirDongle Firmware Upgrade

We are glad to publish v2.0 beta firmware for AirDuino and AirDongle. This is a major upgrade from v1.x. Many improvements has been made to existing functions. An automation control oriented framework S-Ctrl is introduced into this version. This framework allows up to 32767 devices to communicate over the 2.4G RF. The network is multiple-access, which means any device could send data to any device, which is similar to Ethernet or WiFi. The framework also defines the messaging format for different automation control purposes.

This article mainly demonstrates the process of firmware upgrade for AirDuino and AirDongle from v1.x to v2.0. There has been some performance improvements in the RF messaging part. However, compatibility with the 1.x version was sacrificed. This makes the upgrading process complex. The process is not risky, just too many steps to go.

AirDuino has to be upgraded by AirDongle via RF. As the bootloader in AirDuino is also similar to v1.x firmware, only AirDongle running v1.x firmware can be used to upgrade AirDuino. Therefore, we should upgrade AirDuino first.

1. If the AirDuino is within physical access, the easiest way to make AirDuino enter bootloader mode is to power off AirDuino, and power it back on while pressing and holding the “PAIR” button. The PAIR button can be released after power is attached. The PAIR button can be used in order to test whether it is in bootloader mode. The blue LED should turn on when PAIR button is pressed. Do not press more than 5 times as pressing PAIR button 5 times while it is in bootloader mode would reset AirDuino to factory default settings. If the AirDuino is beyong physical access, the AirDongle command line can be used to set AirDuino into bootloader mode. Related commands are:

  • context <AirDuino’s rf_addr> (enter AirDuino’s context)
  • bootloader

2. The next step is to let AirDongle to connect to AirDuino via RF virtual COM link. Regardless any settings, the AirDuino bootloader always use rf_addr=0xE000, rf_dr=250k, rf_channel=50. So the AirDongle should be configured accordingly in order to establish the RF virtual COM link. Related commands in AirDongle v1.x command interface are:

  • set vcom_peer 0xE000
  • set rf_dr 250k
  • set rf_channel 50

If everything is alright, the blue LED on AirDongle should turn on which indicates a connected virtual COM link.

3. Download the firmwares and firmware upgrade tool. Unzip it somewhere. And then use Windows Command terminal to cd to the firmware folder.

4. Enter command “FirmwareUpdater –dev=COM5 –sef=AirDuino_v2.0_beta.sef“. The COM port number is probably different than this. The COM port selected in Arduino IDE for downloading sketch is the right one. In Windows Device Manager, it should be “STMicroelectronics Virtual COM Port“.

5. A command windows should pop up and show the upgrade process. Now the AirDuino is upgraded.

6. Upgrading AirDongle is relatively easy. Enter AirDongle command line and enter command “bootloader”. The AirDongle will enter bootloader mode.

7. Close the AirDongle command line window. (This is necessary because upgrade will use the same port that AirDongle command line was using.)

8. In the Windows Command terminal that we used just now, type command “FirmwareUpdater –dev=COM6 –sef=AirDongle_v2.0_beta.sef“. Note that the COM port is different than the one we used for upgrading AirDuino. This COM port should be named “USB Serial Port” in Windows Device Manager.

9. After the popup command terminal finishes, the AirDongle is also upgraded.

10. The AirDongle command line has been changed slightly. There will not be context switch any more. Each command has to specify whether this command is applied to local (AirDongle) or a remote device. Details will be explained later. Hopefully the following command example could give some intuitive idea.

  • set local rf_dr 1m (set AirDongle’s RF datarate to 1mbps)
  • set local bootloader (set AirDongle to enter bootloader mode)
  • set 0x0003 bootloader (set device @0x0003 to enter bootloader mode)
  • set 0x0003 rf_addr 0x0004 (change device @0x0003’s RF address to 0x0004)
  • set 0x0003 factory_default (set device @0x0003 to factory default setting)
  • get local vcom_peer (display AirDongle’s vcom_peer)
FacebookTwitterGoogle+Share

Leave a Reply

Your email address will not be published. Required fields are marked *


seven − 2 =