digidotcom / xbee_ansic_library

A collection of portable ANSI C code for communicating with Digi International's XBee wireless radio modules in API mode.
204 stars 116 forks source link

pxbee_update for posix system #9

Closed FlorianJ12 closed 6 years ago

FlorianJ12 commented 6 years ago

I'm trying to find a way of using the pxbee_update on a posix system (classical debian) but can't find a way to generate it. In the readme of sample/posix/ it appears in sample program but not in the makefile. I have only found it in the win32 folder but I'm not able to port it to linux.

My main goal is to be able to update the firmware (XB8X_A005.ebin) of an XBEE SX 868 without the XCTU software.

Is there an older version of the library where this application sample is available ?

tomlogic commented 6 years ago

That sample was for updating application code on the Freescale HCS08 processor of the "Programmable XBee" products. I'm not sure what the update process for an .ebin file on the XBee SX 868 looks like, but can try to find out. The sample using .ebl files was designed for XBee S2B and S2C modules. The "gpm" sample works for uploading new firmware to General Purpose Memory on the S6B (Wi-Fi) but you'd need to manually use the "xbee_term" sample to boot into the bootloader and send the commands to have it update from the GPM image. Maybe the SX 868 is similar?

FlorianJ12 commented 6 years ago

Hi, thanks for your reply.

I've tested the option you've suggested. It seems that that way of updgrading the firmware should work. However, when I try to use the "gpm" sample, I get an error after "Waiting for driver to query the Xbee Device..." : Error -110 waiting for query to complete. And then, none of the command get a success. I don't think this is a communication issue because the "xbee_term" sample works quite well.

Any idea of how to resolve this ?

tomlogic commented 6 years ago

I asked around, and it turns out the SX 868 doesn't use that process for firmware updates, so going down the gpm path won't help you. I suggest contacting Digi sales or tech support to request documentation on the protocol for firmware updates, explaining why you can't use XCTU (a valid use case that I fully support). As far as I know, they have not released details on the procedure for installing an ebin file on those modules (but I think they should).

Regarding the error message you saw, you'll probably see that on most of the sample programs (like the simplest, atinter) with any module that isn't configured for the correct baud rate or API mode 1 (ATAP=1).

FlorianJ12 commented 6 years ago

Actually we need a firmware upgrade for ARM architecture that's why XCTU is not an option. Anyway thanks a lot for your time, I will contact Digi tech support and see what can be done.

tomlogic commented 4 years ago

Following up on this, I've pushed updates to the POSIX serial driver and code for installing .ebin files for devices using the "Gen3 bootloader" (which I believe includes the SX 868). Please re-open this issue (or create a new one) if you have any issues when using the new code.