Hello folks
I'm new to arduino, so please be gentle
Ive only been playing with these for a week now. I purchased a new 2014 E89 BMW Z4 recently without iDrive. My current project (I'm a mechanical engineer by trade, and enjoy this kinda stuff) is to replace the dash storage bin with a 7" Android tablet as a media centre.
Ive got a tablet sorted, got Tasker & all of its commands sorted. Also have the Arduino (have Leonardo, Uno & HC-05) able to send key codes to the tablet to do what I want them to do using external push buttons... so good so far.
Stumbling block is my desired method for input. I have a 2013 BMW 3 series iDrive controller (the one with Media, Nav, Menu, Radio & Tel on the front face) which will fit in the proper recess in my centre console that I would like to use as the controller for the tablet. All it needs to do is give out its 14 signals to do something (Media, Menu, Tel, Nav, Radio, Knob depress, Left, right, up, down, clockwise, anti clockwise, back and option)
The vehicle is obviously CAN enabled and from my research that I have gathered so far that the module is "CON", it is on the K-CAN which runs 100 kbps and potentially, the node is 4E7 or 5E7
I also have the Seeedstudio CAN Shield v1.0. I have installed the libraries from github and uploaded the CAN receive check sketch. Wiring wise, I have a 12v 1A power supply feeding a breadboards +/- rails, with the iDrive controller taking a VIN & GND, swell as the D-Sub Pins taking a VIN & GND. I then have two additional cables connecting CANH & CANL from the iDrive controller to the D-Sub port.
With that said, and the Arduino UNO plugged into my mac via USB, the serial logger registers "8}" followed by the "CAN BUS Shield init ok!" message expected from the program, although I'm not sure what the "8}" is all about. I have changed the sketch to be:
if(CAN_OK == CAN.begin(CAN_500KBPS))
Became
if(CAN_OK == CAN.begin(CAN_100KBPS))
However I am not getting any data at all via the serial monitor. The CAN Shield and Arduino register nothing.
If I setup an analog read sketch and run the CANH wires via A0, I do pick up voltage ups & downs when buttons are pressed. Also, If I setup the iDrive controller and run a LED back to ground via CANH, the LED lights up for 9 seconds when any button is pressed (Except for CW, CCW, Left, Right, Up or Down which don't light up). This would all suggest that the controller is sending something out, but the monitor can't see it.
Any ideas or help would be greatly appreciated
Matt