Page 2 of 5
Re: can id´s 4 Gear Selector
Posted: Sun Feb 05, 2023 3:54 pm
by tom91
medolino wrote: ↑Sun Feb 05, 2023 3:50 pm
doesn't work on the newer ones
New ones is with the canbus logs I made it should go down.
Re: can id´s 4 Gear Selector
Posted: Sun Feb 05, 2023 4:06 pm
by LRBen
nkiernan wrote: ↑Sun Feb 05, 2023 11:42 am
Model number on mine is BW83-7E453-AC and I get the same result as you. Playing back some of the different logs raises the knob, allows it to rotate, changes light between P-R-N-D but doesn't lower the knob in any. The knob raised on the first playback and stayed there.
I got mine to lower! I got the pinout wrong. pin 4 does nothing. pin 10 needs 12v, then when you disconnect ignition it will lower. It does need canbus to raise though, but doesn't lower via canbus messages.
Updated my pinout post.
Re: can id´s 4 Gear Selector
Posted: Sun Feb 05, 2023 5:48 pm
by LRBen
So you just need 0x3F3 to raise and unlock the gear selector, sending every 20ms.
No changing lights yet, but I do get the gear selector sending back gear change canbus messages. Just need to write in the changing of messages depending on value of byte 2 in 0x312
Code: Select all
#include "variant.h"
#include <due_can.h>
//Leave defined if you use native port, comment if using programming port
#define Serial SerialUSB
const int CAN_SPEED = 500000; // CAN bus speed in baud
const int SEND_DELAY = 20; // send message every 10ms
const int MESSAGE_LENGTH = 8; // 8 byte long message
void setup()
{
Serial.begin(115200);
// Initialize CAN0 and set the baud rate
Can0.begin(CAN_SPEED);
Can0.watchFor();
}
void loop()
{
static unsigned long lastTime = 0;
static int counter = 0x82;
static int counter1 = 0x00;
// Send a new message every SEND_DELAY milliseconds
if (millis() - lastTime >= SEND_DELAY)
{
CAN_FRAME msg;
msg.id = 0x3F3; // message ID
msg.length = MESSAGE_LENGTH;
msg.extended = 0; // standard frame format
// Set the data in the message
for (int i = 0; i < MESSAGE_LENGTH; i++)
{
msg.data.bytes[i] = 0;
}
msg.data.bytes[0] = 0x5C;
msg.data.bytes[1] = 0x66;
msg.data.bytes[2] = counter1;
counter1++;
if (counter1 > 0x0E)
{
counter1 = 0x00;
}
msg.data.bytes[3] = counter;
counter++;
if (counter > 0x90)
{
counter = 0x82;
}
msg.data.bytes[4] = 0xFF;
msg.data.bytes[5] = 0x7F;
msg.data.bytes[6] = 0x00;
msg.data.bytes[7] = 0x80;
// Send the message
Can0.sendFrame(msg);
// Record the time the message was sent
lastTime = millis();
}
}
Re: can id´s 4 Gear Selector
Posted: Sun Feb 05, 2023 8:08 pm
by LRBen
Got a working arduino due script for selecting modes and lights.
Currently I can't get the S mode light to work. However I can select it without the selector locking up. It was a bit tricky to figure out. The two cycling values in 0x3F3 are in relation to each other. It also locks up for a couple of seconds when going into Park. Maybe an inbuilt timer to allow the E-brake to come on?
Edit: Updated thanks to Tom's canbus logs. S mode light now works. Still get the delay with the Park light, but it's functional at least.
https://github.com/SomersetEV/LandRover ... ear-change
Re: can id´s 4 Gear Selector
Posted: Sun Feb 05, 2023 8:28 pm
by nkiernan
LRBen wrote: ↑Sun Feb 05, 2023 4:06 pm
I got mine to lower! I got the pinout wrong. pin 4 does nothing. pin 10 needs 12v, then when you disconnect ignition it will lower. It does need canbus to raise though, but doesn't lower via canbus messages.
Nice one, I'll check this out. I have the 22 pin connector on mine, so I expect one of the pins needs the same 12V. Will do some checking

