Custom Kodi and BMW interface


Note this only works on BMW automobiles
Bus communications has been extensively documented over the years.
Purchased an custom interface which sits on the bus and is seen on the head unit.  (~$300 or so).
This inteface has a display item on the HU and taps in to aux audio.  (DSP also).
The BMW Bus interface is written in Python and reads the NAV-Radio buttons in the dash and on the wheel controls.
The PC OS can be Windows, Linux or Android.  Here using Linux.
Hardware required:
1 - Ibus Interface  $~300.00  - connects to the serial bus and audio aux - has two video outputs - one for an aux monitor and one for HU.
2 - PC - can be an RPI Arm based or TV Box or Intel based PC
Sofware used:
1 - Kodi LibreElec
2 - Confluence - BMW theme
3 - BMW Bus plugin


Author has configured a special tab on the custom Confluence-BMW Kodi theme.  This tab is called "Board-Monitor" which mimics the status of the built in to HU computer monitor only it has a few extras. 
One window is a combo speedo, tach.
Kind of interesting that I can connect remotely to the Kodi box and control all sorts of stuff in the vehicle and get geolocation data.  I can turn lights on, move mirrors, open and close windows, et al.  I could do this before but much easier now using the Python script written for KODI.


Update 3rd of March, 2020
  • Added a network / microrouter / VPN to home configuration to Kodi CarPC. 
  • Adding new TPMS (tire pressure monitoring system).
The guy that wrote the new Kodi interface is writing a python script for interfacing and displaying TPMS on KODI.
The automobile has TPMS with an indicator of low tire pressure (not really specific).
The KODI Board-Monitor pages connect to the car vitals computer - speedo, tach, oil pressure, temp, GPS, lights, windows, cameras, et al.


Here are a couple of the CarPC KODI screens.

Note that the author has built an RPi with an addition video / audio interface on an Arduino over the RPi.
Tiny thing.



16th of March, 2020
Added a GLiNet micro travel router a couple of weeks ago.
MiniPC ==> Travel Router via NIC LAN port
Travel router ==> autoconnects to Cellular phone when in smart phone is in Hotspot mode.
Using VPN access to Home for security / CCTV / automation displays.
Changed ignition coils / plugs this week.  Learning experiment.  Easier to do than the Lexus.  Purchased everything from Amazon. By accident purchased counterfeit NGK spark plugs.  (IE: made in China clones versus made in Japan).
Updated old CDRom Navigation unit in old 330XI to new DVD Rom navigation.  (primitive OEM stuff).  Adding this update to the Bluetooth ULF updating.


30th of March, 2020
Installed tire pressure caps for the TPMS system.  A bit larger looking then I want. 
May order the internal pressure sensors.  These will replace the current "dummy light" pressure sensors in the automobiles.  
Interesting device.  Uses radio for each sensor and plugs in to Android head unit as designed.
Here the Android head unit is Kodi running in Linux.  The device just speaks serial out the USB port which is converted to a Kodi page for monitoring.


14th of May, 2020
Project on hold as I ordered a new TPMS system from China and it is sitting at the Chicago USPS main office.  Well now it's been over a month.
New automotive project here.  Ordered up a set of Brembo pads and discs from a domestic supplier which I am installing on the SUV this weekend. 
Amazon 1-Day delivery.
Also ordered a new LED shop light.  50 watts and blinding light.  Great stuff. Good price.


Update June 13, 2020
Built a replicate of SUV CarPC (Kodi) for automobile as it is using same 3rd party interface (from Germany).

IE: same motherboard, CPU and RAM. The old set up was using an Intel Atom D525. Many folks are now using RPi's to do this. My preference is the PC with two SSD drives. One is a 32Gb boot drive and the other is a 1Tb media storage drive. I sync the media to the house NAS via wireless which works great. I also have a USB port in the front of the vehicle to add or play media. Might switch this to a USB 3.0 port.
I did add a micro travel router with a wired NIC and a wireless AP / client to the pcs.  This enables the car PC to automagically connect to the smart phone.
Note that this interface connects to the bus and video of the automobile for display menu.  It will also connect to the ODB2 combo WLAN / Bluetooth sensor.
I never received my TPMS system from China.  It is being held in customs and they will not release it for shipping to my home.
I am having difficulties getting a refund so just ordering another one from Amazon.


20th of August, 2020  
Finally got the TPMS system ordered from China from OP above.  
Installed it and it is working well. Note this is a Python script plugin for KODI running on carpc.  


12th of September, 2020
Problems here with two ttyUSB devices now being utilized for the carpc.  
1 - automotive bus controller
2 - TPMS radio
Added more USB devices:
1 - active USB extender to front glove compartment
2 - passive USB extender to center console
3 - micro router power 
Sometimes the above two devices boot out of order.
This past week fixes for LibreElec (would the the same for CoreElec) KODI.
1 - statically assigning a USB port for bus connection.  If the the bus connection doesn't work then I get no controls or video on the HU.
First found the device ID typing

udevadm info --name=/dev/ttyUSB0 --attribute-walk

Typically on Linux you create a file called /etc/udev/rules.d/99-usb-serial.rules

which is:

KERNEL == "ttyUSB *", ATTRS {idVendor} == "10c4", SYMLINK + = "IBUS"

Call the symlink anything you want.

The rule though resides here:

BMW-LibreELEC: / dev # cd /storage/.config

BMW-LibreELEC: ~ / .config # ls
aacs modules-load.d sysctl.d
boot.status procps system.d
hosts.conf pulse timesyncd .conf.d
htop pulse-daemon.conf.d tmpfiles.d
hwdb.d rc_keymaps udev.rules.d
iptables rc_maps.cfg.sample wireguard
logind.conf.d samba.conf.sample
modprobe.d sleep.conf.d

BMW-LibreELEC: ~ / .config # cd udev.rules.d
BMW-LibreELEC: ~ / .config / udev.rules.d # ls
99-usb-serial.rules README

This file is the RW configuration file. Reboot and check to see the symlink under / dev

Then configure the Kodi IBus interface to the symlink.
2 - Purchased an automotive type 12 VDC USB hub - Startech industrial 7 port USB 2.0 hub model # ST7200USBM