can id´s 4 Gear Selector

Jaguar / Landrover hardware hacking
nkiernan
Posts: 509
Joined: Mon Feb 24, 2020 8:59 pm
Location: Ireland
Has thanked: 284 times
Been thanked: 65 times

Re: can id´s 4 Gear Selector

Post by nkiernan »

tom91 wrote: Wed Apr 05, 2023 8:23 pm So it is possible this is slightly unique. I wont know till I get my hands on one, so if anyone is up for sending me one please reach out.
I can send mine to you no issue. PM me an address and I'll get it in the post :)
LRBen
Posts: 474
Joined: Thu Jul 04, 2019 6:35 pm
Location: Somerset, UK
Has thanked: 43 times
Been thanked: 107 times

Re: can id´s 4 Gear Selector

Post by LRBen »

nkiernan wrote: Wed Apr 05, 2023 8:06 pm Hope this can help a bit. I tested both the new Gen1 and Gen2 sketches on my unit. So like VanGogh, neither is getting any action from the selector. However, from previously running some of Tom's CAN logs from Savvycan, the knob did raise but wouldn't retract. When Gen1 sketch started running, the knob did retract but wouldn't move after that. Connections as per Tom's post above, add/remove ignition brings on the back lights etc.

So connected savvycan and captured the log below. This starts with ignition off and I apply ignition on after a few seconds in the log. Sharing now in case its any use, but I need to compare this capture back to some of Tom's logs

Some sample output in the Arduino serial monitor:

Code: Select all

386688,0x3F3,false,8, 0x7C, 0x24, 0x05, 0x08, 0xFE, 0xFF, 0x01, 0x00
386709,0x3F3,false,8, 0x7C, 0x24, 0x06, 0x09, 0xFE, 0xFF, 0x01, 0x00
386731,0x3F3,false,8, 0x7C, 0x24, 0x07, 0x0A, 0xFE, 0xFF, 0x01, 0x00
386752,0x3F3,false,8, 0x7C, 0x24, 0x08, 0x0B, 0xFE, 0xFF, 0x01, 0x00
386774,0x3F3,false,8, 0x7C, 0x24, 0x09, 0x0C, 0xFE, 0xFF, 0x01, 0x00
386795,0x3F3,false,8, 0x7C, 0x24, 0x0A, 0x0D, 0xFE, 0xFF, 0x01, 0x00
386816,0x3F3,false,8, 0x7C, 0x24, 0x0B, 0x0E, 0xFE, 0xFF, 0x01, 0x00
386837,0x3F3,false,8, 0x7C, 0x24, 0x0C, 0x0F, 0xFE, 0xFF, 0x01, 0x00
386859,0x3F3,false,8, 0x7C, 0x24, 0x0D, 0x10, 0xFE, 0xFF, 0x01, 0x00
386880,0x3F3,false,8, 0x7C, 0x24, 0x0E, 0x11, 0xFE, 0xFF, 0x01, 0x00
386902,0x3F3,false,8, 0x7C, 0x24, 0x00, 0x03, 0xFE, 0xFF, 0x01, 0x00
386923,0x3F3,false,8, 0x7C, 0x24, 0x01, 0x04, 0xFE, 0xFF, 0x01, 0x00
That seems to fit with the logs I have for my GSM. Have you tried the sketch I posted?
tom91
Posts: 1308
Joined: Fri Mar 01, 2019 9:15 pm
Location: Bristol
Has thanked: 103 times
Been thanked: 216 times

Re: can id´s 4 Gear Selector

Post by tom91 »

nkiernan wrote: Wed Apr 05, 2023 8:06 pm However, from previously running some of Tom's CAN logs from Savvycan, the knob did raise but wouldn't retract.
Can you get it to raise with playing back only the 0x3F3 of https://github.com/Tom-evnut/Land-Rover ... 20knob.csv

If this work and then P illuminates I can review my code as there is one slight "difference" I have seen in logs that would be good to try.

In park the counter skips 2 and 3, my Gen 1 and LRBen's units do not care about this though.
Founder Volt Influx https://www.voltinflux.com/
Webstore: https://citini.com/
VanGogh
Posts: 41
Joined: Mon Apr 03, 2023 7:33 pm
Has thanked: 2 times
Been thanked: 1 time

Re: can id´s 4 Gear Selector