Re: can id´s 4 Gear Selector
Posted: Thu Mar 09, 2023 11:26 pm
by medolino
can we use it with the ldu ??
Re: can id´s 4 Gear Selector
Posted: Thu Mar 09, 2023 11:40 pm
by tom91
medolino wrote: ↑Thu Mar 09, 2023 11:26 pm
can we use it with the ldu ??
No.
Not directly you need to create a controller to have the two interact.
Re: can id´s 4 Gear Selector
Posted: Mon Mar 27, 2023 3:54 pm
by tom91
Arduino Uno with Canshield code to have full control of the shifter.
https://github.com/Tom-evnut/Land-Rover ... LRgearknob
This code allows raising and lowering of the knob and selecting of all the positions with the lights working. This is ready for anyone to take and integrate into a vehicle.
The checksum has not been worked out, so it just is brute forced message filling based on logs.
Re: can id´s 4 Gear Selector
Posted: Mon Mar 27, 2023 6:55 pm
by nkiernan
Thank you for sharing Tom. I will try testing at the weekend on the gear selector I have

Re: can id´s 4 Gear Selector
Posted: Tue Mar 28, 2023 5:43 pm
by tom91
Also made the Gen 1 knob I have work. CAN bus was a bit easier.
Lights come on and Sport is selectable. I have not gone in depth to figure out any more.
Logs and Arduino code is on github.
https://github.com/Tom-evnut/Land-Rover ... en1%20Knob
Re: can id´s 4 Gear Selector
Posted: Wed Mar 29, 2023 11:18 am
by tom91
Re: can id´s 4 Gear Selector
Posted: Wed Mar 29, 2023 12:18 pm
by nkiernan
Thank you Tom.
Are you seeing that for both the 12 and 22 way connectors, you only need 5 connections:
- GND
- 12V+ main feed
- 12V+ Ign
- CAN H
- CAN L
Or are there signals required on other pins also (just looking at LRBen's post re needing 12V on pin 10 of the 12 way connector also and wondeirng what the description of that pin is)
Re: can id´s 4 Gear Selector
Posted: Mon Apr 03, 2023 8:32 pm
by VanGogh
Hello friends. How long have I been looking for this topic in all the forums !!!! I'm trying to get it to work with a stepper motor for shifting gears in another car. I needed to find all the CAN bus codes and then I stumbled upon this forum. Happiness!!!
I found only 2 leds like in my picture
Re: can id´s 4 Gear Selector
Posted: Mon Apr 03, 2023 8:36 pm
by VanGogh
I also found voltage on the pins of the 22 way connector
Re: can id´s 4 Gear Selector
Posted: Tue Apr 04, 2023 7:21 am
by nkiernan
Was having some compile issues (old CAN library installed, but when I updated to the latest, it required 3 arguments instead of the 2 used), so had to change below for my setup:
Code: Select all
while (CAN_OK != CAN0.begin(CAN_500KBPS, MCP_16MHZ)
to:
Code: Select all
while (CAN_OK != CAN0.begin(MCP_ANY, CAN_500KBPS, MCP_16MHZ)
Still to test on the gear selector
Re: can id´s 4 Gear Selector
Posted: Tue Apr 04, 2023 8:02 am
by VanGogh
Hi! Where can I download the libraries: variant.h, mcp_can.h for MCP 8MHZ?
I am using an Arduino Nano with a module mcp2515 and library mcp2515.h.
Re: can id´s 4 Gear Selector
Posted: Tue Apr 04, 2023 8:13 am
by tom91
VanGogh wrote: ↑Tue Apr 04, 2023 8:02 am
Hi! Where can I download the libraries: variant.h, mcp_can.h for MCP 8MHZ?
I am using an Arduino Nano with a module mcp2515 and library mcp2515.h.
I believe this one should be okay
https://github.com/autowp/arduino-mcp2515
nkiernan wrote: ↑Tue Apr 04, 2023 7:21 am
Was having some compile issues (old CAN library installed, but when I updated to the latest, it required 3 arguments instead of the 2 used), so had to change below for my setup:
Libraries and sharing them is always a painful part of the Arduino system.
Re: can id´s 4 Gear Selector
Posted: Tue Apr 04, 2023 7:01 pm
by VanGogh
I found mcp_can.h library on git. Applied nkiernan's advice uploaded to arduino. What should happen? Maybe I don't have a CAN bus connection? The port monitor should display information with the line 0x312 from selector?

Re: can id´s 4 Gear Selector
Posted: Tue Apr 04, 2023 7:59 pm
by tom91
VanGogh wrote: ↑Tue Apr 04, 2023 7:01 pm
I found mcp_can.h library on git. Applied nkiernan's advice uploaded to arduino. What should happen? Maybe I don't have a CAN bus connection? The port monitor should display information with the line 0x312 from selector?
It does not print anything, as the Leds will feedback on the knob.
Send it the letter 'd' is you want to toggle canbus debugging.
Re: can id´s 4 Gear Selector
Posted: Tue Apr 04, 2023 8:08 pm
by VanGogh
I don't understand. Maybe my GSM doesn't work with this code? Because on the video of the seller from Aliexpress there is no mine. Does anyone have a video review of working GSM with arduino? How to make the knob move? I haven't been able to move it for 2 weeks now((((
I Send it the letter 'd', but nothing. Then 's', then 'w' and nothing(((
Re: can id´s 4 Gear Selector
Posted: Tue Apr 04, 2023 8:26 pm
by nkiernan
VanGogh wrote: ↑Tue Apr 04, 2023 8:08 pm
I don't understand. Maybe my GSM doesn't work with this code? Because on the video of the seller from Aliexpress there is no mine. Does anyone have a video review of working GSM with arduino? How to make the knob move? I haven't been able to move it for 2 weeks now((((
I Send it the letter 'd', but nothing. Then 's', then 'w' and nothing(((
Couple of suggestions. You have the CAN lines connected between the arduino CAN shield and the Jag unit and did you check the resistance between the lines ( approx 60R). Think I added a 120R resistor between the lines because my CAN shield didn't have the termination resistor.
You're applying 12V+ and GND to relevant pins and are you applying the 12V+ ignition signal also? When you open serial monitor in arduino and connected to the UNO, this is what would print when first powered up or reset (baud rate is set to 115200 yes?):
- Entering Configuration Mode Successful!
Setting Baudrate Successful!
CAN BUS OK!
Time Stamp,ID,Extended,LEN,D1,D2,D3,D4,D5,D6,D7,D8
Looking at the SerialComms function in the code, I don't think 'd' is specified as CAN debug? But 's' should raise knob and 'q' should lower it. I need to test but think when ignition is applied selector knob would raise (tbc).
Re: can id´s 4 Gear Selector
Posted: Tue Apr 04, 2023 8:51 pm
by tom91
VanGogh wrote: ↑Tue Apr 04, 2023 8:08 pm
I don't understand. Maybe my GSM doesn't work with this code? Because on the video of the seller from Aliexpress there is no mine. Does anyone have a video review of working GSM with arduino? How to make the knob move? I haven't been able to move it for 2 weeks now((((
I Send it the letter 'd', but nothing. Then 's', then 'w' and nothing(((
Please show us your wiring setup, as wiring can be an issue.
Have you ever gotten canbus from it using anything else?
Re: can id´s 4 Gear Selector
Posted: Tue Apr 04, 2023 8:53 pm
by tom91
nkiernan wrote: ↑Tue Apr 04, 2023 8:26 pm
Looking at the SerialComms function in the code, I don't think 'd' is specified as CAN debug? But 's' should raise knob and 'q' should lower it. I need to test but think when ignition is applied selector knob would raise (tbc).
gen 1 ignition rasies knob.
d toggles debug for canbus
Re: can id´s 4 Gear Selector
Posted: Tue Apr 04, 2023 9:07 pm
by VanGogh
Thanks I tried.
I have another code for arduino and used canhacker 2.00.02 to find signals without 120 ohm resistor. But he could not find the signals to raise the knob. Found your code and can't get any results with it. There is no resistance between the CAN bus contacts. I added a 150 ohm resistor and no change (or do you need 120 ohms?). I sent a letter 'w' and the port monitor says "UnLocked" and "Locked" but I don't hear the solenoid valve inside.
When I send other characters nothing happens at all
Re: can id´s 4 Gear Selector
Posted: Tue Apr 04, 2023 9:13 pm
by nkiernan
tom91 wrote: ↑Tue Apr 04, 2023 8:53 pm
gen 1 ignition rasies knob.
d toggles debug for canbus
Apologies Tom, was using your sketch from the first link (gen 2):