Advertise on DISCO3.CO.UK
Forum · Gallery · Wiki · Shop · Sponsors
DISCO3.CO.UK > In Car Electronics (D3)

Replacing the navigation/4x4 computer with a new device
Post Reply  Down to end
Page 1 of 2 12>
rubot
 


Member Since: 16 Mar 2016
Location: San Diego, California
Posts: 27

United States 2008 LR3 4.4 V8 HSE Auto Chawton WhiteLR3
Replacing the navigation/4x4 computer with a new device

Bits and pieces of information related to this topic are sprinkled all over the place. I thought it might be prudent to create a specific topic to consolidate discussion.

For the background see these posts:
http://www.disco3.co.uk/forum/topic102801-30.html
http://www.disco3.co.uk/forum/topic10808.html
http://www.disco3.co.uk/forum/topic53084.html
http://www.freel2.com/forum/topic21783.html

Goal: replace the navigation/4x4 computer with a new device.

Personally I don't find the on board navigation useful. There are many more useful applications available for my PC, tablet, or phone. I think it would be fairly easy to find a new device that could fit as a replacement...but its not that simple. In addition to the navi data the same device is used to display useful suspension information. Which i still want access too. So the discussion here pertains to acquiring the data we want and consuming it in a user interface or application of our choosing.
  
Post #165616117th May 2016 7:31 pm
View user's profile Send private message View poster's gallery Reply with quote
rubot
 


Member Since: 16 Mar 2016
Location: San Diego, California
Posts: 27

United States 2008 LR3 4.4 V8 HSE Auto Chawton WhiteLR3

So I’ve had some success capturing can bus messages. Here is my setup:

Hardware – I’m using a Sparkfun Redboard (essentially the same as an Arduino Uno Rev 3) and the Sparkfun Can Bus Sheild. Please see the CAN-Bus Shield Hookup Guide tutorial for specifics: https://learn.sparkfun.com/tutorials/can-bus-shield-hookup-guide. In Sparkfun’s tutorial you will find a parts list. I’m using everything on the parts list with the exception of the GPS and LCD. I also deviated from the tutorial when it came to the code (more on that later). The hardware was very simple to get up and running. If you buy from Sparkfun, you will need to solder the headers to the can bus shield so don’t forget to buy them. The biggest limitation is that this hardware can only connect to one can bus at a time, which is the high speed can bus with the out of box configuration. To connect to the others you will need to do some rewiring of the receptacle, cable, or something else. If you desire concurrent connections to multiple can bus you will need multiple Arduino/can bus shield devices or a shield that can interface with multiple busses (more on that someday in the future).

Code – So I’ve made many iterations of my code trying to get the exact data I am interested in. Most of those iterations were not fruitful. In fact, based on some comments from Alex_Pescaru here: http://www.freel2.com/forum/topic21783.html I am changing tacks once again. So I am not quite ready to post code just yet unless someone has all the hardware assembled and needs a jumpstart. There is nothing really complicated about the code, mostly just a few short lines. One important note is that I was never able to get the sparkfun can bus shield library to function correctly. I’m not sure what the problem was but I didn’t work for me. My general coding strategy has been to write captured messages to the SD card on the shield since I do not believe serial/usb or Bluetooth/wifi are fast enough to prevent missing messages. I separate the messages and message values with a comma when I write them so I can easily open the file in excel for analysis. Here is an example:

So great, I end up with an SD card full of can bus messages I can open in excel…now what…? My strategy right now is to focus on finding the messages containing the 4x4 screen information. I spent a lot of time trying to associate message IDs with ECUs and such but I found it isn’t quite that simple. Turns out there are many more IDs in use by messages than there are ECUs. So now I’ve decided to try and identify new messages that occur when I interact with the vehicle. For example, isolating the messages that occur when I change the suspension mode. I’m currently rewriting my Arduino code to do this and will post when I have an update.
  
Post #165619917th May 2016 8:10 pm
View user's profile Send private message View poster's gallery Reply with quote
parrafin23
 


Member Since: 04 Dec 2011
Location: Buskeud
Posts: 681

Norway 2005 Discovery 3 TDV6 Commercial Auto Java BlackDiscovery 3

Cool that you have got'n this far.. i just picked up my uno R3 with the Atmel chip. I think the crystal is @16MHz and a LCD Keyboard Shield along with a Starter-kit.. Waiting for the Canbus shield to arive. I downloaded the Sketch and triend the example Blink to see if it worked, and It did.. So i know its working

This is the one I got :




Click image to enlarge


