Python script to capture BMW iDrive CANbus messages and simulate predefined keyboard strokes. I used to integrate BMW F10 idrive rotary controller into OpenAuto (Crankshaft project) Android auto solution. Demo video in action on youtube
- python-can library - for cature of CAN bus messages.
- uinput library - for simulation of keyboard input. This method acts as virtual keyboard.
- Raspberry pi board
- cheap MCP2515 board. Keep in mind that you need to connect board VCC to Raspberry 3.3V pin, not 5V pin. It works fine.
- power supply to power raspberry pi from car
Run supplied setup.sh
script or analyze it and do it manually.
Make sure to enable keyboard keys in Crankshaft Settings Input tab
Idrive key bindings to OpenAuto keyboard keys:
KEY_UP # up KEY_ESC # up hold KEY_DOWN, # down KEY_H, # down hold (Home) KEY_0, # release KEY_ENTER, # press enter KEY_1 # rotary knob rotate counter clock KEY_2 # rotary knob rotate clockwise
- Very detailed and nice tutorial how to connect everything. Note, that board modification isn't needed. It works fine of 3.3V PIN.