C# DotNET 2.0 serial interface problem


I recently added the X-Bee PRO to my remote module and I want to view the data on an XP machine. I tested the software using a FTDI USB cable to the remote module and all is ok. When I replaced the cable with the X-Bee it stopped working. Using HyperTerminal and X-CTU the data gets through with out a hitch. When I use my app, nothing happens, it successfully opens the serial, but not data gets through. I tried reading the serial without an interrupt, but there is not data in the buffer. How does the DotNET serial port driver differ from the HyperTerminal or X-CTU driver? What could be wrong?



are your SerialPort settings correct (baud rate, etc.)?
Can you send AT Commands to the remote module (with C#)?

Yes, the serial port settings are exactly the same for the HyperTerminal test and my application. I am using 115200 baud 8,N,1. I haven’t tried sending commands because my app just receives data from the module. If I am not receiving any data I won’t know if the commands were received, because I won’t get a response.
I have now also connected the DTR and RTS lines on the Xbee to the processor board, maybe that will make it work, but I haven’t tested it yet.
I had the exact same setup without the Xbee using a FTDI cable and that worked 100%, it’s only now that I’ve added the XBee in the middle it doesn’t work.

I found the problem. Even though I set HyperTerminal flow control to NONE, the RTS/DTS lines are still activate. I changed my application to use RTS flow control and now it works as advertised.
I thought it had to be a silly little thing.

Sound like an encoding problem.

FYI - you need to set D6 accordingly on the XBee to control RTS functionality.