VERY interesting video - Custom touch screen works through canbus/node on Jag XF
#1
![Default](/forum/images/icons/icon1.gif)
Found this on the carhacking subreddit: https://www.reddit.com/r/CarHacking/...g_car_through/
Here's the text from the creator:
So today I have done some testing on the program. All current functions are working, so there's nothing stopping me replacing the panel with the touchscreen and then running Android Auto.
My next steps are to physically install the Raspberry Pi and touchscreen. I have fitted it once and it is a perfect fit in the gap. I just need to get a decent 12v to 5v converter and sound card.
Once installed I'm going to begin to start on the high-speed can bus, get some engine info, miles per gallon etc.
Ultimate goal will be to utilize aws, so when you finish the journey the system will upload trip info, miles per gallon, distance etc etc and then those will get stored per user. It's kind of what jag does in the newer cars (and many other makes I imagine).
Going to get a site going with details instructions etc.
There's a node.js project to that does CAN communcation on this level. There's an npm package called node can. My program including express server and static html is all on my git (I need to do a new push)
The readme is out of date too, but the app folder has what you want: https://github.com/rhysmorgan134/JaguarXf_CAN
Here's the text from the creator:
So today I have done some testing on the program. All current functions are working, so there's nothing stopping me replacing the panel with the touchscreen and then running Android Auto.
My next steps are to physically install the Raspberry Pi and touchscreen. I have fitted it once and it is a perfect fit in the gap. I just need to get a decent 12v to 5v converter and sound card.
Once installed I'm going to begin to start on the high-speed can bus, get some engine info, miles per gallon etc.
Ultimate goal will be to utilize aws, so when you finish the journey the system will upload trip info, miles per gallon, distance etc etc and then those will get stored per user. It's kind of what jag does in the newer cars (and many other makes I imagine).
Going to get a site going with details instructions etc.
There's a node.js project to that does CAN communcation on this level. There's an npm package called node can. My program including express server and static html is all on my git (I need to do a new push)
The readme is out of date too, but the app folder has what you want: https://github.com/rhysmorgan134/JaguarXf_CAN
Last edited by TraxtarXKR; 11-11-2019 at 12:07 PM.
#2
#3
#4
![Default](/forum/images/icons/icon1.gif)
More info from the user's post history:
https://www.reddit.com/r/CarHacking/..._story_so_far/
Firstly my background I'm currently an industrial software engineer, began as a maintenance engineer, moved onto controls/automation engineer, and now I'm here.
I began looking into canbus hacking when I was fed up with the screen in my jag being from 2009, for it's time it's awesome, but now days its ancient. My original idea was to replace the screen with a raspberry pi (running open auto pro), however on further research, I have since found out that with the MOST bus it's pretty impossible as it's linked to EVERYTHING. So at first I settled for going with something along the lines of a pi mounted up on the dash board above the screen. It worked, but looked a bit garish. So then I thought about laying it over the screen, for which I would need some can signals, so the decoding began, first with the media control panel
Then integrating these to the raspberry pi running open auto (one pi has a pican2 sat on the can network, this also acts as a wireless hotspot, and mqtt broker listening for certain messages then publishing over mqtt, the open auto pi is then subscribed and on a message emulates a key press which in turn controls the screen...PHEW)
At this point I got a message on Facebook from someone who had seen the project who was looking to do a similar thing, but with the screen mounted where the audio controls are. I hadn't even thought of this, but made perfect sense, and I had already decoded all the buttons...however...on the buttons for heated windscreen etc there are indicator lights, these lights are sent as a status to the control panel, and I could not for the life of me figure out these messages. As soon as a button is pressed for these there so much instantaneous traffic it's hard to tell what's what. So at this point we buy the freelander, and the set up inside of this is just asking for the above, without any of the can bus worries, so a couple of months goes by where I'm working on the freelander.
Back to this week, determined to do it, I begin trying to reverse engineer anything inside SDD that may give some clues, I've found quite a bit of info, but nothing helped, I purchased a control panel off of eBay for some bench testing.
So today I decide to begin writing my own canbus decoding software, my language of choice is JavaScript, using the nodejs framework. And......it worked, I now have all the responses needed.
What the software does, is you initially run it, and not only logs all can messages, but it also logs the byte value against the ID, now this runs for a bit, when it gets to a low amount of new bytes (the jag was 4, I assume some time based ones that will always be new) you hit enter and then press the button, now in the case of heated front windscreen, the software would not of seen the response byte value on its ID before, so this now gets logged to a new variable. So you now stop the program, all potential candidates now get written to a JSON file that you can then look through. I need to do some touching up to the software but it will be on my git, along with everything else i find out, including decoded IDs (I need to update it)
Found here: https://github.com/rhysmorgan134/JaguarXf_CAN
Anyway, a video messing about with the fully decoded control panel, just for ***** and giggles
Anyway, next steps are to create a UI to replace the control panel, then begin installation.
Then another comment in that thread of him testing his GUI:
So first testing of the UI today, went pretty well, created a pretty nice system that links canbus messages to the socket commands that modify the html, commands are stored in a JSON with byte offset etc, so adding commands and triggers will just be a case of adding to the JSON, as you can probably tell I'm not a graphic designer ����, but will re visit the looks once it's all functioning
https://www.reddit.com/r/CarHacking/..._story_so_far/
Firstly my background I'm currently an industrial software engineer, began as a maintenance engineer, moved onto controls/automation engineer, and now I'm here.
I began looking into canbus hacking when I was fed up with the screen in my jag being from 2009, for it's time it's awesome, but now days its ancient. My original idea was to replace the screen with a raspberry pi (running open auto pro), however on further research, I have since found out that with the MOST bus it's pretty impossible as it's linked to EVERYTHING. So at first I settled for going with something along the lines of a pi mounted up on the dash board above the screen. It worked, but looked a bit garish. So then I thought about laying it over the screen, for which I would need some can signals, so the decoding began, first with the media control panel
Then integrating these to the raspberry pi running open auto (one pi has a pican2 sat on the can network, this also acts as a wireless hotspot, and mqtt broker listening for certain messages then publishing over mqtt, the open auto pi is then subscribed and on a message emulates a key press which in turn controls the screen...PHEW)
At this point I got a message on Facebook from someone who had seen the project who was looking to do a similar thing, but with the screen mounted where the audio controls are. I hadn't even thought of this, but made perfect sense, and I had already decoded all the buttons...however...on the buttons for heated windscreen etc there are indicator lights, these lights are sent as a status to the control panel, and I could not for the life of me figure out these messages. As soon as a button is pressed for these there so much instantaneous traffic it's hard to tell what's what. So at this point we buy the freelander, and the set up inside of this is just asking for the above, without any of the can bus worries, so a couple of months goes by where I'm working on the freelander.
Back to this week, determined to do it, I begin trying to reverse engineer anything inside SDD that may give some clues, I've found quite a bit of info, but nothing helped, I purchased a control panel off of eBay for some bench testing.
So today I decide to begin writing my own canbus decoding software, my language of choice is JavaScript, using the nodejs framework. And......it worked, I now have all the responses needed.
What the software does, is you initially run it, and not only logs all can messages, but it also logs the byte value against the ID, now this runs for a bit, when it gets to a low amount of new bytes (the jag was 4, I assume some time based ones that will always be new) you hit enter and then press the button, now in the case of heated front windscreen, the software would not of seen the response byte value on its ID before, so this now gets logged to a new variable. So you now stop the program, all potential candidates now get written to a JSON file that you can then look through. I need to do some touching up to the software but it will be on my git, along with everything else i find out, including decoded IDs (I need to update it)
Found here: https://github.com/rhysmorgan134/JaguarXf_CAN
Anyway, a video messing about with the fully decoded control panel, just for ***** and giggles
Anyway, next steps are to create a UI to replace the control panel, then begin installation.
Then another comment in that thread of him testing his GUI:
So first testing of the UI today, went pretty well, created a pretty nice system that links canbus messages to the socket commands that modify the html, commands are stored in a JSON with byte offset etc, so adding commands and triggers will just be a case of adding to the JSON, as you can probably tell I'm not a graphic designer ����, but will re visit the looks once it's all functioning
#6
![Default](/forum/images/icons/icon1.gif)
So the natural question is, and it appears he answered it, ALL controls on the touchscreen are now executable on the tablet/ RPI? Then the next question is, does the XF coding that he's done plug and play with the X150? I'd sure love that.
The XF head units are the same size so whatever tablet he has would work. Will he mass produce or provide something we can adopt?
For me, I get lost in Canbus so I would have to have it done for me.
It's a very interesting project.
I'd be happy with an option Cambo mentions in post 2 -
"But if you want to do new things on the factory touchscreen, the software / operating system in the touchscreen has been more or less fully reverse-engineered, so it's possible to alter the menus, images, etc
All of the WinCE library for the screen operating system has been disassembled, and a modified OS can be loaded by USB stick directly to the screen."
The XF head units are the same size so whatever tablet he has would work. Will he mass produce or provide something we can adopt?
For me, I get lost in Canbus so I would have to have it done for me.
It's a very interesting project.
I'd be happy with an option Cambo mentions in post 2 -
"But if you want to do new things on the factory touchscreen, the software / operating system in the touchscreen has been more or less fully reverse-engineered, so it's possible to alter the menus, images, etc
All of the WinCE library for the screen operating system has been disassembled, and a modified OS can be loaded by USB stick directly to the screen."
Last edited by Sean W; 11-11-2019 at 01:46 PM.
The following users liked this post:
TexasTraveler (11-11-2019)
#7
Trending Topics
#8
![Default](/forum/images/icons/icon1.gif)
This will be awesome and would really bring us up to date with tons of options. Seems like he is really close to having it all figured out and as best I understand there is not much difference to our XKs. Part I am not sure about is did he hit a wall with removing the old touch screen and planning on replacing the knobs and button controls below the screen with a 2nd screen that can replace all that functionality or is he still trying to crack the idea of swapping out the touchscreen?
#9
#10
![Default](/forum/images/icons/icon1.gif)
This is a huge upgrade, much anticipated. What is the reasonable ETA ? Removing the 3 buttons below the screen, fitting a large good quality android tablet to fill the complete space, with sturdy fasteners, and a good quality trim piece to make it look OEM would be fantastic. This will add another level of functionality to our cars.
#11
![Default](/forum/images/icons/icon1.gif)
He's been at it for 6 months but writes the hard parts done. I would think he'd have something viable for complete DIY'ers in a few months. But as for kits, that's another story and he really hasn't committed to it, though it's his goal. Pricing will be the driver for most of us. The other is reversibility as with any mod but from what I'm seeing, he isn't removing any existing code so removal could be as simple as swapping out the head unit.
#13
Thread
Thread Starter
Forum
Replies
Last Post
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)