Page 1 of 1
change from key start to button start
Posted: Wed Mar 26, 2025 1:20 am
by medo
Hi, so on my BMW the start command (0x55) is missing when I turn the key to the crank position, possibly because of the missing engine control unit, how can I change this in the BMW_E65.cpp file so that I use a start button for it, I don't want it to go into Run mode immediately when the ignition is turned on
Code: Select all
void BMW_E65::handle130(uint32_t data[2])
{
uint8_t* bytes = (uint8_t*)data;
/*
if ((bytes[0] == 0x45) || (bytes[0] == 0x55))
{
// 0x45 is run, 0x55 is engine crank request
terminal15On = true;
}
else
{
terminal15On = false;
}
*/
if ((bytes[0] & 0x01) > 0)
{
terminalROn = true;
}
else
{
terminalROn = false;
}
if ((bytes[0] & 0x04) > 0)
{
terminal15On = true;
}
else
{
terminal15On = false;
}
if ((bytes[0] & 0x10) > 0)
{
terminal50On = true;
}
else
{
terminal50On = false;
}
if ((bytes[2] & 0x08) > 0)
{
StartButt = true;
}
else
{
StartButt = false;
}
}
that should be in this code section
Re: change from key start to button start
Posted: Wed Mar 26, 2025 10:02 am
by tom91
medo wrote: ↑Wed Mar 26, 2025 1:20 am
Run mode immediately when the ignition is turned on
Why? you will end up draining your 12V battery.
Re: change from key start to button start
Posted: Wed Mar 26, 2025 11:36 am
by medo
So, again, key in, nothing happens on the VCU, key position radio, nothing happens on the VCU, key position ignition T15, VCU goes immediately into run mode, that's exactly what I don't want, actually a 0x55 should be sent at crank position on CAN, but it doesn't, therefore a button for start signal
Re: change from key start to button start
Posted: Wed Mar 26, 2025 12:29 pm
by tom91
How do propose it to work for your case then? Not a standard bmw button over CAN?
You can change the code however you want. Just replace the CAN based signals with the digital ones from the Classic Vehicle class.
Re: change from key start to button start
Posted: Wed Mar 26, 2025 12:43 pm
by medo
I have no idea why the CAN message 0x55 does not appear on the crank position, the message 0x45 appears on the ignition position, it is a BMW E60, identical to the E65, at least from the CAN messages
Re: change from key start to button start
Posted: Wed Mar 26, 2025 1:11 pm
by jrbe
medo wrote: ↑Wed Mar 26, 2025 12:43 pm
I have no idea why the CAN message 0x55 does not appear on the crank position
Is there an immobilizer missing?
Re: change from key start to button start
Posted: Wed Mar 26, 2025 1:16 pm
by medo
No, it's all original, I just removed the engine control unit, it was a diesel before
But it must also be programmed so that as soon as the ignition is on, it immediately goes into run mode
so T15 and start signal in one
Re: change from key start to button start
Posted: Wed Mar 26, 2025 8:14 pm
by medo
I changed the code for testing, so that when the can message 0x45 comes to id130, T15 changes to on, but the LDU goes to run mode, something is wrong.
Code: Select all
void BMW_E65::handle130(uint32_t data[2])
{
uint8_t* bytes = (uint8_t*)data;
if (bytes[0] == 0x45)
{
terminal15On = true;
}
else
{
terminal15On = false;
}
}
Re: change from key start to button start
Posted: Fri Apr 04, 2025 9:30 pm
by medo
Can anyone really help me modify the BMW_e65.cpp file so that I can use a classic key?
Unfortunately, I don't know much about programming.
Re: change from key start to button start
Posted: Sat Apr 05, 2025 6:29 am
by arber333
Huh if i think analog to my Pug VCU i need to send it "engine running signal" for it to go out of eco mode and start cabin power supply. For me this signal is coupled from two parts... Engine RPM at least 800rpm and positive signal on the alternator signal wire. Then internal BSI starts car operation.
Re: change from key start to button start
Posted: Sat Apr 05, 2025 11:23 am
by medo
I finally managed to change Ready and Start to classic, it works so far, but I get a warning when compiling, what does that mean
Code: Select all
src/hwinit.cpp: In function 'void clock_setup()':
src/hwinit.cpp:46:21: warning: 'void rcc_clock_setup_in_hse_8mhz_out_72mhz()' is deprecated: use rcc_clock_setup_pll(&rcc_hse_configs[RCC_CLOCK_HSE8_72MHZ]) [-Wdeprecated-declarations]
46 | RCC_CLOCK_SETUP();
| ^
In file included from libopencm3/include/libopencm3/stm32/rcc.h:26,
from src/hwinit.cpp:26:
libopencm3/include/libopencm3/stm32/f1/rcc.h:780:6: note: declared here
780 | void rcc_clock_setup_in_hse_8mhz_out_72mhz(void) LIBOPENCM3_DEPRECATED("use rcc_clock_setup_pll(&rcc_hse_configs[RCC_CLOCK_HSE8_72MHZ])");