Hey everyone!
I have shamefully been working on this project for over five years. However, recent coding skill expansion and a general better understanding of electronics has allowed me to move forward with this project. The final product will have the following features:
- keyless entry and keyless start
- iDrive 6 NBT EVO integration
- companion app to see trip data just as if it were a new BMW
- front rear PDC
- backup camera, maybe 360 camera
- trip data carried over to iDrive unit
Original implementation:
In late 2020, I bought a 2020 M240i FEM (think GM5, LCM and more all in one fat computer), NBT EVO (idrive), ATM (your wireless reception) and a bunch of sensors over. This was actually fueled by my desire to B58 swap my white ZHP at the time. I figured out all the electronics on how I was going to make it all work, and then my buddy said I should drive his E46 M3 before I committed. I scoffed and commented on how bad I hear it sounds online, and how it seems so temperamental for how much horsepower you get. So four days after my test drive, I formed my own opinion, I listed my ZHP, and about three weeks later, I purchased my first M car.
Even though I had abandoned the engine swap and basically set fire to dozens, probably hundreds of hours of research (F10 M5 steering angle sensor to complete the flexray loop, some gen E60 WSS to make the Mk100 happy for anyone who wants to do it with full TC), I loved the new powerplant the S54 provided. I knew I still I wanted iDrive, and got all this supplemental stuff such as key sensors, start buttons etc to fully mimmic the keyless recognition system. To me, this would just prove that cars didn't get heavy because of "the tech," which I feel is a regular excuse they use.
I really wanted to bring keyless entry over, and after hours of research I finally figured it out. So if you want to unlock and start keyless, you'll need the F30 style key and if you want the key, I still want to be able to "hold unlock" to roll the windows down. Okay, so then I need not only the key sensors and to re-pin the door locks, but also the window. And then the stop signals work differently. Oh! And now that your windows and locks work on F30 electronics, you need that for the alarm now. Oh, the entire alarm is controlled by the damn thing in the ceiling? That's just great. And I'd still need an interceptor to disengage the starter. It will happily engage without the DME, but needs the DME response to disengage the starter. So I'd just cut off the starter at a certain RPM with a certain controller. Suddenly we're talking about entirely rewiring the vehicle. I would have put the FEM - main brain, right where the GM5 is and have an intermediary harness to connect all the inputs. So I got a spare GM5, took it apart, found the connectors. Okay, so then I needed an intermediary PCB board. This project was quickly exploding in scope and had too many error points for my comfort level
Preferred Implementation:
I have spent the last two weeks outlining what the preferred implementation would look like. Ideally, it would work just like a new 2025 BMW: you walk and approach the car, the welcome door handle lights come on, as you get closer, it unlocks, and then when you're in the car, you press a power button (cig lighter location?) and it turns on. While this is sweet, there are a number of issues with this wet dream:
1) Hardware heavy: To immitate BMW's implementation and therefore have everything required for Apple Car Key, I'd need 6 UWB sensors, 6 135Khz antennas and 1-2 BLE antennas. In itself, not insanely difficult or expensive, but the calibration process would be insane. You'd want a fall back key as well. If you're keyless, the E46 key no longer suffices. If you have a custom key, you need to effortlessly engineer the power optimization through all these stages so the key doesn't die every week. If it needed a new battery every week, every month or every three months, the product is DOA. I could compromise with an Apple Watch style charger, but that is closed-source. If you had to plug it in, it might as well have been your phone. This would mean I'd need to engineer insane power state control that likely, would be very difficult to engineer. I was thinking of adding a LIS2DH12 or similar to wake the key from sleep when motion was detected. Brilliant because if the key isn't moving, no need to do any detecting (but I just thought of a state where you leave the key in the car overnight. You'd have to like, jiggle it or pick it up to start the car. Not the worst because that'd likely be your first instinct if it didn't work). Then poll 135kHz to see if you're near the car, and essentially slowly move to more precise locationing. It's not impossible, and maybe some day I will persue this to goal for Apple Car Key certification, but not for now
2) calibration: with so many sensors at so many different frequencies, I'd have to code in a calibration process and a way to store said calibration. Again, not impossible, but immensely difficult over about 14-15 sensors. For what the end result is
Current Implementation Scope:
Keyless Entry and Keyless Start:
- primary key: your phone. Mobile developement is something I'm reasonably good at. I could design a pairing process. This would allow you to set some settings such as unlock on approach or only unlock on door handle touch. I could use BLE for these settings and other communication I'll mention down below, and rough positioning. You won't have OEM accuracy, but I can probably get within a foot which should be sufficient for 95% of use cases. I consider this pretty good for a one man show
- secondary key: Since my app won't get Apple's blessing and therefore has some very small but unignorable windows where the app may not work (could work with user intervention but always nice to have a non-phone alternative) or your phone is dead, you need a fallback. A NFC card with a sensor in the door handle (or B-pillar trim, still TBD) and another in the center console to authenticate start.
- I'll have to do some research as I know ISTA can send a "unlock car" and "lock car" command. If this is safe, then I can have a module in the car immitate these commands after a successful challenge completed
iDrive integration: (front and rear PDC, camera)
Since I'll still need a brain in the car to manage all of the key functions, I can double down and use it for iDrive. It'll tap into K-Bus for most car info & steering wheel controls to translate to the headunut (and for it's own understanding of lock and unlock). It'll talk to the headunit with K-CAN, the only true necessary bus. It will bring over when the user unlocks the car, opens the car but hasn't started, state key position 2, reverse for backup camera, steering angle for when reversing and for HU to validate GPS directions, rpm, fuel and speed for trip computer, light status for backlight, when the car is off but a door hasn't opened, when the car is off and a door has opened since the car turned off. Those immitate actual logic that the F3x cars use.
Extra F30 features:
I'll bring over the REM to handle front and rear PDC. It may need PT-CAN emulation, but that will be learned further in testing. The ATM, which is the GPS. And the camera module. I have one from the F3x. This supports a rear camera, one on each mirror and a camera in the bumper for cross traffic alert - like when you're inching out of an ally but can't see cars coming. I am 80% confident you can grab a unit from say, the F15, and instead have a front camera, which I think would be way more useful for curbs.
Additional Custom features:
- calibration through the app
- heated seat pre-conditioning via PWM control interception from an e9x heated seat module
- view your trip data on your home screen like the BMW app (I will take a lot of inspiration from BMWs app as it looks quite nice)
- 12V pin for anyone who wants to add welcome lights
- 12V pin for anyone who wants to add puddle lights. Both of these can't be tied in to your interior lights, because that means they'd come on while you're driving
Heavily unknowns:
- K_LIN_15 and K_LIN_1 have a lot of overlap and clearly handle messaging relating to brightness. I want auto-dimming mirrors, and may tap into this communication system to get a fectory controlled system that doesn't require wires from the mirror
So as I finish typing this, I'm going to make a lasagna, and then pull out my massive M240 bench and start sniffing. I have lost most of my can bus research as my developement laptop woke up one day and decided to stop laptoping. SSD also decided to no longer response - absolutely fantastic as I have 250MB of data. Thankfully I have someone local who kindly offered me his girl's F87 M2 for sniffing. I have custom plug-and-play harnesses so its undestructive for me to sniff.
Things that would be cool if people eventually like the progress here and want to lend a hand:
- I feel confident there is enough room in the mirrors for the mirror cameras. Proabbly could be good to do a scan of the driver mirror casing and then bare shell. I'm buying a camera right now...
- I haven't done any mockup for the rear camera placement. To be honest, I'm totally lost on this as the depth will be tight. Right now it's a "later Tyler's" problem, and that guy sucks
I have shamefully been working on this project for over five years. However, recent coding skill expansion and a general better understanding of electronics has allowed me to move forward with this project. The final product will have the following features:
- keyless entry and keyless start
- iDrive 6 NBT EVO integration
- companion app to see trip data just as if it were a new BMW
- front rear PDC
- backup camera, maybe 360 camera
- trip data carried over to iDrive unit
Original implementation:
In late 2020, I bought a 2020 M240i FEM (think GM5, LCM and more all in one fat computer), NBT EVO (idrive), ATM (your wireless reception) and a bunch of sensors over. This was actually fueled by my desire to B58 swap my white ZHP at the time. I figured out all the electronics on how I was going to make it all work, and then my buddy said I should drive his E46 M3 before I committed. I scoffed and commented on how bad I hear it sounds online, and how it seems so temperamental for how much horsepower you get. So four days after my test drive, I formed my own opinion, I listed my ZHP, and about three weeks later, I purchased my first M car.
Even though I had abandoned the engine swap and basically set fire to dozens, probably hundreds of hours of research (F10 M5 steering angle sensor to complete the flexray loop, some gen E60 WSS to make the Mk100 happy for anyone who wants to do it with full TC), I loved the new powerplant the S54 provided. I knew I still I wanted iDrive, and got all this supplemental stuff such as key sensors, start buttons etc to fully mimmic the keyless recognition system. To me, this would just prove that cars didn't get heavy because of "the tech," which I feel is a regular excuse they use.
I really wanted to bring keyless entry over, and after hours of research I finally figured it out. So if you want to unlock and start keyless, you'll need the F30 style key and if you want the key, I still want to be able to "hold unlock" to roll the windows down. Okay, so then I need not only the key sensors and to re-pin the door locks, but also the window. And then the stop signals work differently. Oh! And now that your windows and locks work on F30 electronics, you need that for the alarm now. Oh, the entire alarm is controlled by the damn thing in the ceiling? That's just great. And I'd still need an interceptor to disengage the starter. It will happily engage without the DME, but needs the DME response to disengage the starter. So I'd just cut off the starter at a certain RPM with a certain controller. Suddenly we're talking about entirely rewiring the vehicle. I would have put the FEM - main brain, right where the GM5 is and have an intermediary harness to connect all the inputs. So I got a spare GM5, took it apart, found the connectors. Okay, so then I needed an intermediary PCB board. This project was quickly exploding in scope and had too many error points for my comfort level
Preferred Implementation:
I have spent the last two weeks outlining what the preferred implementation would look like. Ideally, it would work just like a new 2025 BMW: you walk and approach the car, the welcome door handle lights come on, as you get closer, it unlocks, and then when you're in the car, you press a power button (cig lighter location?) and it turns on. While this is sweet, there are a number of issues with this wet dream:
1) Hardware heavy: To immitate BMW's implementation and therefore have everything required for Apple Car Key, I'd need 6 UWB sensors, 6 135Khz antennas and 1-2 BLE antennas. In itself, not insanely difficult or expensive, but the calibration process would be insane. You'd want a fall back key as well. If you're keyless, the E46 key no longer suffices. If you have a custom key, you need to effortlessly engineer the power optimization through all these stages so the key doesn't die every week. If it needed a new battery every week, every month or every three months, the product is DOA. I could compromise with an Apple Watch style charger, but that is closed-source. If you had to plug it in, it might as well have been your phone. This would mean I'd need to engineer insane power state control that likely, would be very difficult to engineer. I was thinking of adding a LIS2DH12 or similar to wake the key from sleep when motion was detected. Brilliant because if the key isn't moving, no need to do any detecting (but I just thought of a state where you leave the key in the car overnight. You'd have to like, jiggle it or pick it up to start the car. Not the worst because that'd likely be your first instinct if it didn't work). Then poll 135kHz to see if you're near the car, and essentially slowly move to more precise locationing. It's not impossible, and maybe some day I will persue this to goal for Apple Car Key certification, but not for now
2) calibration: with so many sensors at so many different frequencies, I'd have to code in a calibration process and a way to store said calibration. Again, not impossible, but immensely difficult over about 14-15 sensors. For what the end result is
Current Implementation Scope:
Keyless Entry and Keyless Start:
- primary key: your phone. Mobile developement is something I'm reasonably good at. I could design a pairing process. This would allow you to set some settings such as unlock on approach or only unlock on door handle touch. I could use BLE for these settings and other communication I'll mention down below, and rough positioning. You won't have OEM accuracy, but I can probably get within a foot which should be sufficient for 95% of use cases. I consider this pretty good for a one man show
- secondary key: Since my app won't get Apple's blessing and therefore has some very small but unignorable windows where the app may not work (could work with user intervention but always nice to have a non-phone alternative) or your phone is dead, you need a fallback. A NFC card with a sensor in the door handle (or B-pillar trim, still TBD) and another in the center console to authenticate start.
- I'll have to do some research as I know ISTA can send a "unlock car" and "lock car" command. If this is safe, then I can have a module in the car immitate these commands after a successful challenge completed
iDrive integration: (front and rear PDC, camera)
Since I'll still need a brain in the car to manage all of the key functions, I can double down and use it for iDrive. It'll tap into K-Bus for most car info & steering wheel controls to translate to the headunut (and for it's own understanding of lock and unlock). It'll talk to the headunit with K-CAN, the only true necessary bus. It will bring over when the user unlocks the car, opens the car but hasn't started, state key position 2, reverse for backup camera, steering angle for when reversing and for HU to validate GPS directions, rpm, fuel and speed for trip computer, light status for backlight, when the car is off but a door hasn't opened, when the car is off and a door has opened since the car turned off. Those immitate actual logic that the F3x cars use.
Extra F30 features:
I'll bring over the REM to handle front and rear PDC. It may need PT-CAN emulation, but that will be learned further in testing. The ATM, which is the GPS. And the camera module. I have one from the F3x. This supports a rear camera, one on each mirror and a camera in the bumper for cross traffic alert - like when you're inching out of an ally but can't see cars coming. I am 80% confident you can grab a unit from say, the F15, and instead have a front camera, which I think would be way more useful for curbs.
Additional Custom features:
- calibration through the app
- heated seat pre-conditioning via PWM control interception from an e9x heated seat module
- view your trip data on your home screen like the BMW app (I will take a lot of inspiration from BMWs app as it looks quite nice)
- 12V pin for anyone who wants to add welcome lights
- 12V pin for anyone who wants to add puddle lights. Both of these can't be tied in to your interior lights, because that means they'd come on while you're driving
Heavily unknowns:
- K_LIN_15 and K_LIN_1 have a lot of overlap and clearly handle messaging relating to brightness. I want auto-dimming mirrors, and may tap into this communication system to get a fectory controlled system that doesn't require wires from the mirror
So as I finish typing this, I'm going to make a lasagna, and then pull out my massive M240 bench and start sniffing. I have lost most of my can bus research as my developement laptop woke up one day and decided to stop laptoping. SSD also decided to no longer response - absolutely fantastic as I have 250MB of data. Thankfully I have someone local who kindly offered me his girl's F87 M2 for sniffing. I have custom plug-and-play harnesses so its undestructive for me to sniff.
Things that would be cool if people eventually like the progress here and want to lend a hand:
- I feel confident there is enough room in the mirrors for the mirror cameras. Proabbly could be good to do a scan of the driver mirror casing and then bare shell. I'm buying a camera right now...
- I haven't done any mockup for the rear camera placement. To be honest, I'm totally lost on this as the depth will be tight. Right now it's a "later Tyler's" problem, and that guy sucks

Comment