Page 1 of 1
CAN BUS hack with arduino
Posted: 20 Feb 2019, 22:18
by oscarboiro
Hello, I open this post to splain from my last investigation.
I have a arduino board with CAN BUS shiel.
830253B6-B411-45DC-87B1-2E5C9D947C07.jpeg
My firsts steps with this shiel are read all data of the can bus. MS and HS. Later after read a lot of numbers I identify some address and decode some options.
I have a complete wiring from Ford Kuga, with instrument cluster, sat nav, gem module etc. And I possible try a lot of codes. My first step after decode some datas is a remote control to change climate.
Later y use UCDS to read signals of can bus, and elmconfig to change configuration of travelpilot nx and read all adreddress. After decode and understand al digits I program in my arduino and make same modifies.
I’m very happy to discover this system, now my last mod are a emulator of radio Sony, and after push one button of my remote control I activate v2c without radio conected. Is very interesting to use with no genuine radios or navigator.
Sorry for my English I’m from Spain.
I try to upload video and show me a fail.
Best regards
B4D965ED-23CC-4FDB-BFDE-FB8CCD34EE57.jpeg
Re: CAN BUS hack with arduino
Posted: 21 Feb 2019, 09:38
by Go4IT
This is great stuff! (ups, Trump-Speech is not allowed here
I also looking forward to control the climate components.
I'm also glad not to be the only nerd having all those hardware at hand. I have an equal setup, but with Mondeo MK4 components.
CAN reverse engineering is one of my favorate passions too. We should find a way to share the CAN-IDs and the message-flows we detect!
My notes are on Excel spreadsheets and text documents, not highly structured and not ready for collaboration. Any ideas here?
We could make single posts per target, e.g. "How to controll the cluster", ...
Re: CAN BUS hack with arduino
Posted: 21 Feb 2019, 15:00
by oscarboiro
Hello!
I have some codes readed and saved, but i am a disaster and i have all writed on a paper. Except the climate control and sony radio.
In the Focus2, Cmax and kuga 1 the climate control orders use next address and numbers:
Address: 1D8
On/off: 01 00 00 00 00 00 00 00
Max: 10 00 00 00 00 00 00 00
Up Fan: 00 00 08 00 00 00 00 00
Down Fan: 00 00 18 00 00 00 00 00
Recirculation: 04 00 00 00 00 00 00 00
Air to feets: 00 01 00 00 00 00 00 00
Air to face: 00 04 00 00 00 00 00 00
Air to winshield: 00 10 00 00 00 00 00 00
AC on/off: 00 40 00 00 00 00 00 00
Auto: 40 00 00 00 00 00 00 00
Is possible mix all codes in the same line, example:
If you want activate climate and put max, you need next codes:
On/off: 01 00 00 00 00 00 00 00
Max: 10 00 00 00 00 00 00 00
After mix you obtain:
On/off and Max: 11 00 00 00 00 00 00 00
And same to all options. when the climate receibe the order, turn on or off, depend of the status.
To change degrees ned write in 2 different adress:
1D7 & 1D4
To calculate degrees use programmer calculator of windows, write in hex mode and change to Dec, the result is adouble of real degrees example:
2A is a 42 in decimal, later 42 / 2 = 21 degreees
2B is a 43 in decimal, later 43 / 2 = 21,5 degrees
Temp 20º: 28 00 00 20 00 00 00 00
Temp 21º: 2A 00 00 20 00 00 00 00
Temp 22º: 2C 00 00 20 00 00 00 00
Temp 20º: 2E 00 00 20 00 00 00 00
Temp 24º: 30 00 00 20 00 00 00 00
Temp passenger 20º: 00 00 00 28 00 00 00 00
Temp driver 20º: 00 00 00 00 28 00 00 00
From climate i have only thios information, from sony Radio, y read all codes, and y reply all with the same rate, and i only decrip some codes to send information to the cluster, i replace the radio info to my name to test, the navigation signals and little bit more.
The problen of arduino shiel is work with MS-CAN and HS-CAN at the same time, i need init arduino with one bus selected. Now i buy another shield to install 2 can bus shield and work with MS-CAN and HS-CAN. Mi next steps or ideas are:
-Start parking sensors when the speed down 10 km/h
-Simulate rear signal to activate camera in the travelpilot
-Made a cornering light option to turn fog lapm.
-Show in intrument cluster digital speed (use the radio information signal to show it)
the best option to my modifies is program all modules with custom software, but i dont have information to program, and next solution is use arduino and program a little aplications.
Regards!!!
Re: CAN BUS hack with arduino
Posted: 21 Feb 2019, 16:47
by Go4IT
The IDs on Mondeo MK4 (and also S-Max and Galaxy of the same generation) are different.
For example the temperatures for driver and passenger are in ID 0x285 and coded in different bytes (D2 and D3, 0-based offset).
The values seems to be the same, 0x28 equals to 20'C, 0x1F is "LO", 0x39 is "HI" and 0xFF is "OFF". 0x20 results in 16'C and 0x21 in 16,5'C. Strange byte representation for decimals. Usually they are transported in 10th exponents, simply decimal comma shifted.
BTW: i have activated the upload of mp4 and avi.
Re: CAN BUS hack with arduino
Posted: 21 Feb 2019, 23:06
by Stevebe
just thought i would throuh this in Arduino with MCP2515-can runing (see scope and see if you can work it out)
IMG_5780.JPG
DS4_QuickPrint3.png
Re: CAN BUS hack with arduino
Posted: 22 Feb 2019, 05:45
by Go4IT
Oh, i see from the pics that you already received the CAN2USB interface from Andi
But, what are you trying to show us? It looks like a valid CAN Signal for me.