Announcement

Collapse
No announcement yet.

iDrive 6 + Keyless entry + BMW Connected Drive

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    iDrive 6 + Keyless entry + BMW Connected Drive

    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

    #2
    Hell yeah, I'm excited to follow along with this. Let me know if you need anything 3D scanned.
    2002 Topasblau M3 - Coupe - 6MT - Karbonius CSL Airbox - MSS54HP Conversion - SSV1 - HJS - Mullet Tune - MK60 Swap - ZCP Rack - Nogaros - AutoSolutions - 996 Brembos - Slon - CMP - VinceBar - Koni - Eibach - BlueBus - Journal

    2012 Alpinweiss 128i - Coupe - 6AT - Slicktop - Manual Seats - Daily - Journal

    Comment


      #3
      Originally posted by heinzboehmer View Post
      Hell yeah, I'm excited to follow along with this. Let me know if you need anything 3D scanned.
      Thank you! I have a good number of stuff to bring to scan, but I want to get a little further with the electronics first. If I continue to move at the pace as yesterday, very soon.


      Like I said, I lost my setup from my old coding laptop since the SSD stopped SSD-ing. I first spent some time installing my can-sniffing data into my iDrive bench.

      I then burned about 2 hours coming up with a modular harness to tie into my bench that allowed me to both read and write to the bench. I made the harnesses long so I could still lay down on my couch while messing with the bus, only to realize I could have just made some short harnesses and just bought long USB cables. Well, now I have both!🫠

      I started re-validating signals that I vaguely recalled, such as wake up. I wrote some rough, untested code to send messages to the bus. Because I am using an FEM, my busses are noisy. And because I don't have a complete car, some messages are hard to validate. For example, while we have key off, position 1, position 2 and running, the F30 has some cool other positions such: sleep, car unlocked, car unlocked and driver present, and then a few position 2's that don't matter .

      I think I'm already needing a real car. The majority of the remaining signals are hard for me to see without the car. IDrive only sees one protocol, so all I need to see is K-CAN2 messages that show:
      - camera mode active and inactive
      - reverse requested (vs drive)
      - WSS
      - SAS
      - trip information. E46 just stores the trip too, which is nice
      - rpm…feels like it'd be good to have

      I think that's it

      Comment


        #4
        Alright. Yes, I am in dire need of photos. But I'm in the midst of brilliance. So here's the latest update:
        - I have a sea of recorded (but not personally verified) messages
        - I have completed my F30 bench. I effecitvely can run an M240 on my coffee table, complete with iDrive controller and and working OBD port for ISTA.
        - I have custom firmware that can read and write to the bus
        - I am slowly but surely validating messages on the primary communication system for the iDrive headunit, including the VIN validation. I bought a spare headunit to try this - all my modules are tied by VIN, so I want to make sure I don't brick them.
        - I have strong leads on other messages, but I need a car to be rolling to validate them. I'm working on getting a car to assist with this.


        One fun part of the R&D that happened. So apparently, the SSD that I said stopping SSD-ing, did indeed continue to do SSD things. On it, was my 150MB, 20 minute log of K_CAN2 and PT_CAN as I drove around. I filmed myself doing various things in the car. So, I fed this obtusely large file to ChatGPT 5-Thinking and gave it the date stamped metadata of my video and rough time snippets of when I thought suspection actions took place. After it thought for 40 minutes, It successfully parsed all my GPS data, wheel speed sensors and RPM (to all be verified).

        Outside of the original scope I outlined, this also means that anyone who follows won't need to have an ATM. These are especially prohibitive. Only select models didn't come in a design that integrated with the ceiling. They are also VIN tied, making them exceptionally hard to buy. I'm also going to provide warnings for coolant and oil temperature, as long as those are projected on the E46 via K-BUS. I know they're on K-CAN, but I know I'll be able to do coolant either way. I'll also be adding retrofit mirror folding and mirror dimming. I'll grab E46 dimming data to discern when to pass the luminance value to the F30 mirror modules and will allow people to fold their mirrors from my app or to code it for them to fold on vehicle lock and unfold on unlock.

        One thing I suspect will be difficult is trip computer. I don't know an efficient way to log this data. I'll need a complete car, but the message bus will be noisy with all the other modules in the car. I can record a car's messages and replay them on my bench and slowly delete messages until said data dissappears...actually. I quite like that strategy.

        That's all for now!

        Comment


          #5
          Hell yea! Somehow I never caught your thread

          e46 doesn’t have mirror dimming data - it’s just a dumb sensor with voltage pins from the center rear view that get wired directly to driver/passenger. So you can retrofit auto dimming without needing the F30 stuff if that helps anything.

          You have a line on an F30 to record? Glad you’re still pushing! One of these days I’ll pick up designing a new center console that’ll work with the iDrive controller.
          ‘02 332iT / 6 | ‘70 Jaguar XJ6 electric conversion

          Comment


            #6
            Engineers gonna engineer.

            This is rad.

            Also, bold of you to think that our cars function enough to make this function lol
            2004 BMW ///M3 Carbon Black/Cinnamon 6MT Dinan S2 FBO NA Build
            2005 BMW ///M3
            Interlagos Blue/Black 6MT Dinan S3-R+

            2008 BMW ///M3 Alpine White/Bamboo/6MT Track Build
            2000 BMW ///M5 Royal Red/Extended Caramel 6MT In Progress
            2004 BMW X5 Toledo Blue/Sand Beige 6MT Dog Hauler
            2019 VW GSW S 4MO Platinum Grey/
            Black6MT Daily

            Instagram

            Comment


              #7
              Originally posted by Bry5on View Post
              Hell yea! Somehow I never caught your thread

              e46 doesn’t have mirror dimming data - it’s just a dumb sensor with voltage pins from the center rear view that get wired directly to driver/passenger. So you can retrofit auto dimming without needing the F30 stuff if that helps anything.

              You have a line on an F30 to record? Glad you’re still pushing! One of these days I’ll pick up designing a new center console that’ll work with the iDrive controller.
              Re mirror: Shawnrphotography reported that drawing his side mirros blew out his rear view mirror from the current or resistance over a long run. The goal is to allow a user to buy folding motors, dimming glass and the very abundant F30 mirror module in conjunction with my processor to then leverage the F30 failsafes and control system to have dimming and folding mirrors, especially now that the E46 switch has gone NLA (last I checked). I assumed this drastically increases the accessibiltiy of folding and dimming side mirrors on E46.

              I do not have an F30, but I think someone will let me use their F87. I have a PnP harness to tap into iDrive (K-CAN2), but I'll need to tap some wires to get TPMS and TRSVC (camera system) working as well. Hopefully they'll be willing. Definitely have to wait for the weather to clear up a bit.

              Originally posted by Sharocks View Post
              Engineers gonna engineer.

              This is rad.

              Also, bold of you to think that our cars function enough to make this function lol
              Thank you! I hope people enjoy the process. It's been a pain but I have a burst of motivation to get this over the finish line.

              I feel really bad I haven't posted any photos, so I'll include a few screenshots from the unedited reels I was going to put together. Here's the app:

              Click image for larger version  Name:	IMG_2869.jpg Views:	0 Size:	37.7 KB ID:	332432

              It's basically almost done. I already designed the bluetooth payloads. I forgot about the mirrors, but I'll make that a setting and a toggle. Probably just for me, but there will be a preheat option for those who aren't afraid of wiring and want to be able to preheat your driver heated seat. It can also be scheduled. You can check if your car is locked, see how much more range you have in your car, roll up your windows if you're just not sure and see where it's parked.

              I'm still debating if I want to make this a connected service so you can check things and control things from afar. I'm definitely up to it on an architectural level, but I don't know if there would be enough interest to justify the R&D. However, that would essentially make it a completely online service to track your car, get alerts about it unlocking/starting without you and check the locks and windows from afar.

              Click image for larger version  Name:	IMG_2868.jpg Views:	0 Size:	58.1 KB ID:	332433
              Got a few codes which conveniently tell me addresses of some messages

              Click image for larger version  Name:	IMG_2867.jpg Views:	0 Size:	114.5 KB ID:	332434 Click image for larger version  Name:	IMG_2865.jpg Views:	0 Size:	97.5 KB ID:	332435 Click image for larger version  Name:	IMG_2866.jpg Views:	0 Size:	59.6 KB ID:	332436

              And a few of the bench. It's broken up into two pieces: Master, slave. Master contains modules that the Fxx chassis have that I have no intention of carrying over. It has a single connection to the slave unit, which is all the modules that will go in the car. I reverse-engineered GPS cordinates, so now the cellular module/ATM is no longer something I'll bring over. Anyone who would want to follow along would only need an:
              - iDrive unit
              - TPMS (if they want temperature and a more reliable system)
              - TRSVC (if you want a back up camera. I need help creating a mounting solution for anyone willing to help)

              As Bryson knows, I originally wanted the iDrive controller. However, I have come up with a unique solution to this. I will use the RT up/down arrows and voice command buttons (programmable via the app). You can press the RT button to cycle between say: Map and Media. Or set to cycle between all the options. Hold RT to press menu. I'm still debating what the options will be. To be honest, I feel it's on me to pick 1-3 configurations that are the most relatable and leave it at that. Press vs hold programability over 4 buttons can be confusing and lead to people configuring the same options in multiple places.

              And lastly, here's the goal for the final screen bezel:

              Click image for larger version  Name:	idrive-6-mockup copy.jpg Views:	0 Size:	157.0 KB ID:	332437

              The buttons will be: mode, volume knob/power, 1,2,3,4,5,6,7, prev, next.

              That basically brings everyone up to speed
              Last edited by YoitsTmac; 01-06-2026, 02:42 AM.

              Comment


                #8
                If anyone knows someone with a heat station that is willing to solder a single, 16-pin processor onto a SMD to DIP breakout board, please please please PM me! I cannot do any of the E46 side until I can get assistance with this. It just doesn't make sense for me to buy a heat station for just these chips - the final PCB I'll get manufactured.

                Comment


                  #9
                  Okay bro now looking at this again and wow.

                  If I can keep my cupholders but have iDrive in the same place as my radio without any extra BS and still have CarPlay?

                  This man hit 2026 running.
                  2004 BMW ///M3 Carbon Black/Cinnamon 6MT Dinan S2 FBO NA Build
                  2005 BMW ///M3
                  Interlagos Blue/Black 6MT Dinan S3-R+

                  2008 BMW ///M3 Alpine White/Bamboo/6MT Track Build
                  2000 BMW ///M5 Royal Red/Extended Caramel 6MT In Progress
                  2004 BMW X5 Toledo Blue/Sand Beige 6MT Dog Hauler
                  2019 VW GSW S 4MO Platinum Grey/
                  Black6MT Daily

                  Instagram

                  Comment


                    #10
                    Count me in.

                    Would this run on aftermarket headunits like the Avant 4?
                    2004 Dinan S3-R M3
                    2023 X3M Competition

                    Comment


                      #11
                      Originally posted by YoitsTmac View Post
                      If anyone knows someone with a heat station that is willing to solder a single, 16-pin processor onto a SMD to DIP breakout board, please please please PM me! I cannot do any of the E46 side until I can get assistance with this. It just doesn't make sense for me to buy a heat station for just these chips - the final PCB I'll get manufactured.
                      You could do it with a hot air rework station in a pinch. That’s a good tool to have around and not too expensive.

                      Also, we could make an ash tray replacement with basic iDrive buttons and controls to give you some flexibility.
                      ‘02 332iT / 6 | ‘70 Jaguar XJ6 electric conversion

                      Comment


                        #12
                        Originally posted by YoitsTmac View Post
                        If anyone knows someone with a heat station that is willing to solder a single, 16-pin processor onto a SMD to DIP breakout board, please please please PM me! I cannot do any of the E46 side until I can get assistance with this. It just doesn't make sense for me to buy a heat station for just these chips - the final PCB I'll get manufactured.
                        For a 16 pin component, I'd probably try a thin soldering iron tip and lots of flux. The prototype doesn't have to be pretty. Just verify all the connections at the end with a multimeter.
                        If that doesn't work, you know where to find me
                        Last edited by heinzboehmer; 01-06-2026, 08:47 AM.
                        2002 Topasblau M3 - Coupe - 6MT - Karbonius CSL Airbox - MSS54HP Conversion - SSV1 - HJS - Mullet Tune - MK60 Swap - ZCP Rack - Nogaros - AutoSolutions - 996 Brembos - Slon - CMP - VinceBar - Koni - Eibach - BlueBus - Journal

                        2012 Alpinweiss 128i - Coupe - 6AT - Slicktop - Manual Seats - Daily - Journal

                        Comment


                          #13
                          Originally posted by Bry5on View Post
                          Also, we could make an ash tray replacement with basic iDrive buttons and controls to give you some flexibility.
                          The Z4 cruise control stalk might be a cool option. Looks like all communications go over one wire to the DME. Just a matter of running the wire to somewhere else and figuring out what each button press sends out.
                          2002 Topasblau M3 - Coupe - 6MT - Karbonius CSL Airbox - MSS54HP Conversion - SSV1 - HJS - Mullet Tune - MK60 Swap - ZCP Rack - Nogaros - AutoSolutions - 996 Brembos - Slon - CMP - VinceBar - Koni - Eibach - BlueBus - Journal

                          2012 Alpinweiss 128i - Coupe - 6AT - Slicktop - Manual Seats - Daily - Journal

                          Comment


                            #14
                            Originally posted by heinzboehmer View Post

                            The Z4 cruise control stalk might be a cool option. Looks like all communications go over one wire to the DME. Just a matter of running the wire to somewhere else and figuring out what each button press sends out.
                            I like this idea better!
                            ‘02 332iT / 6 | ‘70 Jaguar XJ6 electric conversion

                            Comment


                              #15
                              Originally posted by Sharocks View Post
                              Okay bro now looking at this again and wow.

                              If I can keep my cupholders but have iDrive in the same place as my radio without any extra BS and still have CarPlay?

                              This man hit 2026 running.
                              Thank you! Spare headunit came in yesterday. It now needs its own bench but I'll be sending my first messages tonight. Last night I made version one of my debug tool to select which messages I send on the bus while simultaneously reading other messages

                              Originally posted by 9kracing View Post
                              Count me in.

                              Would this run on aftermarket headunits like the Avant 4?
                              You can use the app to connect with the car and get mirror folding and remote seat heating - all remote services. But I can't feed BMW's iDrive to another brands headunit


                              Originally posted by Bry5on View Post

                              You could do it with a hot air rework station in a pinch. That's a good tool to have around and not too expensive.

                              Also, we could make an ash tray replacement with basic iDrive buttons and controls to give you some flexibility.
                              I want to put the start button in the ash tray. I'm struggling to decide how keyless will work. Apple won't give me CarKey. I thought about NFC watch bands but battery implications don't make sense. I need to upstep 12V to 48-50V for PWM bursts at 125khz for like 0.5 seconds or so. I'm normally software side, so something of that level is challenging for me.


                              Originally posted by heinzboehmer View Post

                              For a 16 pin component, I'd probably try a thin soldering iron tip and lots of flux. The prototype doesn't have to be pretty. Just verify all the connections at the end with a multimeter.
                              If that doesn't work, you know where to find me
                              I've never soldered anything thinner than a wire and I'm SLOPPY. I will try, anything else 😎. I don't want to pick up another side project and slow down this massive project in the process.



                              Originally posted by heinzboehmer View Post

                              The Z4 cruise control stalk might be a cool option. Looks like all communications go over one wire to the DME. Just a matter of running the wire to somewhere else and figuring out what each button press sends out.
                              Hah. All I read is an undocumented bus with zero validated messages. If it speaks to the DME, then it could be something bespoke. I think I have all the iDrive controller buttons figured out. It's not impossible, but also requires more hardware and some people may be using it for cruise. What inputs would you want to make happen from the stalk?

                              Comment

                              Working...
                              X