XBEE is not receiving TCP Data

Ok. I can successfully establish a TCP Connection and send data, however, any data returned is not displayed or returned in an API x0B Packet. Anyone else experiencing this? Here is long background story:

I’m Connecting to the XBEE via an FTDI cable connected to an Adafruit XBee Adapter Kit. I’m sending API packets from X-CTU. The same problems occur in Transparent Mode. The XBEE is connected to my wireless access point and I’ve set the router to OPEN security so I could debug the traffic. It DHCP’s the IP Address of 192.168.1.100. In Wireshark I see successful connection to the DEST IP with data coming back.

Connection Setup

I’m establishing a connection to a remote web server <4AD03B1F>(74.208.59.26) to port <0050>(80) from port (48879).

Problem #1) I never receive any data back in either Transparent or API Mode. I’m expecting an API packet of B0 (Rx IPV4 Packet). In wireshark I have seen TCP data being returned to the XBEE. [Attached]

Problem #2) If I try the connection again even though the webserver should have already closed the TCP Connection it crashes the XBEE. I’ve even seen the FIN, ACK in wireshark. I receive

[89] 01 04 – Physical error occurred on the interface with the WIFI Transeiver.
[8A] 03 72 – No longer joined to access point.
From that point if I try to transmit I get a:
[89] 01 03 – Transmission was purged because it was attempted before stack was up.

Data Sending [Transparent & API Mode]

GET /energy/CommitEnergy.php HTTP/1.0
Host: s157582434.onlinehome.us

//SEND Get REQUEST to Web Server

7E 00 57 20 01 4A D0 3B 1A 00 50 BE EF 01 00 47 45 54 20 2F 65 
6E 65 72 67 79 2F 43 6F 6D 6D 69 74 45 6E 65 72 67 79 2E 70 68 
70 20 48 54 54 50 2F 31 2E 30 0D 0A 48 6F 73 74 3A 20 73 31 35 
37 35 38 32 34 33 34 2E 6F 6E 6C 69 6E 65 68 6F 6D 65 2E 75 73 
0D 0A 0D 0A 0D 0A 12

Wire Shark View of TCP Stream between XBEE & Web Server

X-CTU view of sending data and getting nothing back…

I have a Blog as well with my current project…

Below is the link to my post on this XBEE problem.

http://godydeeps.wordpress.com/2011/10/11/xbee-wifi-digi/

Yes, I also have the same trouble.

In other cases, even when it is connected with XBee wifi from a telnet client, bidirectional communication cannot be performed.

I am observing your site.
If there is any progress, please let me know.

I just ran face first into this with UDP. Really disappointing.

XBee Configuration: DHCP, WPA, UDP, Source socket is +1 from Dest socket, Transparent mode, firmware (102B and stock firmware 101E)

Observed behavior:

  1. Spam XCTU terminal –> listening client on PC (works fine; no delays, can spam forever with no trouble)
  2. Reply to IP/Port with Single datagram (“Hello World”) - Received Correctly.
  3. No additional replies can be sent to the XBee module. No status changes have occurred in the configuration (all seems well except that it cant receive anymore)
  4. Attempt to Send from XBee –> PC client again, BAM disconnected from access point - IP address reset. When it comes back, I can repeat the whole procedure.

What in the hell is going on here? Has there been any additional information on this?

edit
So it looks like this may have been fixed for TCP with 102B but may still be prevalent in UDP mode. If I hear back from Digi support; I’ll make a new thread I think… sorry for misc cross-post; seems almost related heh.

Any updates on this situation? I’ve got an Xbee wifi module that can receive HTTP GET requests without a problem. I have it sending GET requests using API to an Apache 2 server. I see the packets hitting the server with tcpdump and I see a response being generated, but the only response I get on the serial UART is the API block:
7E 00 03 89 01 00 75 -> TX status success, no HTML or anything else.

I’m running the latest firmware and can’t seem to figure this one out. Any suggestions?

I’ve got “GET HTTP” to work with the latest firmware 102D. My issue was that I did not supply the complete escape sequence for the GET HTTP string which is "

" or 0d, 0a,0d,0a. so the total request in the API frame payload is "GET / HTTP/1.1

". Hope this helps someone. Took me quite a few hours to nail it.

I’m having the “same problem” (I think–I’m new to these modules, as I just received my order, and the software is an older version-102B, and 102D is current). My configuration is FreeBSD (UNIX) <-> XBee. The XBee associates with the AccessPoint using WPA, has static IP address on same net with AP (acting as a simple Bridge) and BSD host computer. Ping works. XBee in UDP mode looses characters. Watching the raw IP traffic (with tcpdump) shows that the lost characters never left the XBee. Switching to TCP, a simple .c program (opens a TCP socket on the default XBee port, listens for a connection, when the connection opens, receives packets and sends data to console, keyboard input is sent on the socket to the XBee. Doesn’t work. However, using Telnet (RFC 854) works without fail. All characters get through both directions. If you’re having trouble, try this.

Does anyone have any simple .c programs the demo sending/receiving streams of characters, both with UDP and with TCP. Once I get this working, I’ll make the demo program available to anyone wanting them.

I’ve got “GET HTTP” to work with the latest firmware 102D. My issue was that I did not supply the complete escape sequence for the GET HTTP string which is "

" or 0d, 0a,0d,0a. so the total request in the API frame payload is "GET / HTTP/1.1

". Hope this helps someone. Took me quite a few hours to nail it.

Yes! I’ll follow up on this. I actually got an email from a Digi Engineer on March 9th, 2012 stating their newest firmware has resolved the problem I was having:

http://www.youtube.com/watch?v=nVIeRJoiuhY

I did test it, and it was resolved. :slight_smile: