TCP socket communication problems

First off I’m new to ZigBee mesh networks and Digi products so I may be making some fundamental mistakes!

My problem is that I’m trying to communicate with my ConnectPort X2 using TCP socket connections. I can successfully ping the ConnectPort using TCP echo on port 7, getting a response that matches the packet I sent, but when I issue the same command on the TCP server / port 2101 I get nothing returned. I don’t get any transmission errors form my VB.NET application, and it uses the exact same routine as when it performs a ping to port 7.

Here’s my set up:

ConectPort X2 Ethernet running firmware 2.14.0.7 (Version 82001631_J1 10/04/2011) (non-python)

Which from the release notes states: This firmware is targeted for applications that require communicating directly with the wireless PAN module in the ConnectPort X2 gateway via RealPort, Modbus, or UDP/TCP sockets.

Using telnet I’ve configured the TCP Server service to be on, listening on the default port of 2101, and connected to Port 1.

I’m sending a NI command to simply query the ConnectPort. If I send it with a parameter value it doesn’t reconfigure the ConnectPort with a new node identifier. This suggests to me that it’s not just that I’m not getting a response, but the command isn’t getting to the XBee radio. A ping gets as far as the ethernet connection and gets returned, but an actual command doesn’t make it to the UART.

My command is as follows: 0x7E, 0x00, 0x04, 0x08, 0x01, 0x4E, 0x49, 0x5F

Nothing I’ve seen so far suggests any kind of terminator after the checksum. I’m assuming it uses the frame length to determine when it’s received a complete packet. Is this correct?

I’m hoping that it’s just a configuration problem that I’ve missed along the way. Any help will be greatly appreciated!

Looks like I missed the “Enable serial access to the gateway radio” checkbox under Gateway Access on the web configuration page. But checking that still doesn’t let me connect, and I’ve gone through all the settings to see if anything jumps out at me. I’m assuming that the default serial settings (9600,8,N,1) are correct?

I’m assuming that the default serial settings [:-/] what can you know?

Still playing around with this and found something new. After a reboot of the ConnectPort the first message sent receives a single byte response, 0x58 (an ASCII “X”). Repeated sends get no further response. I can see 1 byte in and multiples of 8 bytes out in the Serial Port Diagnostics. Anyone know the significance of the “X”?

Got it! Baud rate should have been 115200. :slight_smile:

In both cases you will need to create a small communication protocol to transfer the data. This way you will know that a packet is received with a determinate lenght and data, something like this:

this is good !