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

Error -110 waiting for query to complete. #41

Closed aylashiv closed 1 month ago

aylashiv commented 5 months ago

Hi, I understand this Error was addressed longback, but its frequent in my case with the device i'm using XBee-Pro-900HP, Unable to findout what actually causing the issue. And unable to find the solution as well, as per the solution to the issue https://github.com/digidotcom/xbee_ansic_library/issues/18

Thanks.

tomlogic commented 5 months ago

Does it work with XCTU? Do you have ATAP set to 1? Do you have the correct baud rate? Correct serial port?

Can you use the xbee_term sample to communicate with the module? If you have the correct baud rate, you should be able to send a sequence of +++ to enter "AT command mode" and have it respond with OK. You can then send AT commands (like ATSH and ATSL to get the high and low 32-bit values of the serial number).

aylashiv commented 5 months ago

Yeah it works well with XCTU, and all other parameters defined above are well taken care of.im using POSIX platform. I have run transparent-client program.

tomlogic commented 5 months ago

Does the atinter sample work? If so, then the serial port and XBee module configuration are good.

If not, try using xbee_term to verify basic communications to the module. If that fails, a program like minicom might be good to verify that serial communications works at the hardware level.

Is the module wired to TTL-level I/O pins of the BeagleBone, or are you using a USB adapter?

For the "transparent client" sample, you need to verify that the modules are joined to the same network in order for Node Discovery to work.

aylashiv commented 5 months ago

could you help me understand the usage of the xbee_term code, were I'm unable to see any document to set the parameters.

tomlogic commented 5 months ago

If you build and run the xbee_term sample, it takes similar parameters as atinter for specifying the serial port and baud rate.

./xbee_term /dev/ttyS001 115200

It then prints instructions before providing a simple terminal interface.

Simple XBee Terminal
CTRL-X to EXIT, CTRL-K toggles break, CTRL-R toggles RTS, TAB changes bps.
aylashiv commented 5 months ago

Im able to do the step as you have mentioned , the thing that TAB function do is changing the Xbee Baud/xbee driver setting to that Baud?

tomlogic commented 5 months ago

Yes, while the program is running you can use TAB to change the baud rate. This is useful in some modules where you're trying to enter the bootloader, which operates at a fixed speed. Or if you're trying to get a module to respond and you don't know what its settings are.

If you can't get the XBee to respond in xbee_term, you have a serial port problem that you need to resolve before any of the samples that make use of API mode will work.

aylashiv commented 5 months ago

Xbee_term will work in AT or API mode? Because while I could able to change the Baud rate and trying to enter to AT mode by issuing +++ sequence, and issued AT , I see no response.

tomlogic commented 5 months ago

Even when you're in API mode, the +++ escape sequence should work to allow entry of AT commands.

Are you hard-wiring the XBee module to I/O pins of the BeagleBone? Did you remember to connect ground as well? Perhaps you have TX and RX swapped? Remember that TX from one device should go to RX of the other.

samhitha-emb commented 4 months ago

The connection is from RX to TX and vice versa and Gnd is connected as well. Y its not entering AT mode Yeah.. even I'm surprised...

tomlogic commented 4 months ago

Another troubleshooting step is to disconnect the XBee module and loopback your TX pin to RX. In the terminal emulator, you should see an echo back of any character sent out.

If it fails, you have a hardware issue unrelated to the XBee.

samhitha-emb commented 4 months ago

Done Echo !!! This will be our inital steps of test cases for UART bringup, it was tested long back itself. As per Sample Programs Info in SDK XBee Term: Simple, stand-alone terminal emulator to interact with a module's bootloader or its regular firmware in command mode Here its mentioned Command Mode, which commands ? AT?

tomlogic commented 4 months ago

The XBee-PRO 900HP uses 3V I/O. What does your embedded platform use? If it's 5V, it won't work correctly.

You could try swapping TX and RX connections to verify that they're correct.

You said the module worked with XCTU, so you know the baud rate. In case this is a hardware flow-control issue, you could try temporarily setting ATD6 and ATD7 to 0 within XCTU before performing further tests with xbee_term on your hardware.

With the correct baud rate set in xbee_term, you should be able to enter this sequence and receive an OK response:

Here's Digi's documentation on entering AT command mode.

tomlogic commented 1 month ago

@aylashiv / @samhitha-emb : I'm closing this issue since there hasn't been any followup since my last message.