Skip to content

rhysmorgan134/JaguarXf_CAN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jaguar XF Canbus Decoding/linux integration

This project is designed to replace the integrated touchscreen in the X250 Jaguar XF. This app is designed to be used with an android auto wrapper (I recommend intelligent auto)

The latest video can be found here XF CAN example

Buy Me A Coffee

Hardware

Installing

install the Waveshare can hat

Boot up the pi, install can utils

sudo apt-get -y install can-utils libsocketcan2 libsocketcan-dev

modify /boot/config.txt add this to the end

#CAN bus controllers
dtparam=spi=on
dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=23
dtoverlay=mcp2515-can1,oscillator=16000000,interrupt=25

Reboot

Bring up the can0 interface

sudo /sbin/ip link set can0 up type can bitrate 125000 //highspeed can for engine comms is 500000 baud
sudo /sbin/ip link set can1 up type can bitrate 500000

To allow the CAN channels to come up on boot, modify rc.local

sudo nano /etc/rc.local

Paste before the end

sudo /sbin/ip link set can0 up type can bitrate 125000
sudo /sbin/ip link set can1 up type can bitrate 500000

Wiring the connector

To communicate to the canbus through the obd2 port, you need to solder two connections to the obd plug, one will go on pin 3 (CAN High) the other will go to pin 11 (CAN Low) for medium speed, these then wire to the corresponding terminal on the piHAT, ensure the polarity is correct and the pins are correct.

Receiving data

With the pi booted up, and SSH'd into, plug the connector to the OBD port, run this command

ifconfig

you should see an interface called can0, if not re run this command

sudo /sbin/ip link set can1 up type can bitrate 125000
sudo /sbin/ip link set can1 up type can bitrate 125000

to test data run

candump can0

if the headunit is powered on, you will now be flooded with messages, ctr+c will stop the program. you have now successfully connected. To begin decoding messages, run

cansniffer can0

after a few seconds this will only display messages with changing values, around 10-20, if you begin to press buttons, the message will pop up as the values have changed, it is now just a case of figuring out what means what. if you run the command

cansniffer

it will display help of extra parameters you can use to help in decoding.

Launching the app

With both can channels up and active, navigate to the /install folder, in here will be a file called jag-hu.AppImage, to run type in the terminal ./jag-hu.AppImage

Built using

https://github.com/sebi2k1/node-can

everything is done at your own risk

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published