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" #18

Closed jiliao7456 closed 5 years ago

jiliao7456 commented 6 years ago

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. However, once I open XCTU and add this device, the problem will be solved. I wonder how could I use Xbee C Library sample without open XCTU?

jiliao7456 commented 6 years ago

I am afraid it is related to " Opens the communication with the XBee device". How to do it in C langurage?

tomlogic commented 6 years ago

What platform (Windows, Linux, Mac)? What baud rate (default is 115200)? Have you configured the module with ATAP=1? Does the atinter sample work? Note that gpm is only available on a few modules (XBee S6B/Wi-Fi is the only one I know of for sure). Does xbee_term work?

jiliao7456 commented 6 years ago

Thank you for your reply. The platform is Linux and baud rate is 115200, ATAP = 1. atinter and xbee_term samples also do not work.

qxy12 commented 5 years ago

I have met the same problem,did you solved it?

jiliao7456 commented 5 years ago

I have met the same problem,did you solved it?

Yes, that is due to series port configuration problem. In my code, I configured my series port as XCTU did and solved the problem.

qxy12 commented 5 years ago

thanks for you answer, Can you tell me the specific port configuration ?

jiliao7456 commented 5 years ago

thanks for you answer, Can you tell me the specific port configuration ?

No problem. When you enter command "stty -F /dev/ttyUSB* -a", the output should be shown as follows: speed 9600 baud; rows 0; columns 0; line = 0; intr = <undef>; quit = <undef>; erase = <undef>; kill = <undef>; eof = <undef>; eol = M-&; eol2 = <undef>; swtch = M-P; start = ^Q; stop = ^S; susp = ^W; rprnt = ^?; werase = <undef>; lnext = <undef>; discard = <undef>; min = 1; time = 0; -parenb -parodd -cmspar cs8 -hupcl -cstopb cread clocal -crtscts ignbrk -brkint ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8 -opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt -echoctl -echoke -flusho -extproc

tomlogic commented 5 years ago

If anyone identifies settings from that list that fix their problems, please report it here an re-open this issue. I can then look into updating the serial driver to incorporate those changes.

tomlogic commented 4 years ago

Note to anyone following this issue: I recently pushed changes/improvements to the POSIX serial library that make use of cfmakeraw(), which hopefully resolves outstanding serial issues for POSIX users.