My Xbee is Pro 900 -XSC, and I used COM1 with 9600 baudrate but could not get any luck to send/read a single byte of data
Any suggestion to resolve this issue?
BTW, a follow up to my question in the post: http://www.tinyclr.com/forum/topic?id=7564. I mapped all the analog channel to the pins on the Cerbuino Bee board. Here are the pin mapping:
// Cpu.AnalogChannel.ANALOG_X mapping with Cerbuino on board Cpu.Pin
//
// ANALOG_0 = (Cpu.Pin)6
// ANALOG_1 = (Cpu.Pin)2
// ANALOG_2 = (Cpu.Pin)3
// ANALOG_3 = (Cpu.Pin)32
// ANALOG_4 = (Cpu.Pin)33
// ANALOG_5 = (Cpu.Pin)4
// ANALOG_6 = (Cpu.Pin)34
// ANALOG_7 = (Cpu.Pin)35
//
// So, Cerbuino "A4" is actually Cpu.AnalogChannel.ANALOG_4, and "A3" is Cpu.AnalogChannel.ANALOG_7
A very simple test to keep sending data out from the serial port on Cerbuino.
using System;
using System.IO.Ports;
using System.Threading;
using Microsoft.SPOT;
namespace Test
{
public class Program
{
static SerialPort serialPort;
public static void Main ()
{
byte[] data = new byte[] { 0x01, 0x02, 0x03, 0xAA, 0xBB, 0xFF };
try
{
serialPort = new SerialPort ("COM1", 9600, Parity.None, 8, StopBits.One);
serialPort.ReadTimeout = Timeout.Infinite;
serialPort.WriteTimeout = 100;
serialPort.Open ();
}
catch (Exception e)
{
Debug.Print (e.Message);
}
while (true)
{
serialPort.Write (data, 0, data.Length);
Thread.Sleep (100);
}
}
}
}
I use the X-CTU terminal or RealTerm to display the received the data from serial port. I verified the Xbees, they work fine. But I could not get any data pop up on my screen when use Cerbuino.
Yep, I configured the Xbees to make them pair well.
I used the two Xbees (each one connects to a PC) stand alone. I typed some characters on one terminal, and the other side shows the content without problem. vice versa.
bbcat, from this information you are still using the older firmware of 4.2.1.0. Try to download the latest firmware that was just released this past Friday, 4.2.1.1. I think that will solve your problem. Here is the link to the forum post: http://www.tinyclr.com/forum/topic?id=7457