
If I receive the same message again, I get the following: It has also correctly identified the message as corrupt because the calculated chkSUM doesn’t match the received chkSUM.

It’s failed to read the final byte, but my chkSUM routine has correctly calculated the checksum. This is what I get if I receive a 7 byte message (44 05 BF 74 04 00 8E) My chkSUM routine then fails to calculate. This causes the LENGTH byte to read the wrong value and the code tries to read in serial that doesn’t exist. If I receive messages longer than 6 bytes, it tries to read them before they have arrived and ends up missing them. If I receive messages less than 6 bytes it ignores them because of the: if (Serial.available()>=6) My code (below) currently works fine with 6 byte messages. I don’t actually need to respond to or act on any IBUS messages longer than 7 HEX bytes, but the car sends messages around the bus that can be over 20 HEX bytes. It listens for messages on the IBUS and adjusts the volume, responds to certain buttons and will eventually do a bit of audio source switching.įor the most part it actually works quite well, but falls over when the car transmits a long IBUS message.


My project is essentially an Arduino interface between the IBUS (data bus used to control the audio system and other non critical systems on older BMW cars) and an SPI controlled volume control circuit (based around the TI PGA2311 volume control IC).
#Bit serial data interface bmw parts full
Also note that my code is currently full of loads of mySerial.print and LCD.print commands.
#Bit serial data interface bmw parts software
This is my first attempt at any sort of software coding, so please try and look past any poor/strange uses of the code.
