I’m trying to log CAN BUS traffic to try diagnosing an intermittent lighting fault, and to play about, so I bought an M2 UTD (nice hardware, by the way).
It seems to me that the M2RET project is almost ready-made to do that, and it’s probably a good start. The trouble is that it seems to do run and complete the setup(), and then it gets stuck…somewhere.
I’ve followed the M2RET guides, and I can successfully write to the board/blink lights etc… It’s just that output to the SDCard never seems to occur, and I never seem to see more than the following in the serial monitor:
Using stored values from EEPROM
Using stored values for digital toggling system
Running on Macchina M2 hardware
MS: SD card detected!
MS: Bus clock: 128
MS: Bus width: 1
MS: Card type: SDHC
Build number: 339
Enabled CAN0 with speed 500000
Done with init
That’s the only output I get from M2RET so far.
I’ve tried formating the 4GByte SDHC card as both FAT16 and FAT32 on a single partition, but there are no files created, whether I use just the serial interface or plug it into my car and create some CAN traffic (well, I assume there’s traffic, but I have no proof). No lights light up on the M2 at all, suggesting it’s not receiving any packets.
Now I’m stuck - does anyone have any experience with M2RET, or any other place to look? This is using Arduino 1.8.6 with the M2 board definitions by the way. I can run other sketches to blink the 5 LEDs etc, but this is the only thing I’ve tried which will use both the OBD2 and SD card interfaces.