And teh Lcd keyboard Shield :



Click image to enlarge



This will be fun.. I have seen on the Norwegian forum, a bloke modified the hvac on a RR, with this Uno R3, connected it to a touch screen so the unit replaces the front panel.. and it just works.. Defrost, heater front and read, fan, temperature, stepper motors and what not.. it Brilliant!

So.. sniffin out the Canbus on the touch screen.. this comes from the dvd drive under the seat..Pin 14, Yellow (Can H) and pin 15 (Can L) this is found on the back of the screen.. Connector 2819.
You can start sniffin there.. I have no Idea what speed it runs on. This has to be figgured out first before you can get any reading on the bus it self.

Mr.P
  
Post #165662218th May 2016 6:09 pm
View user's profile Send private message View poster's gallery Send e-mail Reply with quote
rubot
 


Member Since: 16 Mar 2016
Location: San Diego, California
Posts: 27

United States 2008 LR3 4.4 V8 HSE Auto Chawton WhiteLR3

parrafin23 wrote:
This will be fun.. I have seen on the Norwegian forum, a bloke modified the hvac on a RR, with this Uno R3, connected it to a touch screen so the unit replaces the front panel.. and it just works.. Defrost, heater front and read, fan, temperature, stepper motors and what not.. it Brilliant!
That sounds cool, can you post the link? I'd like to read it. In the back of my mind, after i replace the 4x4 screen, i've imagined extended what we learn to replace other components such as the AC controls, door locks, etc...

parrafin23 wrote:
sniffin out the Canbus on the touch screen.. this comes from the dvd drive under the seat..Pin 14, Yellow (Can H) and pin 15 (Can L) this is found on the back of the screen.. Connector 2819.
You can start sniffin there.. I have no Idea what speed it runs on. This has to be figgured out first before you can get any reading on the bus it self.

I’m connecting to the high speed bus via the diagnostic port located on the left under the steering wheel. Same you would use for reading OBDII error codes. My cable is wired for pins 6 and 14. This corresponds to the high speed can bus. I’ll have to dig and see what pins correspond to the medium speed bus…assuming it also terminates there.

Not all ECUs exist on multiple busses. For example, the air suspension ECU is on the high speed can bus. I believe the DVD changer connector you are using is on the medium speed bus. alex_pescaru made a nice list here http://www.disco3.co.uk/forum/topic102801.html for reference where H is the high speed bus and L is the medium speed bus:
alex_pescaru wrote:

H 0x1C All Terrain Terrain Resp
H 0x15 Cruise Control Acc Cruise
H 0x60 Instrument Pack Inst Pack
H 0x2A Park Brake Park Brake
H 0x10 Eng Management Engine Mgt
H 0x58 Airbag Airbag
H 0x1A Rear Diff Rear Diff
H 0x2B Eas Air Suspension
H 0x32 Steering Angle Stg Angle Sens
H 0x19 Transfer Case Transfer Box
H 0x18 Transmission Auto Gearbox
H 0x20 Abs / Etc
H 0x70 Front Light Afs Head Light
H 0x2C Arcm Ride Control
H 0x5A Ocs Occupant Sens
L 0x80 Head Unit Audio Head
L 0x0F Fbh Fbh Heater
L 0x52 Cjb Body Control
L 0x98 Hevac Hevac
L 0xB2 Pdc Park Aid
L 0xDA Tpm Tyre Pressure
L 0x6D Rdum Dock Module
L 0xC0 Vim Immobilizer
L 0x9C Dcsm Seat Hevac
L 0xBA Rbm Elec Side Step
L 0x99 Rhvac Rear Hevac

That being said, I don’t think you will see messages containing the data displayed on the 4x4 screen on the medium speed bus... Although I am not absolutely sure on this point. You LCD shield is cool. The can-bus shield also has “buttons” on it. Actually just a joy stick but possible up to five inputs. I found these buttons useful, as you may with those on your LCD shield, for starting recording or playback sessions or other interactions. Working on a new iteration of my code. Will post it soon.

oh, this might be useful. its a diagram of the Module Communication Network. It shows which bus each module is on: https://onedrive.live.com/redir?resid=29AB...file%2cpdf. Pages 180 - 186 of this https://onedrive.live.com/redir?resid=29AB...file%2cpdf has detailed wiring of the network including wire colors and pin outs.

Let me know if you have trouble downloading.
 

Last edited by rubot on 18th May 2016 8:02 pm. Edited 1 time in total 
Post #165668118th May 2016 7:53 pm
View user's profile Send private message View poster's gallery Reply with quote
audiobull
 


