CAN Bus problems

I’ve ended up hooking up a Domino and CerbBee with the diode can bus; however I am unable to get any data from one device to the next.
This is the code on the CerbBee


using GHI.IO;
using GHI.Processor;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using System;
using System.Diagnostics;
using System.Text;
using System.Threading;
using Wiznet;

public class Program {
    public static void Main() {
        Thread.Sleep(5000);

        System.Version ver = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
        DateTime BuildDate = new DateTime(2000, 1, 1) + new TimeSpan(ver.Build * TimeSpan.TicksPerDay + ver.Revision * TimeSpan.TicksPerSecond * 2);
        Utility.SetLocalTime(BuildDate);
        
        Thread _debugLedThread = new Thread(new ThreadStart(DebugLED));
        _debugLedThread.Start();

        ControllerAreaNetwork _can1 = new ControllerAreaNetwork(ControllerAreaNetwork.Channel.One, ControllerAreaNetwork.Speed.Kbps125);
        _can1.MessageAvailable += _can1_MessageAvailable;
        _can1.ErrorReceived += _can1_ErrorReceived;
        _can1.Enabled = true;
        ControllerAreaNetwork.Message _msg = new ControllerAreaNetwork.Message(0x55, Encoding.UTF8.GetBytes("PolyLeft"));
        _can1.SendMessage(_msg);

        //Configuration _configuration = new Configuration();
        //Initilize();
        //NetIO.DoInit();

        //Dispatcher _dispatcher = new Dispatcher();

        //NetIO.RX += _dispatcher.PacketReceive;

        //dSpin.BlockUntilStopped();


        //_dispatcher.Start(); //will initiate homing.

        Debug.Print("Bytes Free: " + Debug.GC(true));
        Thread.Sleep(Timeout.Infinite);
    }

    static void _can1_ErrorReceived(ControllerAreaNetwork sender, ControllerAreaNetwork.ErrorReceivedEventArgs e) {
        Debug.Print(">>> can_ErrorReceivedEvent <<<");
        
        switch (e.Error) {
            case ControllerAreaNetwork.Error.Overrun:
                Debug.Print("Overrun error. Message lost");
                break;

            case ControllerAreaNetwork.Error.RXOver:
                Debug.Print("RXOver error. Internal buffer is full. Message lost");
                break;
            case ControllerAreaNetwork.Error.BusOff:
                Debug.Print("BusOff error. Reset CAN controller.");
                sender.Reset();
                break;
        }
    }

