Member Since: 21 Nov 2020
Location: Canary Islands
Posts: 129
Chris, If you want to do lots of logging etc... I would suggest going with a Raspberry Pi based solution.
Could be worked out to store in an internal database, then sync online when it connects to your wifi at home.
Now I am getting really interested in this all Pre-Production
D3 V8 #264
LHD '04 HSE
Living its life as a 50/50 On/Off road car exploring the Canary Islands
29th Dec 2020 5:36 pm
chrisoverson
Member Since: 10 Dec 2020
Location: Bideford
Posts: 29
Thanks for the idea
I'm currently going to work with the CanHacker software, which I think can save a list of everything it detects already, and filter to various IDs etc - the arduino outputs all the data from the can bus to that software on my laptop, and I've got a car charger for my laptop, so it works nicely.
If that doesn't quite fit the bill then Pi might be another option certainly. I tend to avoid Pis in general... just seems like they have a lot of baggage running an entire operating system when I only need them to do a simple task, but I'm sure they have their place. I tend to like the dedicated microcontrollers that only do one job, but that's only because it's what I'm used to.
Once I've built up a good list of what everything does I can start making my own custom software to do something interesting with it, but that's likely to be involving an ESP32 board with an onboard sim card for reporting data back and remote control
29th Dec 2020 5:44 pm
Prette
Member Since: 16 Mar 2020
Location: Previously Stoke-ST4 (pre-pandemic), Mostly The Hague (NL) partially Lyngby (DK) certainly somewhere
Posts: 160
Nice idea Chris, I would love to help this development if need any hand.
my time of programming and such are long gone but I still hold some of that knowledge. If I can be of any assistance, let me know. These days I am mostly playing with Arduino/ESP-32/rPi0 etc... buiding servos and comms and .... well... anything really.
I would die to see all of that data (decripted) being displayed directly to the D3 original screen too, perhaps using the TV input. I am a supporter of original appearances, hence the idea to adapt the original screen to display the data.
So far, my (bad) experience was to read data from various ECUs while driving. As soon as odb access the particular ECU it stops to communicate with the others and thow a bunch of errors (cleared after a restart) but hey... it was fun. and scary
Also count me in for guinea-pig or beta tester if needed.
29th Dec 2020 5:53 pm
chrisoverson
Member Since: 10 Dec 2020
Location: Bideford
Posts: 29
Thanks! Any help will be appreciated and probably needed lol.
I'm programming daily in my work, but normally high level languages like PHP, Javascript and the likes, so ashamedly I'm not that used to dealing with bits, bytes, hexadecimal and the nitty gritty protocols, so I'll need to refresh myself with that side of things. Once I've got the foundations right the rest should be a doddle...
I'm leaning both ways... I want new features but I don't want to mess up the original look either too much. I'm almost certainly wanting to replace the in-built nav screen with a newer, higher resolution tablet of some description, but without wanting to lose the 4x4 info. I'll virtually never use it, but I just don't want to be worse-off than OEM out of principle.
So a modern nav and media interface is part of the plan. The other part is remote control and tracking.
Building my own protocol and hosting my own server should hopefully mean high speed and low bandwidth, as it's not having to do much handshaking and identifying, so I'm going for real-time telemetry from the car whilst it's in motion, but that's the long term goal.
Initially, I'll be happy with figuring out how to instruct the car to defrost once the FBH gets up to temp, and monitoring to make sure the FBH is actually working, rather than my current solution which uses a relay to push the flame button on the 1533 timer and just assume that's done the job. That on its own could be a standalone item that I'd love to make into an inexpensive kit.
29th Dec 2020 6:03 pm
Prette
Member Since: 16 Mar 2020
Location: Previously Stoke-ST4 (pre-pandemic), Mostly The Hague (NL) partially Lyngby (DK) certainly somewhere
Posts: 160
I feel we are on the same page and moving towards the same thing. I agree with all that.
I currenlty see if my FBH is working by reading the live stream data using the odb: whenever the fuel pumpl is on, the stuff is running. My next step is to connect a simple micro-LED with 560R in series with the FBH fuel pump. so I will have a direct visual input somewhere on my dash.
In fact, I can see all the FBH operations using the iCarsoft (fan speed, glowplug, etc.. ) I can only assume this data is also floating in the CAN.
Besides, I can also see the Operation State of the FBH, by means of numbers which I still cannot fully comprehend. Here is a list of what I figured so far:
Operating state
4 system ready Nothing on
6 ON (no glow)
7 Warming (Fuel + Glow + high fan)
12 Start Water pump + heater fan + vent
16 check? no glow h fan vent standby?
17 ON (no glow)
20 Stablished Burning
26 Restarting? no fuel high /low fan no glow
27 ????
46 Water Pump Water pump + heater fan + vent + glow
47 Pre-heat (Water Pump + Glow + low fan)
40 OFF (???) (waiting for car fan signal)
45 flame check?
0 retry??
16 check? no glow h fan vent standby?
32 collant at temperature (no need for FBH)
Please, bear in mind that all these are guesses based on experience only.
Click image to enlarge
29th Dec 2020 6:20 pm
epninety
Member Since: 12 Oct 2012
Location: Hampshire
Posts: 329
When I bought the car about 6 years ago, I used the diagnostic interface to control the FBH. In fact, I sort of did it twice, rewriting messages between a webasto telestart and the FBH. Since the LR fitted FBH won't respond to telestart commands, I simply rewrote the messages in each direction to identify the sender as a diagnostic interface controller.
Used a very small STM32 microcontroller and probably cost about £10 to make (I already had a telestart going spare).
I took it out when the FBH failed a couple of years ago, never got around to refitting it...
29th Dec 2020 6:33 pm
OGif
Member Since: 15 Feb 2022
Location: Ontario
Posts: 2
epninety wrote:
Just for interest, here's a little video of the D3 dash running on my bench, all controlled from a microcontroller using commands I reverse engineered from sniffing the canbus.
Awesome work. I have a project like this one to control an Instrument Cluster.
Could you please share the canbus IDs or Arduino sketch? Thank you!
15th Feb 2022 3:21 pm
epninety
Member Since: 12 Oct 2012
Location: Hampshire
Posts: 329
Sorry, I dont use Arduino. Actually, strike that, I'm sorry I can't be of more help, but I'm not sorry about the Arduinos
My datalogging of the D3 was done using Python on a Raspberry Pi with a CAN interface card.
My control of the IPC was done using an STM32 based controller that I designed for something else, which is programmed in either C or Micropython depending on the job at hand. I haven't touched this in a long while, but I think it was using Micropython just for the speed of getting things going.
Below are my notes from the time. I could probably dig out the uPython code if it was useful.
Dave
Apologies to the non-techies, the following will look like gobbledygook.
HS Bus :-
##### MsgID 0979BAB0
Associated with the gearbox.
0979BAB0#8880008650F7FF0C makes the IPC drop the error and indicate the gearbox is in park momentarily. All tested values indicate park.
0979BAB0#80D80086C2F4605D N
0979BAB0#87D80086C2F4605D R
0979BAB0#88D80086C2F4605D P
0979BAB0#89D80086C2F4605D D
0979BAB0#89A000B6C2F7FF4D Sport Mode D
0979BAB0#8AA000BEC2F7FF1D Command Shift 1
0979BAB0#8AA000BEC2F7FF2D Command Shift 2
0979BAB0#8AA000BEC2F7FF3D Command Shift 3
0979BAB0#8AA000BEC2F7FF4D Command Shift 4
0979BAB0#8AA000BEC2F7FF5D Command Shift 5
0979BAB0#8AA000BEC2F7FF6D Command Shift 6
##### MsgID 0BD5FDF0
Change mask is 000f00001fff0100 from a longer datalog.
6D = BLUE
77 = MIN
7D = 1/4
A0 = MID
B1 = 3/4
B3 = MAX
B4 = RED
B5 = WARNING LIGHT ON
values 96-127 in the last byte put the engine management warning light on!
change mask 0xffffffffffa70000
##### MsgID 17E012B0
Terrain response knob. 17E012B0#0010 no visible effect but 'System Fault, special programs not available' at end of sequence. Change mask 0010000000000000
##### MsgID 17E49220
17E49220#0000000019D05194 turns OFF the battery warning light.
17E49220#0000800019D00079 turns ON the battery warning light.
The 8 is the key
Change mask 0xFFFFFFFF19DCFFFF
Also removes 'Engine System Fault' message from the dash.
##### MsgID 17E80420
Glowplug light and some warning messages
6 byte message
d[4]
0x80 'Water in Fuel'
0x40 'Cooling System Fault - Monitor Gauge'
0x10 'Reduced Engine Performance'
d[5]
0x80 Glowplug warning ON
MS Bus :-
###### MSgID 11540020
MSgID 11540020 carries text for info display on instrument cluster
Message is flushed to screen on the last packet. Sending just the last packet repeats the previous message. Message only remains onscreen for a limited time, or if a more important message is posted.
I think multi line messages are possible though (IID?)
###### MsgID 06840BE0
MsgID 06840BE0 carries the dashboard temperature indicator
can0 06840BE0#0000FE30F4012038 - shows +214C on dash.
^^
Range -40C (0x00) to +214C (0xFE) - 0xFF is ignored
Remains displayed only for ~ 1sec.
###### MsgID 13800020
MsgID 13800020#171500A0000000 carries the clock time.
can0 13800020#173B00A0000000 (173B = 23:59)
^ ^
Remains displayed only for ~ 1sec.
###### MsgID 08AC0AB0
msgs=[
b'\x00\x00\x30\x40\x00\x00\x00', # LH IND
b'\x00\x00\x70\x40\x00\x00\x00', # LH IND + TRAILER
b'\x00\x00\x08\x80\x00\x00\x00', # RH IND
b'\x00\x00\x48\x80\x00\x00\x00', # RH IND + TRAILER
b'\x00\x00\x38\x80\x00\x00\x00', # HAZARDS
b'\x00\x00\x78\x80\x00\x00\x00', # HAZARDS + TRAILER
]
15th Feb 2022 3:44 pm
Green Land Rover
Member Since: 21 Oct 2017
Location: Stourbridge
Posts: 412
If you're seriously considering installing something like this permanently, might be wise to go with a passive way of reading the CAN bus like this: -
You don't want your homemade hardware falling over and stopping the bus from operating when you're in lane 3 of the motorway doing 70! Discovery 4 HSE - Aintree Green
Freelander 2 TD4 SE Automatic - Tonga Green
Defender XS - Tonga Green - Gone Now
Freelander 1 Td4 ES Manual - Epsom Green - Gone Now
Freelander 1 Td4 Kalahari SE - Epsom Green - Gone Now
Freelander 1 XEi - Epsom Green - Gone Now
I think the 'board' you saw in the video is actually the corner of my desk mat This is a pic of the board I was using. It's much larger than necessary. I designed it for something else entirely, but since it had canbus interfaces and I had already compiled micropython for it, it was perfect for this.
Click image to enlarge
17th Feb 2022 9:53 am
Mayfair86
Member Since: 25 Nov 2020
Location: Bedfordshire
Posts: 11
Hi, sorry to jump on a slightly old post but hopefully still relevent. I am in the process of trying to get my head round the whole canbus thing, I've done some very basic coding about 15 years ago but never experienced canbus. I am putting a 4.4 D3 AJV8 engine in my manual 2.7tdv6 D3. So the V8 loom and ecu will be changing from auto to manual. I've got to try to figure out what I need with regards to canbus info to give the ECU the signals it needs to function properly and for the special programs to function as they should. Also relating to epnintey's posts, I will be switching the clocks from the V8 donor so will need to try and code the mileage and it would be nice to have the gear selection on it. Not sure how much of this is possible but any guidance or assistance on where to start would be appreciated.
Thanks
Josh
Last edited by Mayfair86 on 21st Sep 2022 11:18 am. Edited 1 time in total
15th Sep 2022 6:42 pm
chrisoverson
Member Since: 10 Dec 2020
Location: Bideford
Posts: 29
Hi Josh
I didn't get significantly further forward on this but I'm revisiting it now and just saw your reply
If you're swapping the ECU over then I assume the special programs etc should be alright as I doubt they're designed to specifically function with the TDV6 - in general if everything that revolves around the engine and instrumentation is swapped them I'd expect most other things to work, but someone else might be able to better confirm that.
If you need to swap more bits from a V8 to your D3 then you're likely better off doing that, it'd be a bad idea to modify or spoof can bus signals on the fly as they're constantly going at a high rate and there may be safety consequences.
20th Sep 2022 4:32 pm
Mayfair86
Member Since: 25 Nov 2020
Location: Bedfordshire
Posts: 11
Yeah that's what I'm hoping. I've been through all the CAN network maps and the wiring diagrams and I don't see that, other than a bit of updating of firmware, it shouldn't work.
Yeah It looks like I shouldn't have to spoof any signals, I think I can amend the firmware files to account for the differences.
Fingers crossed it all works, I think I'm at the point of just sucking it and seeing, then fixing the coms issues as they arise.
22nd Sep 2022 2:32 pm
zebcrs
Member Since: 28 Apr 2024
Location: Bulgaria
Posts: 1
epninety wrote:
Just for interest, here's a little video of the D3 dash running on my bench, all controlled from a microcontroller using commands I reverse engineered from sniffing the canbus.
Hi, I am in the process of making a new open Android project for the LR3 and the L320.
It is based on the Raspberri Pi5 with an Ipad 3 9.7" touch display and running Android AOSP.
I am trying to add all the "standard" functionality from the original stereo.
For audio I use a stereo to MOST adapter and that works fine.
I am also doing a CAN adapter, I have two versions I am toggling back and forth between, SPI and USB interface.
It would help alot getting the CAN database for the platform, at least the part for the instrument panel.
I would like to set clock and show custom texts on the display.
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