Member Since: 23 Apr 2016
Location: UK
Posts: 384

United Kingdom 

deleted
 

Last edited by audiobull on 3rd Jun 2016 6:55 pm. Edited 1 time in total 
Post #165668518th May 2016 8:00 pm
View user's profile Send private message View poster's gallery Reply with quote
parrafin23
 


Member Since: 04 Dec 2011
Location: Buskeud
Posts: 681

Norway 2005 Discovery 3 TDV6 Commercial Auto Java BlackDiscovery 3

I donwloaded the .pdf files 9.9Mb,Download time 950ms, God I love Fibre connection!!!!

Anyways.. I think you mis understoof me.. about medium speed stuff.. Im talkin about the private canbus between the touch screen and the dvd drive :


Click image to enlarge


Here is the we have to fund the related and intresting stuff, Some other stuff will be here too, but No other ecu will be transmitting on this bus. makes it a tad more easy to figure out the info..

Mr.P
  
Post #165675319th May 2016 4:49 am
View user's profile Send private message View poster's gallery Send e-mail Reply with quote
rubot
 


Member Since: 16 Mar 2016
Location: San Diego, California
Posts: 27

United States 2008 LR3 4.4 V8 HSE Auto Chawton WhiteLR3

parrafin23 wrote:
Here is the we have to fund the related and intresting stuff, Some other stuff will be here too, but No other ecu will be transmitting on this bus. makes it a tad more easy to figure out the info..


Yes, ok, good idea. I see where you are going with this. I was pulling out what's left of my hair trying to sort through thousands of messages. Connecting to that bus would probably significantly reduce the number of messages and would allow us to determine the touchscreens ID(s). Maybe another strategy would be to connect directly to a target ECU...possibly then you could see what it is broadcasting? I'm not sure if that would even work.
  
Post #165713420th May 2016 12:06 am
View user's profile Send private message View poster's gallery Reply with quote
parrafin23
 


Member Since: 04 Dec 2011
Location: Buskeud
Posts: 681

Norway 2005 Discovery 3 TDV6 Commercial Auto Java BlackDiscovery 3

Have you checked out this link Rubot : http://www.seeedstudio.com/wiki/CAN-BUS_Shield

Im still waiting for the CanShield ..


Mr.P
  
Post #165731320th May 2016 3:50 pm
View user's profile Send private message View poster's gallery Send e-mail Reply with quote
rubot
 


Member Since: 16 Mar 2016
Location: San Diego, California
Posts: 27

United States 2008 LR3 4.4 V8 HSE Auto Chawton WhiteLR3

Yes, I've seen it. It's based on the same chip as the sparkfun shield. The only reason I chose the sparkfun shield because the shipping time was less to my location. Both would work well and can use he same code.
  
Post #165731920th May 2016 4:16 pm
View user's profile Send private message View poster's gallery Reply with quote
parrafin23
 


Member Since: 04 Dec 2011
Location: Buskeud
Posts: 681

Norway 2005 Discovery 3 TDV6 Commercial Auto Java BlackDiscovery 3

That is great to hear.. The Team (you know who you are) told me that the info that we are after, is sent over the medium speed can, to the IHU. Then over the most bus and to the screen.. So tapp in to pin 3 Can H and 11 Can L on the diagnostic socket and you are good to go.

Mr.P
  
Post #165762521st May 2016 10:50 am
View user's profile Send private message View poster's gallery Send e-mail Reply with quote
rubot
 


Member Since: 16 Mar 2016
Location: San Diego, California
Posts: 27

United States 2008 LR3 4.4 V8 HSE Auto Chawton WhiteLR3

Nice work, mr p!
  
Post #165768921st May 2016 1:16 pm
View user's profile Send private message View poster's gallery Reply with quote
alex_pescaru
 


Member Since: 19 Dec 2010
Location:  RO
Posts: 270


With your method with the SD card is quite difficult to find what you are looking for.
You need a way to display that information in real time.
You will see that the CAN broadcasted information is repeating. Some information quicker than the other. Some information is static and some will change quickly during time.
Sometime ago, in order to find some info on my FL2's CAN buses, I've made an application that displayed in real time the CAN info on a report list style, where each distinct ID has its own distinct row.
Initially the list is empty, but as soon as an ID appears, the app looks for its previous appearance and if it's not found, a new row is added. If that ID have already appeared in the past, the new updated info is overwritten on that existent, previous row.
In this way it will be very easy to see which information (which byte on which ID) is changing when you press a button, engage a gear, do something, etc.
On FL2 any broadcasted information has always 8 bytes on any ID. So the identifying process is easy.
Strange thing, you will see that on D3/4, the same ID will carry sometimes variable length messages, which will complicate things... But...
Have fun and keep in mind besides those famous words "Learn, learn and learn!", like a friend said, the words "Experiment, experiment and experiment!". Laughing Laughing
  
