Xbee on Cerbuino Board Rev 1.2

Any news about the firmware updates for the FEZ Cerbuino Bee?

I updated all the 4.2 NETMF firmwares and came across the same Xbee issue mentioned by Justin in the post : http://www.tinyclr.com/forum/topic?id=7507.

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 :frowning:

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  

Thanks

@ bbcat - it all works fine for me now after the update, can yo post a code snippet of how you are testing it

@ bbcat

What is the firmware version that you are using?

Hi Aron, here is the device information:

DeviceInfo:
HAL build info: 4.2.0.0, Copyright Oberon microsystems, Inc.
OEM Product codes (vendor, model, SKU): 255, 0, 65535
Serial Numbers (module, system):
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
Solution Build Info: 4.2.1.0, Copyright (C) GHI Electronics, LLC
AppDomains:
default, id=1
Assemblies:
mscorlib,4.2.0.0
Microsoft.SPOT.Native,4.2.0.0
Microsoft.SPOT.Hardware,4.2.0.0
Microsoft.SPOT.Graphics,4.2.0.0
Microsoft.SPOT.TinyCore,4.2.0.0
Microsoft.SPOT.Hardware.SerialPort,4.2.0.0
Microsoft.SPOT.Hardware.OneWire,4.2.0.0
Microsoft.SPOT.Hardware.Usb,4.2.0.0
Microsoft.SPOT.Hardware.PWM,4.2.0.1
Microsoft.SPOT.Net,4.2.0.0
System,4.2.0.0
MFConsoleApplication1,1.0.0.0
Microsoft.SPOT.IO,4.2.0.0
System.IO,4.2.0.0

Anything I should update? :slight_smile:

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. :frowning:

@ bbcat - if you add serialPort.Flush() does that help

ie

serialPort.Write(buffer, 0, buffer.Length);
            serialPort.Flush();

@ bbcat - Gadgeteer test


using System;
using System.IO.Ports;
using System.Text;
using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;

namespace GadgeteerApp1
{
    public partial class Program
    {
        bool state = true;

        SerialPort xbee = new SerialPort("COM1",57600);

        void ProgramStarted()
        {
            xbee.Open();
            xbee.DataReceived += new SerialDataReceivedEventHandler(xbee_DataReceived);
            GT.Timer timer = new GT.Timer(500);
            timer.Tick += new GT.Timer.TickEventHandler(timer_Tick);
            timer.Start();
        }

        void xbee_DataReceived(object sender, SerialDataReceivedEventArgs e)
        {
            
        }
        void timer_Tick(GT.Timer timer)
        {
            state = !state;
            Mainboard.SetDebugLED(state);
            byte[] buffer = Encoding.UTF8.GetBytes(DateTime.Now.ToString() + "\r\n");
            xbee.Write(buffer, 0, buffer.Length);
            xbee.Flush();
        }
    }
}

@ Justin -

No luck…very weird

@ bbcat - And you have paired them in X-CTU?

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

Select option 3 for the latest firmware.

1 Like

Thanks a lot, Aron. This update solves the issue.