Page 1 of 3 123 LastLast
Results 1 to 10 of 27

Thread: Is anyone interested in a plugin to control RR from a newer BMW using the K-CAN bus?

  1. #1
    Low Bitrate
    Join Date
    Oct 2008
    Location
    Wiltshire, UK
    Posts
    62

    Is anyone interested in a plugin to control RR from a newer BMW using the K-CAN bus?

    I have been developing a plug-in and external hardware to interface between RR and the K-CAN of a BMW. This is still in development but it is working very well.

    I am using an Arduino and Canbus interface to passively listen to the BMW K-Can bus. (In layman's terms, the K-Can is a 100Khz interface that carries a plethora of car info and controls). For more info see :-_http://www.loopybunny.co.uk/CarPC/k_can.html
    Functions of the Arduino:-
    1) Read the Can-bus information and stream it out over a USB Com-port.
    2) Turn the PC and amplifiers on and off when the Lock and Unlock commands are seen.
    3) Replaces the Gong that sounds for the PDC, temperature and seat-belt's (Needed as I have removed the head-unit).
    I am also in the situation where I have added a Bluetooth module and I can stream the data to my Symbian Nokia N8. I guess it is only a small amount of work to create an Android plug-in or Windows phone app.

    The RR plug-in reads the data from the Com-port and parses the data into RR. The control and function is very similar to iBusRR and
    IBusCommunicatoRR.
    The plug-in had been tested and developed on an E84 BMW, but from what I have seen the E90 also works. If I was to have access to more logs I could probably extend it to other models (given time)

    A list of the Sliders, labels and Indicators that I have working are :-
    Code:
    KCanBusRR. Version 0.1 (Alpha)
    
    
    [Indicators Available]
    
    E84_LEFTIND  	; Left Indicator
    E84_RIGHTIND  	; Right Indicator
    E84_FOOT_BRAKE	; Foot brake pressed
    E84_CLUTCH	; Clutch depressed
    E84_REVERSE_SEL	; Reverse Gear Selected
    E84_WINDOW_FD	; Front Driver Window Open 
    E84_WINDOW_RD	; Rear Driver Window Open 
    E84_WINDOW_FP	; Front Passenger Window Open 
    E84_WINDOW_RP	; Rear Passenger Window Open 
    E84_DOOR_FD	; Front Driver door Open 
    E84_DOOR_RD	; Rear Driver door Open 
    E84_DOOR_FP	; Front Passenger door Open 
    E84_DOOR_RP	; Rear Passenger door Open 
    E84_LIGHTS	; Generic Indicator set if lights are on. (Side, Dip or Main)
    E84_HANDBRAKE	; Handbrake (Parking brake)
    E84_LIGHTS_SIDE	; Side Light Status
    E84_LIGHTS_DIP	; Dip Beam Status
    E84_LIGHTS_MAIN	; Main Beam Status
    E84_LIGHTS_FFOG	; Front Fog Light Status
    E84_LIGHTS_RFOG	; Rear Fog Light Status
    E84_CRUISE	; Cruise control on / off (See label E84_CRUSE_SPD for cruise control speed setting)
    E84_WIPERS	; Windscreen Wipers on / off (Set regardless of Wiper speed Int. / const or fast)
    
    
    
    
    [Labels available]
    
    E84_RPM		; Engine RPM (0 - 9999)
    E84_SPEED	; Engine Speed (MPH,As per Speedometer, 0-160)
    E84_ENGTEMP	; Engine Temperature (Engine, Water Temp, typ 92 DegC)
    E84_EXTTEMP	; External Temperature (As shown on instrument cluster)
    E84_THROTTLE	; Throttle position (0 - 100%)
    E84_VIN		; Displays the last 7 digits of the Vehicle VIN number. (Not sent very often)
    E84_PDC1	; Rear outer Left Sensor (0 - 255). 	Hint: Use Reverse gear indicator to signal the need to display these.
    E84_PDC2	; Rear inner Left Sensor (0 - 255) 	255 = nothing close, 0 = obstruction
    E84_PDC3	; Rear inner right Sensor (0 - 255)
    E84_PDC4	; Rear outer right Sensor (0 - 255)
    E84_RANGE_MI	; Range (Miles)
    E84_RANGE_KM	; Range (KM)
    E84_ODO_MI	; ODOMETER (Miles)
    E84_ODO_KM	; ODOMETER (KM)
    E84_Date	; Car Date (European format, d,m,yyyy)
    E84_Time	; Car Time
    E84_BATTERY	; Battery Voltage
    E84_FUEL_L	; Left Fuel tank sensor level  
    E84_FUEL_R	; Right Fuel tank sensor level
    E84_PROD_DATE	; Production date of the car
    E84_SECONDS_PROD; Seconds elapsed since production.
    E84_AMB_LIGHT	; Ambient Light Sensor reading (0 - xxx), The dimple on the top of the dashboard! 
    E84_SOLAR	; Solar Sensor reading (0 - xxx).changes air-con depending on heat of the sun.
    E84_WHEEL_POS	; Steering wheel angle in Degrees (- is right hand down, + is left hand down)
    E84_CUSTOM1	; Display the CANBUS data from the ID of custom1 as defined in the ini file.
    E84_CUSTOM2	; Display the CANBUS data from the ID of custom2 as defined in the ini file.
    E84_INT_TEMP	; Internal cabin temperature
    E84_CRUISE_SPEED; Cruise control speed setting. (Indicator E84_CRUISE shows status)
    E84_CL_FAN	; Climate control fans speed
    E84_CL_TEMP	; Master (Driver) Climate control temperature setting.
    E84_WHEEL_SPDFD ; Front Driver individual Wheel speed (Used by DSC / ABS / Run flat detection)
    E84_WHEEL_SPDFP ; Front Passenger individual Wheel speed 
    E84_WHEEL_SPDRD ; Rear Driver individual Wheel speed
    E84_WHEEL_SPDRP ; Rear Passenger individual Wheel speed 
    
    #Key number?
    
    
    
    [Sliders available]
    E84_SLD_SPEED	; Speed Slider, 0 - 140MPH
    E84_SLD_RPM	; REV Slider 0 - 5500RPM (Low values as its Diesel!) Should I add a Higher Petrol version?
    E84_SLD_THROTTLE; Throttle Slider 0 - 100% 
    E84_SLD_PDC1	; Rear outer Left Sensor (0 - 255). 	255 = nothing close, 0 = obstruction. Raw value indicators also available.
    E84_SLD_PDC2	; Rear inner Left Sensor (0 - 255) 	
    E84_SLD_PDC3	; Rear inner right Sensor (0 - 255)
    E84_SLD_PDC4	; Rear outer right Sensor (0 - 255)
    #add a slider for steering wheel?
    
    
    
    [Steering Wheel Control]
    Vol+ Button	; Master Volume +
    Vol- Button	; Master Volume -
    Up Button	; Next playlist item
    Down Button	; Previous playlist item
    Rotate Button	; Play / Pause
    Phone Button	; Next screen (as defined in the KCanBusRR.ini file)
    Voice Button	; Previous screen (as defined in the KCanBusRR.ini file)
    
    Press and hold functions not yet implemented
    
    
    Automatic Reverse Skin Select:
    To automatically select the REVERSE.SKIN when reverse gear is selected, set Auto_Reverse to 1 in the ini file.
    
    Automatic Night Gamma:
    To automatically switch on night gamma when the lights are turned on set Auto_Gamma to 1 in the ini file.
    
    Logging:
    To log all incoming CANBUS data to file set logging to 1 in the ini file.
    Note that logs for long journeys will be big. This should only be used for debugging .


    My main question is:- Is this of use or interest to anyone?
    I am thinking of developing my own little Arduino board (Processor, USB, Canbus and Bluetooth?). This would be more specific to the car environment and be a much more compact board.

    At the moment I am using the Arduino Uno with a Can-Bus shield, 12V switched supply etc. This costs about 45 or $70. I could make an application specific version for about 35 / $55 + shipping.



    *Note that I have not released the plug-in in any form (Alpha or release) as I still have a small amount of tidying up to do with the code. Also I still have to work out how to create an installer....

    Edit: Jan/2013. An alpha version of the code is available in post #15
    Last edited by TrevorC2; 01-21-2013 at 08:24 AM.

  2. #2
    Confusion Master
    Auto Apps:loading...
    Enforcer's Avatar
    Join Date
    Sep 2003
    Location
    If you go down to the woods today, You're sure of
    Posts
    14,625
    I don't have a new enough BMW for CANBUS yet, but in the future I might be interested.

    Or if I can ever persuade the missus to let me stick a PC in her car.

  3. #3
    Low Bitrate
    Join Date
    Mar 2006
    Posts
    75
    If you can read boost pressure, air and oil temps, etc... I'll be very interested in this for my 335i.
    Cars:
    2001 Lexus es300 carpc Complete!Lexus es300 thread Retired
    Current: 2008 BMW 335i - carpc in development.

  4. #4
    Low Bitrate
    Join Date
    Oct 2008
    Location
    Wiltshire, UK
    Posts
    62
    Quote Originally Posted by spiike View Post
    If you can read boost pressure, air and oil temps, etc... I'll be very interested in this for my 335i.
    I think that it *should* be possible to read boost pressure, These are several ID's that have a quick and varied pattern to them, however I am less familiar with the readings obtained from things like, boost pressure, lambda sensors etc. I've now got hold of an OBD-II tool so I will try to sync up the readings from that with values from the K-can ID's.
    It is a time consuming task filtering and looking through ID's so this may take some time. The format of the values from the OBD-II ID's are different from that of the K-Can.

  5. #5
    Raw Wave pierrotm777's Avatar
    Join Date
    May 2008
    Location
    Bordeaux, France
    Posts
    2,843
    That would be a very cool project . I should like to see also a project for the MOST bus (AUDI,VW,PORSCHE ect...) :-(

  6. #6
    Newbie
    Join Date
    Nov 2012
    Posts
    1
    I am interested in the ability to use the iDrive control with RR.

    I saw something from CarX/B7. Do you think that is something you can do?

    I'm just starting my research into carpc, mainly I started with soldering an aux in to the FM module, now I really want something that I can plug in my 500GB drive with all of the music.

  7. #7
    Variable Bitrate
    Join Date
    Sep 2012
    Location
    Germany - Munich
    Posts
    379
    Sorry for Offtopic, but do you have the sourcecode of last IBUSCommunicatoRR version?

  8. #8
    Constant Bitrate
    Join Date
    Jul 2009
    Posts
    162
    Sounds interesting, and the good thing is I already have an arduino and canbus shield. Will the plugin be hard coded to specific BMW canbus ID's or will we be able to map ID's to functions?

  9. #9
    Low Bitrate
    Join Date
    Oct 2008
    Location
    Wiltshire, UK
    Posts
    62
    Quote Originally Posted by lodac View Post
    I saw something from CarX/B7. Do you think that is something you can do?
    Yes you should able to do something like the CarX/B7 project. The control from the iDrive* and wheel buttons should be simple. It would just take time to create the skin for RR (there may even be one available anyway?, I'm sure that I have seen one previously)

    *I don't have the idrive wheel in my car to test, however I have seen logs from an E65 posted elsewhere in the web I *think* the ID's are the same.
    If anyone is passing Swindon and is willing for me to take a log of their iDrive buttons, please let me know. Alternatively I will have to wait unti I get my car serviced and I'll see if I can get an iDrive car as a courtesy car!!



    Quote Originally Posted by harryberlin View Post
    Sorry for Offtopic, but do you have the sourcecode of last IBUSCommunicatoRR version?
    I don't think that the source-code for IBUSCommunicatoRR or IbusRR have ever been released. If it had been released it would certainly have made my job easier.
    I'm not a software person and I have sent a great deal of the past month working out how to make my code robust. On the whole my RR plug-in works well but it still crashes more than I would like. I'm having to learn how to error trap my code...

    Quote Originally Posted by that_kid View Post
    Will the plugin be hard coded to specific BMW canbus ID's or will we be able to map ID's to functions?
    Ultimately I could add flexibility within the .ini file to allow different functions for different presses of the steering wheel buttons. I think that IBusRR has this function.
    All of the labels, sliders and Indicators will be hard-coded.
    Is there a reason to allow mapping of these ID's? Something specific you had in mind?


    Incidentally I have now upgraded the OS on my carPC to Windows 8. My install was a from my old E46, it hadn't been re-installed for 4-years and was getting long in the tooth. At the moment I am battling with UAC and getting RR to auto start at boot-up. With UAC disabled in the registry I can get RR to auto-run at boot-up. However this nails the Metro apps.... more investigation required.

  10. #10
    Newbie
    Join Date
    Dec 2006
    Location
    istanbul
    Posts
    47
    excuse my ignorance being unfamiliar with arduino, but why not setting the plugin on an elm327 chip based obdII adapter but an arduino with canbus shield?

    and yes, I would be interested in such hardware (without bluetooth) +software for RR if elm327 is not capable of doing the same thing.
    Last edited by canstb; 01-01-2013 at 02:14 PM.

Page 1 of 3 123 LastLast

Similar Threads

  1. NEW PLUGIN: Brightness Control
    By justchat_1 in forum OM Skin/Plugin Developers
    Replies: 0
    Last Post: 01-11-2011, 06:20 AM
  2. Plugin Manager control of plugin Config
    By lambosprit in forum RR Plugins
    Replies: 17
    Last Post: 10-17-2010, 04:46 PM
  3. no audio control with XM plugin
    By DalenA in forum CF Bug Reports
    Replies: 4
    Last Post: 10-12-2007, 10:26 AM
  4. Plugin: Ipod Control
    By t00h0t in forum CF Plugins
    Replies: 15
    Last Post: 06-05-2007, 07:25 PM
  5. Web control Plugin idea...
    By CdRsKuLL in forum Road Runner
    Replies: 8
    Last Post: 11-20-2006, 06:01 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •