change from key start to button start

Post Reply
medo
Posts: 167
Joined: Thu Dec 07, 2023 9:32 pm
Location: Kosova
Has thanked: 18 times
Been thanked: 1 time

change from key start to button start

Post 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
User avatar
tom91
Posts: 2294
Joined: Fri Mar 01, 2019 9:15 pm
Location: Bristol
Has thanked: 199 times
Been thanked: 524 times

Re: change from key start to button start

Post 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.
Creator of SimpBMS
Founder Volt Influx https://www.voltinflux.com/
Webstore: https://citini.com/
medo
Posts: 167
Joined: Thu Dec 07, 2023 9:32 pm
Location: Kosova
Has thanked: 18 times
Been thanked: 1 time

Re: change from key start to button start

Post 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
User avatar
tom91
Posts: 2294
Joined: Fri Mar 01, 2019 9:15 pm
Location: Bristol
Has thanked: 199 times
Been thanked: 524 times

Re: change from key start to button start

Post 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.
Creator of SimpBMS
Founder Volt Influx https://www.voltinflux.com/
Webstore: https://citini.com/
medo
Posts: 167
Joined: Thu Dec 07, 2023 9:32 pm
Location: Kosova
Has thanked: 18 times
Been thanked: 1 time

Re: change from key start to button start

Post 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
jrbe
Posts: 567
Joined: Mon Jul 03, 2023 3:17 pm
Location: CT, central shoreline, USA
Has thanked: 199 times
Been thanked: 165 times

Re: change from key start to button start

Post 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?
medo
Posts: 167
Joined: Thu Dec 07, 2023 9:32 pm
Location: Kosova
Has thanked: 18 times
Been thanked: 1 time

Re: change from key start to button start

Post 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
medo
Posts: 167
Joined: Thu Dec 07, 2023 9:32 pm
Location: Kosova
Has thanked: 18 times
Been thanked: 1 time

Re: change from key start to button start

Post 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;
    }
}
medo
Posts: 167
Joined: Thu Dec 07, 2023 9:32 pm
Location: Kosova
Has thanked: 18 times
Been thanked: 1 time

Re: change from key start to button start

Post 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.
arber333
Posts: 3554
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 131 times
Been thanked: 330 times
Contact:

Re: change from key start to button start

Post 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.
medo
Posts: 167
Joined: Thu Dec 07, 2023 9:32 pm
Location: Kosova
Has thanked: 18 times
Been thanked: 1 time

Re: change from key start to button start

Post 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])");
Post Reply