Photon to BMW iDrive controller - CANBUS

photon
Tags: #<Tag:0x00007f038e350fc8>

#1

Hi all,

I’m trying to connect a Photon to a BMW iDrive controller over CANBUS without much success. This is the controller I’m trying to use.

I have a MCP2551 transceiver between the photon and iDrive controller. No matter what I try I am not receiving any data. The only part that needs initialising is the rotary encoder but the buttons should work without this. The controller could be running at either 100khz or 500khz and I’ve tried both without success.

Here’s the current code I’m using. Keeping it simple at the moment and just hoping to see a message count. I’ve checked the code used by carloop and apart from initialising the canbus I don’t see anything missing.

https://go.particle.io/shared_apps/5c5d65ddecdfdd002068b3c4

Just wanted to check if I need another controller such as a mcp2515.

Thanks for any help,
Kev


#2

This is really funny but I ended up on your post because I was doing the same thing (not with a photon even thou I have one) but with a specific tool for CAN buses and not getting absolutely nothing. Supposedly the buttons don’t need any setup, it should work as soon as you connect power to the device but I’m not even getting the backlight on when connecting power (it should go to sleep after 3-5 seconds) but I’m getting nothing.

I’ve tried sending pretty much every message I could find on the internet, even sending all possible ID’s (program looping thru each one of them but don’t have the correct values for each ID so tried some that found on the web, the same one you used above FD 00 as well (only 2 bytes) but absolutely nothing is sending any response.

Hope to find the wake up message and values for this particular controller.


#3

Nice to know it’s not just me! I also have no signs of life. No backlight either.

I have 12v in pin 1, gnd in 2, can hi in 3 and can low in 4. It’s nice the pins are labelled on the controller.

I have no idea what to try next.


#4

@Floridian

I had some help from IAm Orion on youtube and have it working now with only the Photon and MCP2551 transceiver.

You have to initialize the controller! I also have the commands for lights on and off working

Here’s my code displaying the canbus output over serial.

https://go.particle.io/shared_apps/5c5ee09836a9800012e65ca8

Let me know if you get your working!

Kev


#5

I came here just to post what I’ve found. It is alive!

It seems that the versions we have are different. Mine wakes up with:
0x560 00 00 00 00 57 2F 00 60

and then you poll with 0x500 and it returns the status of the different buttons.

I can’t turn on(or off) the backlight with 202 I started to think that I might have a backlight issue but up to a few hours ago I thought the controller was dead so I’ll keep trying. Hope this helps somebody for reference.

What are you going to be using this controller at? In my case I’ll be using in on a RV infotainment system.

Thanks for sharing your finds!!! (just a suggestion, I’ve been searching for code all around, it’ll be nice if you put the code of your app here so in case the app goes away the code is still here for reference)


#6

I’m pleased yours is working.

Mine sends out an “I’m awake” message every second which increments and also outputs when the buttons are pressed or the rotary is turned. Polling is only used to keep it awake.

Is yours running at 100khz or 500khz? I’ll post the model and year of mine when I get the chance.


#7

I do have the incremental counter as well (0x5E7) but it only works if I poll it, if I stop polling it no information is sent back from the controller and also don’t have a register for the rotary control. I’m thinking that the version I have has to be set before I can read it (I’ve seen an old version that needed to be set before you can read it)

Mine is working at 500khz.
Mine is year model 01.06.16
6582-6839079-01
Software version: 03.0A.01
Hardware version: 03.02.00


#8

Ah you have the fancy touch version.

IAm Orion has that working too. Even the touch interface.
https://www.youtube.com/user/gmailjamestanner

Mine controller is
6582 9286699-03
05.06.15


#9

Nice! I didn’t know of that video. My device doesn’t need any particular init code for the touch portion of it, it just starts spewing info when you init it (0x560) and then as soon as you touch there are 8 bytes of info that changes while you move your finger on top of it. No real use for that right now, I might use it as a mouse but I’ll prefer to get the rotary init code. On my version there is a specific value that needs to be passed to message 273 and it has to be very specific to get the rotary encoder going, haven’t been able to figure it out yet.

Thanks for sharing that link, it is nice to see other people doing the same thing!


#10

Here’s the finished (as much as any code is every finished) library for using the iDrive controller with a Photon.

I used a cheap CJMCU-2551 breakout between the Photon and iDrive controller.


#11

So, just curious, but what are planning to do in this project? What’s the goal here? Wishing you much success, by the way! :slight_smile:


#12

That’s what my wife asked. No plan for it at the moment. Would be good to get it battery powered and in a case. I wanted to do something with can bus and this was a good entry project.


#13

Love the library! I hope it stays there as I haven’t seen a lot of info that stays for a long period of time (I wonder if there areany legal issues with that…)

Thanks for sharing the library with the rest of us!


#14

In my case I have an old RV and in the process of building a digital dashboard for it (3 surface books as dashboard, one for the passanger to be used as gps and turn by turn guidance,one for infotainment: I use this for FM/AM/WB, seat controls (ac, heat, move them, massages, etc.) dashboard ac control, house control, generator control, etc. and the third one is the one were engine parameters are shown, a diesel engine)

So going back to your question for the infotainment display I need something I can move without looking, it feels better(to me) than looking away and dosome action so fot that I have this device connected theu isb to a win32 program that receives all the movement from this control.

Now I started to play with the gear shifter for a 328i to see if I can use that instead of touching the screen to change gears (it feels weird to me)


#15

Wow that’s an amazing project. Are you documenting it somewhere?


#16

No, I’m doing on my own time and I have very little time as it is if I document it it’ll take even longer, I’ll probably do some video after I’m done.

I’ll give you an idea, use a USB or a BLE devixe and you have a wired (or wirless) ‘mouse’. if you have a car the exact same concept can be used, just connect to pins 6 and 14 on your ODB2 connector and you can mimic and add functionality to your car, like closing all windows and roof when you long press your remote control. Just simple fun :slight_smile:


#17

Wow, this sounds amazing!! Very ambitious, and when done, should be amazingly cool. Thanks for sharing – would love to see pix when you catch your breath down the road.


#18

Excellent; great to know. Maybe a project in my future!