Issues with a CAN bus setup

I currently have a fairly standard CAN bus configuration utilising two Arduino UNOs, two MCP2515 controllers and two MCP2551 transceivers. Both Nodes are terminated by 120 ohm resistors.

My issue is that when I set them up over a week ago they were communicating fine, sending packets back and forth with no issues. Yesterday when I reconnected them all I get is errors. The MCP2515 seems to initialise correctly and the loopback example provided with the library has no issues. This suggests there is an issue between the controller and transceiver.

I have gone ahead and swapped out the controllers, transceivers and Arduinos to no avail.

This is the library I’m using: MCP_library

When I have the opportunity I’ll examine it under an oscilloscope, until then any suggestions/ advice would be greatly appreciated.

Thank you very much in advance for any help provided.

Code I’m using for the moment:

//Send/ receive program v 0.1
//No id program or masks yet

#include <mcp_can.h>
#include <SPI.h>
#include <Math.h>

#define sample 500                    //this is how many samples the device takes per reading
float val;                            //where to store info from analog 6
int pin3 = 3;                         //output led

long unsigned int rxId;
unsigned char len = 0;
unsigned char rxBuf[8];
char msgString[128];                        // Array to store serial string

#define CAN0_INT 2                              // Set INT to pin 2
MCP_CAN CAN0(10);                               // Set CS to pin 10
//Time keeper
unsigned long OneSec = 0;
int Time = 500;
bool ErrorState = 0;


void setup()
{
  Serial.begin(115200);
  delay(1000);
  // Initialize MCP2515 running at 16MHz with a baudrate of 100kb/s and the masks and filters disabled.
  if (CAN0.begin(MCP_ANY, CAN_100KBPS, MCP_16MHZ) == CAN_OK) Serial.println("MCP2515 Initialized Successfully!");
  else Serial.println("Error Initializing MCP2515...");

  CAN0.setMode(MCP_NORMAL);   // Change to normal mode to allow messages to be transmitted
   pinMode(CAN0_INT, INPUT);                            // Configuring pin for /INT input
  //LED indicator
  pinMode(7, OUTPUT);
}

byte AlarmON[8] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07};
byte AlarmOff[8] = {0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
int hello;
void loop()
{
  if (millis() - OneSec >= Time) {
      sendMSG(AlarmON);
      OneSec = millis();
  }
  // Prevents rollover error after ~50 days
  if (OneSec > millis())
  {
    OneSec = 0;
  }
  // If CAN0_INT pin is low, read receive buffer
  // Interrupt sent by mcp2515 CAN controller
  if (!digitalRead(CAN0_INT))
  {
    RecMSG();
   }
 }

}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void sendMSG(byte msg[8])
{
  // send data:  ID = 0x100, Standard CAN Frame, Data length = 8 bytes, 'data' = array of data bytes to send
  byte sndStat = CAN0.sendMsgBuf(0x100, 0, 8, msg);
  if (sndStat == CAN_OK) {
    Serial.println("Message Sent Successfully!");
  } else {
    Serial.println("Error Sending Message...");
  }
}
//Receives the message and returns the first element
//Will use an array later
byte RecMSG()
{
  if (!digitalRead(CAN0_INT))                        // If CAN0_INT pin is low, read receive buffer
    CAN0.readMsgBuf(&rxId, &len, rxBuf);      // Read data: len = data length, buf = data byte(s)
  if ((rxId & 0x80000000) == 0x80000000)    // Determine if ID is standard (11 bits) or extended (29 bits)
    sprintf(msgString, "Extended ID: 0x%.8lX  DLC: %1d  Data:", (rxId & 0x1FFFFFFF), len);
  else
    sprintf(msgString, "Standard ID: 0x%.3lX       DLC: %1d  Data:", rxId, len);

  Serial.print(msgString);

  if ((rxId & 0x40000000) == 0x40000000) {  // Determine if message is a remote request frame.
    sprintf(msgString, " REMOTE REQUEST FRAME");
    Serial.print(msgString);
  } else {
    for (byte i = 0; i < len; i++) {
      sprintf(msgString, " 0x%.2X", rxBuf[i]);
      Serial.print(msgString);
    }
  }
  Serial.println();
 }