Home/Support/Support Forum/Cannot read data using "recvfrom"
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Cannot read data using "recvfrom"

0 votes
Hello,

I just started with Xbee world, and need your help on this problem. I have a Connectport X4 DM 900, and an Xbee module DP 900. I installed DM firmware on the Xbee module and tried to send api packets to the gateway. When I use command "set trace state=on mask=xbee:*" in a Terminal, I can see the data flows like this:

1704425:xbee:DEBG:RECV:
1704425:xbee:DEBG: 0: 7e 00 1c 92 00 13 a2 00 40 9a 1b 8e ff fe 01 01 ~.......@.......
1704425:xbee:DEBG: 10: 00 00 3f 13 ff 02 ff 06 ff 02 ff 01 ff 03 ff eb ..?.............
1704509:xbee:DEBG:RECV:
1704509:xbee:DEBG: 0: 7e 00 1c 92 00 13 a2 00 40 9a 1b 8e ff fe 01 01 ~.......@.......
1704509:xbee:DEBG: 10: 00 00 3f 01 ff 02 ff 03 ff 03 ff 01 ff 03 ff eb ..?.............

I opened another terminal and run sample codes in http://www.digi.com/wiki/developer/index.php/UDP_to_XBee_Network, everything was fine until it reached command "data, addr = zig_sock.recvfrom(255)", and it seemed to hang forever, even though at that time I can still see the data flows in the other terminal window.

Could you please tell me why?

Thank you
related to an answer for: Get data from multiple nodes
asked Jun 10, 2013 in Python by Miye New to the Community (0 points)

Please log in or register to answer this question.

2 Answers

0 votes
Use the code with Try and Except cluse and print the error. It tells what is wrong with the recv()
answered Sep 13, 2013 by 16ksa23 Veteran of the Digi Community (426 points)
0 votes
Take a look at how you bound the socket, DigiMesh requires either an endpoint of 0xe8 at 2.4ghz or 0x00 at 900mhz.
answered Sep 18, 2013 by charliek Veteran of the Digi Community (408 points)
...