    static void _can1_MessageAvailable(ControllerAreaNetwork sender, ControllerAreaNetwork.MessageAvailableEventArgs e) {
        ControllerAreaNetwork.Message _msg = new ControllerAreaNetwork.Message(0x56, Encoding.UTF8.GetBytes("PolyLeft"));
        Debug.Print(">>> can_DataReceivedEvent <<<");

        // read as many messages as possible
        ControllerAreaNetwork.Message[] _mesasges = sender.ReadMessages();
        foreach (ControllerAreaNetwork.Message _message in _mesasges) {
            Debug.Print(new string(Encoding.UTF8.GetChars(_message.Data)) + " @ " + _message.TimeStamp.ToString());
        }
        sender.SendMessage(_msg);
    }

One of the gotcha’s I found was the line _can1.Enabled = true;. Here is the code for the Domino


using System;
using Microsoft.SPOT;
using GHIElectronics.NETMF.Hardware;
using GHIElectronics.NETMF.Net;
using Microsoft.SPOT.Hardware;
using GHIElectronics.NETMF.FEZ;
using GHIElectronics.NETMF.Net.NetworkInformation;
using GHIElectronics.NETMF.Net.Sockets;
using System.Text;
using System.Threading;

namespace PolyNCBetaUsbzi {
    public class Program {
        public static void Main() {
            Thread.Sleep(5000);

            System.Version ver = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
            DateTime BuildDate = new DateTime(2000, 1, 1) + new TimeSpan(ver.Build * TimeSpan.TicksPerDay + ver.Revision * TimeSpan.TicksPerSecond * 2);
            Utility.SetLocalTime(BuildDate);

            /////////////////////////////////////////////////////////////////////////////////////////////
            // Bitrate 125Kbps
            // CLK = 72 Mhz, with BRP = 24 -> 3Mhz CAN clock
            // 3Mhz/125Kbps = 24 TQ
            // T1 = 16 minus 1 for sync = 15
            // T2 = 8
            // 15 + 1 + 8 = 24 TQs which is what we need
            /////////////////////////////////////////////////////////////////////////////////////////////
            // uncomment to use this bit timing
            int BRP = 24;
            int T1 = 15;
            int T2 = 8;


            CAN _can2 = new CAN(CAN.Channel.Channel_2, (uint)(((T2 - 1) << 20) | ((T1 - 1) << 16) | ((BRP - 1) << 0)));   
            _can2.DataReceivedEvent += can2_DataReceivedEvent;
            _can2.ErrorReceivedEvent += can2_ErrorReceivedEvent;
            //WIZnet_W5100.Enable(SPI.SPI_module.SPI1, (Cpu.Pin)FEZ_Pin.Digital.Di10, (Cpu.Pin)FEZ_Pin.Digital.Di9, true);
            //Thread.Sleep(3000);
            //Dhcp.EnableDhcp(new byte[] { 0x00, 0x08, 0xDC, 0x01, 0x02, 0x03 }, string.Empty);
            //Socket udpSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Udp);
            //EndPoint remoteEndPoint = new IPEndPoint(IPAddress.Any, 80);
            //udpSocket.Bind(remoteEndPoint);
            //while (true) {
            //    if (udpSocket.Poll(-1, SelectMode.SelectRead)) {
            //        byte[] inBuf = new byte[udpSocket.Available];
            //        int count = udpSocket.ReceiveFrom(inBuf, ref remoteEndPoint);
            //        Debug.Print(new String(Encoding.UTF8.GetChars(inBuf)));

            //    }
            //}
            Thread.Sleep(Timeout.Infinite);
        }

        static void can2_ErrorReceivedEvent(CAN sender, CANErrorReceivedEventArgs args) {
            Debug.Print(">>> can_ErrorReceivedEvent <<<");

            switch (args.Error) {
                case CAN.Error.Overrun:
                    Debug.Print("Overrun error. Message lost");
                    break;

                case CAN.Error.RXOver:
                    Debug.Print("RXOver error. Internal buffer is full. Message lost");
                    break;

                case CAN.Error.BusOff:
                    Debug.Print("BusOff error. Reset CAN controller.");
                    sender.Reset();
                    break;
            }
        }

        static void can2_DataReceivedEvent(CAN sender, CANDataReceivedEventArgs args) {
            Debug.Print("Data Received");
            CAN.Message _msg = new CAN.Message(){
                  ArbID = 0x55,
                  IsEID = false,
                  IsRTR = false
            };
            byte[] _data = Encoding.UTF8.GetBytes("PolyRight");
            Array.Copy(_data, _msg.Data, _data.Length);
            _msg.DLC = _data.Length;
            CAN.Message[] msgList= new CAN.Message[100];
            // read as many messages as possible
            int count = sender.GetMessages(msgList, 0, msgList.Length);
            for (int i = 0; i < count; i++) {
                Debug.Print("MSG: ID = " + msgList[i].ArbID + " at time = " + msgList[i].TimeStamp);
            }

            sender.PostMessages(new CAN.Message[] { _msg }, 0, 1);
        }
    }
}

It doesn’t have an Enable feature, so I assume that once it has been declared it’s enabled. Based on the configurations I expect that the buses will have a speed of 125Kbps.

If the CAN bus configuration is mismatched in anyway on either device, could that prevent them from communicating? Is there anything that I missing about the code? I’ve obtained them from both sets of documentation (the 4.1 and 4.3). I’ve read most of the messages on this forum that regard CAN bus over the years, but I’m not sure if I am missing something. I am running on the assumption that I have hooked up everything correctly. I am predominantly looking for a way to tell if the µCs are connected correctly.