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?
can id´s 4 Gear Selector
Re: can id´s 4 Gear Selector
Re: can id´s 4 Gear Selector
I checked the code Gen1 by tom91 with a modified void setup ().
Now everything works great. The first module (silver) performs all functions. The second module (black) does not unlock, I think the problem is in the solenoid. The question about the brake pedal remained open.
Code: Select all
void setup()
{
Serial.begin(115200);
if (CAN0.begin(MCP_ANY, CAN_500KBPS, MCP_16MHZ) == CAN_OK)
{
Serial.println("CAN Init OK");
}
else
{
Serial.println("CAN Init Failed");
}
CAN0.setMode(MCP_NORMAL);
pinMode(CAN0_INT, INPUT);
}
-
LRBen
- Posts: 608
- Joined: Thu Jul 04, 2019 6:35 pm
- Location: Somerset, UK
- Has thanked: 122 times
- Been thanked: 290 times
Re: can id´s 4 Gear Selector
Wouldn't be too hard to implement. We know what canbus is used to lock or unlock the knob, you could run the brake light voltage through a relay (So you don't send 12v into an arduino pin)to act as a signal for the arduino. When the brake light is on, send the canbus messages to unlock.
Re: can id´s 4 Gear Selector
Hello. If anyone needs a modified GEN1 code to connect the relay to the module buttons. Also added module highlighting. But I can’t find what data I need to send to the Can bus to block the knob in the P and R positions. And how to track when the ignition is off and the knob is down (I need this to restart the arduino)?
- Attachments
-
- Jaguar_CAN.ino
- (5.89 KiB) Downloaded 833 times
Re: can id´s 4 Gear Selector
What message exactly unlocks and locks the knob? And what message does the knob drop down?
-
LRBen
- Posts: 608
- Joined: Thu Jul 04, 2019 6:35 pm
- Location: Somerset, UK
- Has thanked: 122 times
- Been thanked: 290 times
Re: can id´s 4 Gear Selector
On Gen 1 I think just switching off ignition 12v will lower the knob. You should be able to lock it by just not sending any canbus messages.
Afraid it's been a while since I looked at this so I can't remember much. But all the information is on this thread. Experiment with it for the details.
Re: can id´s 4 Gear Selector
Do you think the voltage on the start/stop button and the handbrake depends on the CAN bus signal or not? I apply 12V to pin 12 (Wake up). And on pins 7, 18 and 11-ground (start/stop) I get 0V. But according to GSMTSM - Pinout.pdf they must be under voltage. The same situation with manual brake, on pins 8,9,10,19,20 I get 0V. Maybe I need to send some kind of message to the can bus and wake up these outputs? Or these contacts work on the Lin bus
- Attachments
-
GSMTSM - Pinout.pdf- (484.6 KiB) Downloaded 816 times
-
nkiernan
- Posts: 589
- Joined: Mon Feb 24, 2020 8:59 pm
- Location: Ireland
- Has thanked: 516 times
- Been thanked: 95 times
Re: can id´s 4 Gear Selector
Did you check if the start button for example simply closes a switch, so continuity between ground and start_stop_1 when button is pressed?
Re: can id´s 4 Gear Selector
This is not a simple switch. There is a resistor between the buttons and ground. When the button is pressed, there is no short circuit between ground and start_stop_1 or _2. The tracks from the buttons go inside the board and there is no way to track them
Re: can id´s 4 Gear Selector
Great info here! I was able to get one working with an UNO and CAN shield with tom91's code for gen 2. It appears to all work without crashing except the sport mode does not engage. Below is a photo of the model for reference if anyone is looking for one:
I will try LRBen's code when I get a DUE. Note with the code above, you need to make the following changes as others noted that I missed initially (likely due to a newer library for mcp_can):
1) Add MCP_ANY in the setup loop:
while (CAN_OK != CAN0.begin(MCP_ANY, CAN_500KBPS, MCP_16MHZ)) // init can bus : baudrate = 500k 8MHZ crystal
2) Add the following line at the end of the setup loop:
CAN0.setMode(MCP_NORMAL); // Change to normal mode to allow messages to be transmitted
1) Add MCP_ANY in the setup loop:
while (CAN_OK != CAN0.begin(MCP_ANY, CAN_500KBPS, MCP_16MHZ)) // init can bus : baudrate = 500k 8MHZ crystal
2) Add the following line at the end of the setup loop:
CAN0.setMode(MCP_NORMAL); // Change to normal mode to allow messages to be transmitted
Re: can id´s 4 Gear Selector
Hello. I looked at the logs from tom91 for Gen1. I don't understand. How does ID 312 turn 0x20 (locked) into 0x10 (unlock)? What command blocks the knob? If you look at Gen2 ID 02C there are two command 0x00 and 0x40 (D3). But they don't work for Gun1
Re: can id´s 4 Gear Selector
Hi guys,
I stumbled across this forum while searching for ideas to replace the LR dial shifter. Has anyone tried a BMW 8hp shifter and converting it to work with the LR/JAG harness/Box? I've busted the dial shifter and just want to go back to a shift style lever. Less to go wrong.
Thanks in advance!
I stumbled across this forum while searching for ideas to replace the LR dial shifter. Has anyone tried a BMW 8hp shifter and converting it to work with the LR/JAG harness/Box? I've busted the dial shifter and just want to go back to a shift style lever. Less to go wrong.
Thanks in advance!
Re: can id´s 4 Gear Selector
hello,
Frend i must repair may Evoque selector, but i have trayed to rebild this project
but i dont can put this to work, because i dont know what MCP library i must use.
i have tested some but on complie i become erros from this labrary MCP Can.
Can any sheare this library that work with this project on Adruino Nano ?
Thanks
Frend i must repair may Evoque selector, but i have trayed to rebild this project
but i dont can put this to work, because i dont know what MCP library i must use.
i have tested some but on complie i become erros from this labrary MCP Can.
Can any sheare this library that work with this project on Adruino Nano ?
Thanks
Re: can id´s 4 Gear Selector
I just bought this selector jlr gj32-7e453-ab. When I power it up on the bench, with just the kvaser on its canbus, it starts streaming just one message on the ID 0x1F0
0- 20
1- 00
2- 00
3 and 4 its a cyclic message, looks like some kind of check sum
5- 00
6- 00
7- 40
I just looked at the github projects and couldn't find any log that looks like it. Does anybody knows if the canbus payload can change if the selector came out of a Jaguar or Land Rover?
0- 20
1- 00
2- 00
3 and 4 its a cyclic message, looks like some kind of check sum
5- 00
6- 00
7- 40
I just looked at the github projects and couldn't find any log that looks like it. Does anybody knows if the canbus payload can change if the selector came out of a Jaguar or Land Rover?
Re: can id´s 4 Gear Selector
One thing that I've found so far on the GEN1 GSM (jlr gj32-7e453-ab) I have here is:
ID 0x370
byte 6 = LED backlight dimmer (00 = 0% / FF = 100%)
byte 7 = LED backlight on (00 = off / FF = on)
We can adjust the backlight brightness. I didn't figured out any thing more yet.
ID 0x370
byte 6 = LED backlight dimmer (00 = 0% / FF = 100%)
byte 7 = LED backlight on (00 = off / FF = on)
We can adjust the backlight brightness. I didn't figured out any thing more yet.