Post by VanGogh »

Maybe we should send a static message for IGN-ON emulation before sending a message with ID 0x3F3?
tom91
Posts: 1308
Joined: Fri Mar 01, 2019 9:15 pm
Location: Bristol
Has thanked: 103 times
Been thanked: 216 times

Re: can id´s 4 Gear Selector

Post by tom91 »

VanGogh wrote: Wed Apr 05, 2023 9:30 pm Maybe we should send a static message for IGN-ON emulation before sending a message with ID 0x3F3?
okay, sure let me know what needs sending.
Founder Volt Influx https://www.voltinflux.com/
Webstore: https://citini.com/
VanGogh
Posts: 41
Joined: Mon Apr 03, 2023 7:33 pm
Has thanked: 2 times
Been thanked: 1 time

Re: can id´s 4 Gear Selector

Post by VanGogh »

LRBen wrote: Sun Feb 05, 2023 5:48 pm

Code: Select all

#include "variant.h"
#include <due_can.h>
Where can I download these libraries to test your sketch? Thanks
VanGogh
Posts: 41
Joined: Mon Apr 03, 2023 7:33 pm
Has thanked: 2 times
Been thanked: 1 time

Re: can id´s 4 Gear Selector

Post by VanGogh »

Sorry. I realized that these libraries are for the board Arduino DUE. Do you have a sketch for Nano?
nkiernan
Posts: 509
Joined: Mon Feb 24, 2020 8:59 pm
Location: Ireland
Has thanked: 284 times
Been thanked: 65 times

Re: can id´s 4 Gear Selector

Post by nkiernan »

LRBen wrote: Wed Apr 05, 2023 9:21 pm That seems to fit with the logs I have for my GSM. Have you tried the sketch I posted?
Good question! I previously tested your code and it partially worked for me but knob would not retract (i do think it raised, and rotated though). But that was before I knew about the park input signal on pin 14 so I will retest that this evening. thanks for the reminder :)
nkiernan
Posts: 509
Joined: Mon Feb 24, 2020 8:59 pm
Location: Ireland
Has thanked: 284 times
Been thanked: 65 times

Re: can id´s 4 Gear Selector

Post by nkiernan »

tom91 wrote: Wed Apr 05, 2023 9:25 pm Can you get it to raise with playing back only the 0x3F3 of https://github.com/Tom-evnut/Land-Rover ... 20knob.csv
I will check this evening. Previously playing back some of the logs did raise it and allow it to turn but without lights and it wouldn't retact etc. WIll also retest LRBen's code now I know about the park input signal requirement
VanGogh
Posts: 41
Joined: Mon Apr 03, 2023 7:33 pm
Has thanked: 2 times
Been thanked: 1 time

Re: can id´s 4 Gear Selector

Post by VanGogh »

I'm going crazy!!! :x Bought a new GSM JLR EH22-7E453-AB. Uploaded Gen2 sketch to Arduino nano. Knob does not leave when sending 's'.
Connection: PC - USB - Arduino Nano - MCP2515 - CAN GSM.

Code: Select all

Connection GSM:
1 - 12V, 
2 - 12V (IGN), 
5 - CAN H, 
6 - CAN L, 
10 -12V, 
12 -Ground
What's wrong? Please tell me
LRBen
Posts: 474
Joined: Thu Jul 04, 2019 6:35 pm
Location: Somerset, UK
Has thanked: 43 times
Been thanked: 107 times

Re: can id´s 4 Gear Selector

Post by LRBen »

VanGogh wrote: Thu Apr 06, 2023 11:14 am I'm going crazy!!! :x Bought a new GSM JLR EH22-7E453-AB. Uploaded Gen2 sketch to Arduino nano. Knob does not leave when sending 's'.
Connection: PC - USB - Arduino Nano - MCP2515 - CAN GSM.

Code: Select all

Connection GSM:
1 - 12V, 
2 - 12V (IGN), 
5 - CAN H, 
6 - CAN L, 
10 -12V, 
12 -Ground
What's wrong? Please tell me
That part number looks like mine which runs on the Gen 1 canbus messages. Try that script.

Unfortunately I don't have a Nano version for my script. But it's fairly basic so you should be able to port it over, or write your own based on that or Tom's code.
tom91
Posts: 1308
Joined: Fri Mar 01, 2019 9:15 pm
Location: Bristol
Has thanked: 103 times
Been thanked: 216 times

