Over The Air Firmware Upgrade - XBee - S6BSM

Hi All,

I am trying to upgrade Firmware of XBee WiFi module over the air. But Transferring latest firmware (.ebin) Over the Air(OTA) keeps failing.

In digis Xbee wifi (S6BSM )Document, page no:73, its mentioned that Firmware Upgrade Over the Air is possible using .ebin file.



  1. Erase GPM memory
    2.Transfering/Distributing new application file using GPM_write command
    3.Verify Firmware using Firmware_verify command.
  2. Firmware install using Firmware_Install command.

Firmware file transfer with GPM_WRITE command always fail.

Can anyone help me with how to send the .ebin file over the air with GPM_WRITE command or with any different options for the same?

Remote XBee Modules are in Transparent Mode.

1 Like

Which XBee modules are you using on the remote side and what firmware version are they working with?

I have a tool which does this. All my firmware updates are done this way as I do not have a development kit. Frankly I never quite see the point to dev kits as you eventually need to integrate into a project anyway…

Earlier versions of the firmware were very ropey about accepting the GPM_write command (indeed any OTA commands). It was necessary to retry each command several times to get it to work. Remember that you can not write the whole file in one go, so must chunk it up. I use 1K chunks IIRC.

If you are still stuck let me know. I have been meaning to package up my tool into a little Windows command line utility for some time now. Why Digi don’t provide one, I’ll never know. It’s very useful fo in the field upgrades.

Device : Xbee - S6B
Firmware Version : 2026


Great to hear that OTA upgrade is working for you. I am sending files as 1k chunks (712 chunks in total). Still the upgrade is not successful.

Appreciate your feedback.!

Sorry, I was going to tidy up and post my code and I got distracted with other work. I’ll try to get round to this shortly.

Hopefully posting a link to this doesn’t contravene any forum rules…

Here’s my .NET project to do an OTA FW Update for a S6B module:

Command line syntax is very simple:
S6BFWUpdate [ip-address] [fw-file]

For example:
S6BFWUpdate C:\XB2B-WF-2026.ebin

I’ve include the full source and a .NET 4 compile. Please feel free to use and/or modify for whatever purpose you see fit.

1 Like

Thanks for the Software. Really appreciate your effort.

I tried running the file, command prompt is not getting loaded.

Output Log read as below :
The thread 0x1e2c has exited with code 259 (0x103).
The thread 0x21cc has exited with code 259 (0x103).
The program ‘[6808] S6BFWUpdate.vshost.exe’ has exited with code 0 (0x0).

I am using Visual Studio 2013

Appreciate your feedback !!

You don’t strictly need VS (only the .NET runtimes) as I supplied the built EXE in the zip. But if you want to build the project yourself that is okay.

Sorry, have to ask… Are you familiar with debug of command line apps in VS. How did you supply the command line arguments? Sounds like you didn’t give any arguments at all to the debug session (if you are using VS to run it), and so the command prompt would have opened, printed the command syntax message, and exited?

Right click project, properties, debug, and add some command line arguments. Path to the firmware file will be relative to the projects output folder, or you could copy the digi firmware file there first.

Or as you have VS installed you can single step debug instead of running the project and find the issue yourself. It is not a hugely complicated program!

Also check your firewall is allowing port 0xbee UDP traffic through. Although that shouldn’t stop the program from displaying a command line, it may mean it displays and error and closes immediately before you see it even if you have supplied correct arguments.

Mundhazir, that part about the port Xbee is very important. If you have not added that port to the Save Ports list to your Firewall, you will have issues.

pcbbc, thanks for the Post and the App. I will let others know about it.

Hi pcbbc,

Thanks .

I could supply the command ( Solution Explorer->Debug->S6BFWUpdate Properties-> Debug -> Command Line Arguments ) command prompt opened, printed the command syntax message, and exited(action was fast)

Firewall settings are fine.

I will test in detail with all the inputs you have provided.

Thanks once again for the support.

Either it was the command line arguments printing:
Syntax: S6BFWUpdate [ip-address] [fw-file]
(Perhaps the path to your firmware file includes spaces? Enclose the entire path in double quotes (“”) if it contains any spaces)

Or an error message:
xxx.xxx.xxx.xxx is not a valid IP Address
(Make sure the IP address supplied is valid)

Or perhaps:
Firmware file xxxxxxxxxxxxxx does not exist
(Make sure the path and file name you supplied are correct)

For debugging in VS you are better of right clicking on the S6FWUpdate project in the Solution Explorer Window and selecting Debug -> Step Into new instance. You can then single step through the code with F8.

Alternatively open a command prompt directly and don’t bother with running from Visual Studio at all. That way your window won’t close when the application exits. There’s really no point in using VS unless you want to debug and/or modify.