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

Connection issue with sample codes in the library. #8

Closed clark9501 closed 6 years ago

clark9501 commented 7 years ago

Dear Tom,

I am trying to set up a wireless network with Xbees to enable the communication between several drones. I was planning on using this library and came across some issues while learning it through the sample programs.

I work with a linux system and managed to compile and run the code in the posix folder. However, I met some problem trying to connect it to my Xbee. (My Xbee is on the /dev/ttyUSB0 with an HV=1848 and VR=10EE. It can connect perfectly with the computer via XCTU.)

The sample program can recognize that there is a Xbee at /dev/ttyUSB0, but it gives following error information:

"Error -110 waiting for query to complete. XBee on /dev/ttyUSB1: HV=0x0 VR=0x0 IEEE=00-00-00-00-00-00 net=0x0000

Can't display menu for this hardware/firmware combination."

I am wondering if my Xbee hardware/firmware version is still supported by the library. And if there is a way for me to solve the problem. Thank you very much!

Cheers!

Clark

tomlogic commented 7 years ago

Double-check the baud rate and verify that you have set ATAP=1 when you look at it in XCTU. The sample will work on that hardware, but it won't show a list of AT commands at startup. You can also use the xbee_term sample to check the serial port configuration, and to potentially use command-mode on the module to set ATAP1 and do an ATWR to save the settings.

tomlogic commented 6 years ago

@clark9501 : Were you able to get it working? Can we close out this issue?

clark9501 commented 6 years ago

Thanks again for the help! Sorry I was working on multiple projects and forgot to close this issue. Apology.