Post #165791321st May 2016 9:56 pm
View user's profile Send private message View poster's gallery Reply with quote
parrafin23
 


Member Since: 04 Dec 2011
Location: Buskeud
Posts: 681

Norway 2005 Discovery 3 TDV6 Commercial Auto Java BlackDiscovery 3

Thank you Alex for adding "vital" information regarding this. Im more of an "visualizer" than a "doer", therefor I am.. handy with spanners and wiring, but a complete clown when it comes to programing :rolllaugh:

The IHU is the gateway between all the busses in the car, So I "visualize" that using your type of application in the same way as you did in the FL2 will be just perfect on the MediumSpeed can, and have a look at the list it makes, then its time to look at the HighSpeed canbus to cross reference the Ids found on both busses, this way we can for sure determen if we have valid ID and bytes are the same, his way we can figure out if its enough to connect to just only the MediumSpeed can or we need both of them.

Alex, It it possible to have a sneak peak @your program?

Mr.P
  
Post #165797122nd May 2016 7:01 am
View user's profile Send private message View poster's gallery Send e-mail Reply with quote
parrafin23
 


Member Since: 04 Dec 2011
Location: Buskeud
Posts: 681

Norway 2005 Discovery 3 TDV6 Commercial Auto Java BlackDiscovery 3

I bet you have seen this, and perhaps you are using some of this code, but Credit goes to Martin Viljoen for the SeeedStudio Canbus shield.

I dont have the shield yet, but perhaps you can try it..


----------------------------- CODE --------------------------

//This Arduino UNO Sketch requires the Seeed CAN-BUS Shield Libraries
//https://github.com/yexiaobo-seeedstudio/CAN_BUS_Shield
#include <SPI>
#include "mcp_can.h"

INT32U canId = 0x000;

unsigned char len = 0;
unsigned char buf[8];
char str[20];


void setup()
{
Serial.begin(38400);

START_INIT:

if(CAN_OK == CAN.begin(CAN_125KBPS))
{
Serial.println("CAN BUS Shield init ok!");
}
else
{
Serial.println("CAN BUS Shield init fail");
Serial.println("Init CAN BUS Shield again");
delay(100);
goto START_INIT;
}
}


void loop()
{
if(CAN_MSGAVAIL == CAN.checkReceive())
{
CAN.readMsgBuf(&len, buf);
canId = CAN.getCanId();
Serial.print("<");Serial.print(canId);Serial.print(",");
for(int i = 0; i<len; i++)
{
Serial.print(buf[i]);Serial.print(",");
}
Serial.print(">");
Serial.println();
}
}


--------------------- CODE END -------------------------

All you have to do is to change this line :

if(CAN_OK == CAN.begin(CAN_125KBPS))

For MediumSpeed can into :

if(CAN_OK == CAN.begin(CAN_250KBPS))

Or

For HighSpeed Can into

if(CAN_OK == CAN.begin(CAN_500KBPS))


It will print out all info to the COM port by using putty in windows ect..

I have downloaded and tested the CAN-BUS Super Sniffer by this guy and I do beleave it will work under windows too with just a simple BT unit or direct cable..


Mr.P
  
Post #165807522nd May 2016 12:10 pm
View user's profile Send private message View poster's gallery Send e-mail Reply with quote
alex_pescaru
 


Member Since: 19 Dec 2010
Location:  RO
Posts: 270


parrafin23 wrote:
Alex, It it possible to have a sneak peak @your program?

Code or layout?

Quote:
All you have to do is to change this line :

From what I remember, at least on FL2, LS CAN is 125kbps and HS CAN is 500kbps.
  
Post #165815122nd May 2016 3:28 pm
View user's profile Send private message View poster's gallery Reply with quote
Display posts from the last:  
Post Reply Back to top
Page 1 of 2 12>
Jump to:  
Previous Topic | Next Topic >


Posting Rules
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



DISCO3.CO.UK Copyright © 2004-2024 Futuranet Ltd & Martin Lewis
DISCO3.CO.UK RSS Feed - All Forums

DISCO3.CO.UK is independent and not affiliated to Land Rover.
Switch to Mobile Site