Re: can id´s 4 Gear Selector

Post by tom91 »

VanGogh wrote: Thu Apr 06, 2023 11:14 am I'm going crazy!!! :x Bought a new GSM JLR EH22-7E453-AB.
This is a Gen1 as this is an old knob just like LRBen is using.

If you do not answer our questions and keep doing your own thing we are not going to help you.
Founder Volt Influx https://www.voltinflux.com/
Webstore: https://citini.com/
VanGogh
Posts: 41
Joined: Mon Apr 03, 2023 7:33 pm
Has thanked: 2 times
Been thanked: 1 time

Re: can id´s 4 Gear Selector

Post by VanGogh »

Sorry. Could you please repeat your questions? I'm completely confused.
VanGogh
Posts: 41
Joined: Mon Apr 03, 2023 7:33 pm
Has thanked: 2 times
Been thanked: 1 time

Re: can id´s 4 Gear Selector

Post by VanGogh »

I use MCP2515 like this. It has 120 Om builtin resisror and jamper
https://www.ebay.com/itm/404205629787?h ... BMjLPW5uph
If I measure the resistance on a сan bus without mcp 2515 and ignition, then the tester writes 41 kOhm. If you turn on the ignition, then writes 60 MΩ. If I connect to mcp 2515 with a jumper without ignition - 120 Ohm. I turn on the ignition - 0 ohm.
tom91
Posts: 1308
Joined: Fri Mar 01, 2019 9:15 pm
Location: Bristol
Has thanked: 103 times
Been thanked: 216 times

Re: can id´s 4 Gear Selector

Post by tom91 »

Use Gen 1 code on this knob.

Again if you need more help do as asked.
tom91 wrote: Wed Apr 05, 2023 6:00 pm a
You need to do the following:

Option 1
1. Have an Arduino setup running the code as I posted on Github for the Gen 1 JLR GSM
2. Have another device (can be another arduino setup) reading the canbus between the Arduino and GSM
3. Log this data and share it here so I can review it.

Option 2
1. Put the GSM back to gethor
2. Put the GSM in a box
3. Post it to me
Founder Volt Influx https://www.voltinflux.com/
Webstore: https://citini.com/
VanGogh
Posts: 41
Joined: Mon Apr 03, 2023 7:33 pm
Has thanked: 2 times
Been thanked: 1 time

Re: can id´s 4 Gear Selector

Post by VanGogh »

YEHAAAAAAA !!!! The second GSM works with Gen1 :D
Knob rotates and LEDs light up
IMG20230406151420.jpg
But the first doesn't work at all (9X23- 7E453-DA)
nkiernan
Posts: 509
Joined: Mon Feb 24, 2020 8:59 pm
Location: Ireland
Has thanked: 284 times
Been thanked: 65 times

Re: can id´s 4 Gear Selector

Post by nkiernan »

Did some more testing this evening. Starting off, the selector was raised from previous tests when I couldn't get it to retract.

I played back all the Gen1 and Gen2 CAN logs using savvycan, and the Gen1 logs periodically activated the internal lock, changed the P-R-N-D-S lights but none lowered the selector when ignition signal removed.

Changed over to a DUE and LRBen's code. This worked this time. Previously I didn't have 12V+ at the park input (pin 14 on the 22 way connector). This signal is required when ignition signal is removed before the selector retracts. I also see the lights delay going from R back to P. I'll take a look at this and the internal lock as a serial monitor input test.


Log below running LRBen's code (ign on, P-R-N-D-S-D-N-R-P, ignition off)
060423_JLR_GSM_Log1.csv
(476.11 KiB) Downloaded 67 times
Thank you Tom and LRBen for your work on this, great to see this unit working now :)
VanGogh
Posts: 41
Joined: Mon Apr 03, 2023 7:33 pm
Has thanked: 2 times
Been thanked: 1 time

Re: can id´s 4 Gear Selector

Post by VanGogh »

VanGogh wrote: Thu Apr 06, 2023 12:20 pm YEHAAAAAAA !!!! The second GSM works with Gen1 :D
Knob rotates and LEDs light up
My joy was short lived. It was possible to launch only 2-3 times. 2 days I can not understand the reason for the failure to turn on. Replaced all wires, removed arduino dupont and soldered mcp2515 with arduino outputs. Replaced the TJA1050 chip but nothing. Sometimes the green light comes on.
Nothing helps.
VanGogh
Posts: 41
Joined: Mon Apr 03, 2023 7:33 pm
Has thanked: 2 times
Been thanked: 1 time

