Home/Support/Support Forum/USB XStick behaves differently for XCTU vs. programatic Serial Port
New and improved user forum site going live on 12/6 (All users will need to reset their password when the new forum is active)
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

USB XStick behaves differently for XCTU vs. programatic Serial Port

0 votes
Hi there, I've been working with a USB XStick (XBee Pro), and I've been seeing some weird differences in behavior between the way the XStick behaves when XCTU sends it a set of bytes, and when I send it the SAME set of bytes over a serial port in c#.

When I issue a ND command over XCTU, I get an immediate at command response, but no such response is sent to the serial port.

When I issue an "AP" command on XCTU, I can get/set the API mode, but no responses can be seen over the serial port programatically.

Additionally, over the serial port, the "AO" command always starts out at 1, instead of 0 on XCTU. When I programatically set the API option to 2, or even 3, despite sending bytes to switch it to 0. Sending the same bytes on XCTU successfully updates the API option selected...

Any ideas? Anything at all would be helpful. The most obvious thing ould be that I'm setting up the serial port wrong, so I'll include that code:

port = new SerialPort("COM4", 9600, Parity.None, 8, StopBits.One);
port.DataReceived += new SerialDataReceivedEventHandler(receiveMessage);
port.DtrEnable = true;
port.RtsEnable = true;
port.Handshake = Handshake.None;

Thanks in advance!
asked Apr 21, 2016 in USB Serial by themurph23 New to the Community (0 points)

Please log in or register to answer this question.

1 Answer

0 votes
How about how are you sending the data? Are you telling your application to send and receive ASCII or Hex characters? All API data needs to be done in Hex characters.
answered Nov 10, 2016 by mvut Veteran of the Digi Community (15,515 points)