This project has moved. For the latest updates, please go here.

XBEE Series 2

Jan 3, 2012 at 1:08 PM

Hi!

I've been racking my brains with a strange issue since one week.

I have a XBEE S2 configured in API mode as a ROUTER (FW 23A0) attached to a Netduino Plus through COM2. 

The issue is that every time I try to send a command to the module I get no answer (but I can receive), instead, I get a timeout. I've debugged the code until reaching the point where line serialport.write(bytes[],0,bytes.lenght) in xbee.cs (within function ExecuteNonQuery(XBeeRequest request)) is executed unsuccessfully. (BTW the method serial_port.isopen() is true )

I have checked the the content of bytes[] and is correct, moreover I've sent them successfully using X-CTU.

Is there any option in the constructor I missed?

I've tryed the following:

 

XBeeModule myXbee = new XBeeModule(SerialPorts.COM2, 9600, ApiType.Enabled);

//I have even tryed to use class XBee instead of XBeeModule!!! -> same result!

//and setting parity, stopbytes and etc. -> no result!

myXbee.FrameReceived += new FrameReceivedEventHandler(myXbee_FrameReceived);           

myXbee.ModemStatusChanged += new ModemStatusChangedEventHandler(myXbee_ModemStatusChanged); 

myXbee.Open();

And in another method I call: myXbee.Execute(new AtCommand("MY"));

Then...fatality! Timeout!

I know the module is well configured because I wrote the code by myself and the module was answering.

 

It's a pity...hope somebody has a clue to figure out where's the mistake:(

Thanks and happy new year!!! 

Jan 21, 2012 at 2:15 PM

I'm pretty new with XBee but my understanding is that once you configure the modem to use the API you cannot send it AT commands. Have you tried configuring it using Router AT to see if it responds?