Re: can id´s 4 Gear Selector

Post by VanGogh »

Tomorrow I will buy another mcp2515 module and read the data between the first installation and the GSM. I'll post the log here.
VanGogh
Posts: 41
Joined: Mon Apr 03, 2023 7:33 pm
Has thanked: 2 times
Been thanked: 1 time

Re: can id´s 4 Gear Selector

Post by VanGogh »

Hi.
I connected another NodeMCU with mcp2515 in parallel and read data between Aruino with mcp2515 and the GSM. Attached are 2 logs from different GSM. It seems to me that the Park wire (14 pin for a 22 pin connector or 10 pin for a 12 pin connector) is not working.
Attachments
Jaguar.txt
(9.55 KiB) Downloaded 55 times
LandRover.txt
(5.64 KiB) Downloaded 63 times
VanGogh
Posts: 41
Joined: Mon Apr 03, 2023 7:33 pm
Has thanked: 2 times
Been thanked: 1 time

Re: can id´s 4 Gear Selector

Post by VanGogh »

I give up. I do not understand what is going on. Sometimes the backlight of the module turns on by itself. It may turn off immediately or work for a long time. I only had one successful launch when everything worked. After 3 days, the knob rose once and the Parking LED lit up, but the knob did not move. Then 2 times the knob rose without highlighting "P". Now it has completely stopped rising, only the backlight sometimes blinks. Maybe a problem with wires and stray currents that interfere with the can bus?
VanGogh
Posts: 41
Joined: Mon Apr 03, 2023 7:33 pm
Has thanked: 2 times
Been thanked: 1 time

Re: can id´s 4 Gear Selector

Post by VanGogh »

Hi guys. I adapted LRBen's code for Arduino Uno with CAN shield. Now everything works, but there are a few nuances. When I return the knob from the R to P position, the program crashes for a few seconds and then it works again. Sometimes the situation is the same with position S.
Could you look at the code and help me? I also don't know how to add a brake pedal to lock/unlock the knob.
A small video review of the module:
https://drive.google.com/file/d/1IpKJz6 ... sp=sharing
Attachments
IMG20230712193130.jpg
GSM_jaguar.ino
(2.6 KiB) Downloaded 56 times
LRBen
Posts: 474
Joined: Thu Jul 04, 2019 6:35 pm
Location: Somerset, UK
Has thanked: 43 times
Been thanked: 107 times

Re: can id´s 4 Gear Selector

Post by LRBen »

VanGogh wrote: Wed Jul 12, 2023 4:29 pm Hi guys. I adapted LRBen's code for Arduino Uno with CAN shield. Now everything works, but there are a few nuances. When I return the knob from the R to P position, the program crashes for a few seconds and then it works again. Sometimes the situation is the same with position S.
Could you look at the code and help me? I also don't know how to add a brake pedal to lock/unlock the knob.
A small video review of the module:
https://drive.google.com/file/d/1IpKJz6 ... sp=sharing
I have the exact same behavior with my setup and code regarding the stutter when changing to P and sometimes S. Never looked into it at the time since it would have been functional still. Unfortunately the project it's going into is in a que so I won't have time to look into it more until the winter I expect.

What do you mean by brake pedal?
VanGogh
Posts: 41
Joined: Mon Apr 03, 2023 7:33 pm
Has thanked: 2 times
Been thanked: 1 time

Re: can id´s 4 Gear Selector

Post by VanGogh »

I have now checked this code with another GSM and the knob goes up and down, but the unlock does not work
Attachments
IMG20230712205440.jpg
VanGogh
Posts: 41
Joined: Mon Apr 03, 2023 7:33 pm
Has thanked: 2 times
Been thanked: 1 time

Re: can id´s 4 Gear Selector

Post by VanGogh »

LRBen wrote: Wed Jul 12, 2023 5:56 pm What do you mean by brake pedal?
Now the knob rotates freely. But in the car, it is locked and only when the brake pedal is pressed does the knob unlock. How to implement it? What data needs to be sent to the CAN bus?
Post Reply