CANGate

Discussion in 'Multimedia' started by bjarne, Sep 4, 2006.

  1. bjarne Member

    Several people have asked me for a description of the current options in CANGate, so I thought I should just post a short description here on NAVPLUS.US.

    CANGate was of course developed first and foremost to solve the annoying clock problem in our early A6/C5 and A4/B5 cars. But over time I have experimented with other options, some useful, some not. The options are set in an 8-digit field, a little like VAG-COM options. The options for firmware revision 1.04.2 are as follows:

    //---------------------------------------------------------------------
    //Option settings (1.04.2)
    // ?XXXXXXX Clock mode (option[0])
    // 0 - Normal mode (no action)
    // 1 - Block clock messages (GPS mode)
    // 2 - Translate clock messages (sync mode)
    // X?XXXXXX Turn off mode (option[1])
    // 0 - Normal mode (turn off with ignition)
    // 1 - Key mode (turn off when key removed)
    // XX?XXXXX Turn on mode (option[2])
    // 0 - Normal mode (turn on with ignition)
    // X - (X = 1-9) Key mode (turn on X sec after ignition)
    // XXX?XXXX Switch action (option[3])
    // 0 - Normal mode (no action)
    // +1 - Send message to RNS-E on closure
    // +2 - Send message to car on closure
    // +4 - Send message to RNS-E on opening
    // +8 - Send message to car on opening
    // XXXX?XXX Video in motion (option[4])
    // 0 - Normal mode (no action)
    // +1 - Enable TV mode
    // +2 - Block GALA when TV mode (audio) selected
    // +4 - Block GALA on switch closure
    // XXXXX?XX MFSW (option[5])
    // 0 - Normal mode
    // +1 - Send MFSW present messages
    // XXXXXX?X Experimental options(option[6])
    // 0 - Normal mode (No display)
    // +1 - Display speed in DIS
    // +2 - Create GALA for A6 C5
    // +4 - Day/night mode based on dimmer value
    // XXXXXXX? Not used(option[7])
    // 0 - Normal mode
    //---------------------------------------------------------------------

    In all cases, a zero in any position means that no action is taken for that option.

    Clock mode option[0] :
    If this mode is set to 1, then clock message are blocked from going to the RNS-E, and the RNS-E will go into GPS mode, where the time is taken from the GPS signal. This option turned out to be not too useful, as there is no way to send this time to the cluster, so the two could get slightly out of sync.
    If this mode is set to 2, then clock messages are corrected going from the cluster to the RNS-E, enabling the RNS-E to display the correct time.

    Turn off mode option[1]:
    If this mode is set to 1, then the RNS-E stays on until the key is removed. An option we in the US lost when we updated to 0110 firmware.

    Turn on mode option[2]:
    If this mode is non-zero, then the turnon of the RNS-E will be delayed for this number of seconds. Originally implemented to investigate on of the red DIS problems, but I was never able to test it in a car with the problem, and by now I don't think it would help much anyway.

    Switch action option[3]:
    This option can be used to send an arbitrary CAN message to the Cluster and/or the RNS-E on a switch closure and/or switch opening. By coding the message to be the MFSW voice button, this can be useful for initiating BT voice commands, if you don't have a MFSW, or if as me you did not bother to change your non-CAN MFSW controller.

    Video in motion option[4]:
    If this option has a +1, then CANGate will send messages to enable the TV option on the RNS-E. This was primarily implemented for Dirk for his CarPC project, but might be useful in other situations.
    If this option has a +2, then CANGate will block the GALA signal on the CAN bus when TV is selected as the audio source. It will also block the GALA signal generated by option[6].
    If this option has a +4, then a switch closure will block the GALA signal like the +2.
    CANGate only has one external switch option, so switch actuated BT voice and switch actuated GALA blocking are mutually exclusive.

    MFSW option[5]:
    If this option is a 1, then CANGate sends MFSW present messages to make the RNS-E happy, if it is coded for MFSW and there are no MFSW in the car. Not very useful, don't ask why it is there !!!

    Experimental options option[6]:
    If this option has a +1, then the speed and dimmer values are displayed in the second line of the DIS. Used for experimentation, while I was working on the two next options.
    If this option has a +2, then CANGate creates a GALA signal on the CAN bus, so that the RNS-E can be coded for A4, and the TV select blocking can happen based on selection.
    If this option has a +4, then the RNS-E is told lights on/off based on the dimmer value, rather than on the light switch position. Another of Dirk's great ideas !!! I like this because here in California, we have to have lights on, if it is raining, and I also have lights on, when I drive in the mountains. In both those situations I don't want the display to go into night mode, but I do like night mode when it is actually dark outside.

    Not used option[7]:
    For future enhancements.


    CANGate has an 8-pin connector for a special serial cable, which is used for updating the firmware, and for communicating with the firmware.

    The serial cable has two push buttons on it: a black one is for resetting the device, and a red one is for putting the box in programming mode, if held during a reset. Putting the box in programming mode only means that it will communicate with the download program on the PC, no programming will happen until you tell it to download from the PC.

    The serial cable is also used to communicate with the program in the CANGate, it needs to be connected to a PC serial port running at 115200 baud, 8 bits, no parity, 1 stop bit (pretty standard other than the baud rate). I communicate with it from a terminal program (Tera Term Pro).
    The terminal commands are:

    r - reboot the device

    o - print options
    o XXXXXXX - set options. Must be repeated for each option, which is changed, due to timing of the internal EEPROM.

    n - print software version and serial number

    dl hh - set low threshold for going into night mode
    dh hh - set high threshold for going into day mode

    p0 - show pushbutton ON message
    p1 - show pushbutton OFF message

    p0 SID dlc d0 d1 d2 d3 d4 d5 d6 d7 - set ON message. again must be repeated for each field changed
    p1 SID dlc d0 d1 d2 d3 d4 d5 d6 d7 - set OFF message. again must be repeated for each field changed

    f - clear message filter
    f SID - set message filter. Will only log messages with this SID, this does NOT affect CAN traffic, only logging

    b - clear blocks
    b0 SID - set message block 0. All messages with this SID will be blocked from traversing the bridge
    b1 SID - set message block 1. All messages with this SID will be blocked from traversing the bridge

    tc SID dlc d0 d1 d2 d3 d4 d5 d6 d7 - send message to cluster side
    tr SID dlc d0 d1 d2 d3 d4 d5 d6 d7 - send message to RNS-E side
    tt - repeat last send with the last data byte incremented by one

    l - turn logging off
    lc - log messages from cluster side
    lr - log messages from RNS-E
    la - log all messages from either side

    This is the command I use for logging traffic. I let TTPRO save the log to a file while it is acquiring data.


    If you remove the lid of the box, you will see two green LEDs, they indicate the state of the box as
    follows:

    Both blinking: it is processing CAN messages
    One or the other off: there is no CAN traffic on either bus (it wil go into the low power mode after 10 sec)
    Both off: it is in low power mode (consumming less than 5 mA)
    Both on: it is in programming mode ready to receive an update.


    Hope this gives an overview of where CANGate is at this time.

    Thanks,
    Bjarne
  2. Advertisement

  3. a4ss4abt Active Member

    Very interesting but are you the seller ? How much for this?
  4. jensbert New Member

    Hi Bjarne,
    you told me that I only have to switch the gala signal (A6 B4 10/00)
    Is it possible for me to use Option 6 and 4 in combination?
    I´d like the idea, that Gala is blocked, when turning on TV Mode.
  5. bjarne Member

    Sorry I did not make that clear, yes I am the seller. Most people I correspond with are familiar with the 'clock problem' thread, and I forget that you B6 and B7 people probably have had no interest in that thread :)

    The price for CANGate is $140.00 plus shipping. I am actually out of stock again, but will put a post in the for sale section, if I ever catch up :)

    Bjarne
  6. bjarne Member

    Yes, switching the GALA wire is the standard way of doing it in A4/B5 and A6/C5 cars. I forget which car you have (A6 B4 is not valid), and so far I have only confirmed that I have the speedometer data in the A6/C5. I suspect it will be there in A4/B5 cars as well, and I should be able to check it soon.

    Yes, you should be able to use option 4 and 6 in combination. Of course if your car is an A4/B5 we have to verify, that the speedometer data is available.

    Bjarne
  7. a4ss4abt Active Member

    Many thanks.
  8. jensbert New Member

    Hi,
    thx for the fast reply.
    I have a A6 built October 2000 (C5 could be possible).

    To make it clear:
    I can either
    - switch the gala signal externally (Cause I have it attached to my retrofitted RNS-E)
    - use the actual firmware of my cangate and use option 6 an option 4 together in combination?

    Is that correct?
    If so, please send me the actual firmware via mail.
    TIA
    Please excuse my dumb questions, but things confuse me a little...
  9. bjarne Member

    You are correct. I can send you the updated firmware, but you need a special serial cable to do the update. You can make it yourself from the connection sheet, I sent with the unit. Only complication might be whether you have the crimp tool for the micro-fit connectors.

    Please send me an email, we should take this offline.

    Bjarne
  10. TeddyBGame New Member

    Bjarne,
    Again, nice work. Keep crankin' them out.

    :)
  11. bjarne Member

    I have a question for CANGate users, but first a little background:

    When I first developed CANGate, I had some thoughts of monitoring the C/D/E bus and translating the MFSW messages, so the steering wheel buttons would work without having to replace the MFSW controller in the B5 and early C5 cars. It turned out that the C/D/E bus is disabled, when you enable CAN for the DIS, so there were no signals to pick up, and I shelved the idea. Recently I started looking at it again, and decided to tap into the one-wire connection between the buttons and the controller. I now have the buttons working perfectly in my car. I had convinced myself, that the buttons were not a big deal, but now I can't believe, that I lived for 1 1/2 years since I installed the RNS-E without them. :D

    A few of you inquired about this feature when you bought the CANGate, and at the time I said I had given up on the idea. So my quetsion is, whether you would like me to update your CANGate for this feature. It would have to come back here, since there is a small hardware modification necessary in addition to the firmware update. Also, I only have it working in one car, so it must be considered a beta feature, as I can not guarantee, that the time is the same in all cars. Let me know if you have the button problem still, and if you are interested please email me (don't PM). I should mention, that I found it rather difficult to get to the wire for the one-wire connection, so be warned. Wiring in the car is not my cup of tea, so others might find it easier.

    A more general question is whether I have saturated the rather small niche market yet. I am out of CANGates again and I am considering, if I want to invest the time and money in another run.

    Thanks,
    Bjarne
  12. half_a_florin New Member

    C5/B5 MFSW via CAN Gate

    Now you tell me! Well done, Bjarne. A great step forward. Of course, for a new retrofit you still need the MFSW wheel and the airbag, which are the major cost components, if bought new. CAN gate replaces the need for a '616' or '618' MFSW controller. For anyone with a CAN Gate already and thinking of adding MFSW, this has to be a no brainer - get CANgate updated!! I've just installed a BT set up, and the additional ease of use given by MFSW is an absolute joy.

    My MFSW knowledge is limited to the C5 platform, but I understand that different platforms may use different protocols between the integral wheel electronics and the controller - I'm sure Bjarne is on top of this.

    Comprehensive research and design information about what is required to add MFSW to a CAN enabled C5, B5, D2 and TT platform are available for download now at NSXR JR's site. The Part 2 'how to do it' photo shoot essay still has an intended release date of 20th December.

    Looks like we need an upissueof Part 1!

    Bob
  13. half_a_florin New Member

    Saturated market

    ... maybe a poll?
  14. bjarne Member

    Hi Bob,

    Great job on your steering wheel conversion, very impressive.

    My modification to CANGate was not really meant to replace the MFSW controller, I think it might still be needed for the communication with the buttons to work. This was purely meant to avoid having to update the old (non-CAN) MFSW controller. I might try to unplug the MFSW controller and see if the buttons still 'talk', but I have my doubts.

    Bjarne
  15. TeddyBGame New Member

    Nice work Bjarne. That would save folks from having to spend another $200 on the 616 module and make the older 608 module more useful

    Assumptions:
    - Pre-2002 C5 with MF steering wheel
    - Pins 12 and 13 behind the cluster (grey connector) were relocated to pins 5 and 6 (see section 1.1 of lee's pdf)
    - wiring changes to connector I in RNSE harness making CLK and DATA wires now CAN H and CAN L

    You won't find many US-based B5's with the MF steering wheel. In fact, I don't think it was ever an option. In Europe, the MF steering wheel was a factory option in the B5. I know of one B5 RS4 owner on this board who has the pre-2002 MFSW.

    Good stuff!!
  16. bjarne Member

    Thanks Ted,

    I am still beta testing this, so it is not bullet proof yet :D

    One comment to your 'assumptions', If you leave your old CDE MFSW controller in, I do not recommend that you use Lee's method. His method is perfect if you change the controller to the CAN version, but leaving the CDE version in and connecting it to the CAN bus will create collisions on the CAN bus, at least at initialization. The CAN communication protocol is robust enough, that I doubt you will ever see a problem or log an error in any module, but why deliberately create collisions.

    I believe it is better and just as easy in this case to run a twisted pair from pins 5 and 6 to the RNS-E, or as I did, run the pair to the CAN pins in the Symphony connector.

    I still need to test if the buttons will emit data if the controller is not present, which would make this point mute, as you could just unplug the controller. I am going to test it this coming weekend.

    Bjarne
  17. daves_s6 New Member

    Did you ever get a chance to test this?
  18. bjarne Member

    No, I have not had a chance to check if the buttons emit data wthout the controller inserted. The way I wired it up, it is quite invloved to get in behind the MFSW controller, so I have not taken the time to do it yet. But my MFSW works very nicely now after a couple of tweaks to the code.

    I don't know when I will get around to it, as I am working on another run of CANGates right now, and need to finish that and some other things, before I can do it.
  19. Steve Z1 Member

    Hi Bjarne,

    Dropped you an email, I'd like to buy one for my new ride.

    Please contact me.

    Steve

    bmwz1@earthlink.net
    • Staff / Moderator

    dmollico Moderator

    Bjarne!
    Any updates on this thing? I have a 2000 audi a6, and I'd be interested to see if my MFSW works with this guy.
  20. bjarne Member

    I am starting to receive the parts, so I should be able to start the build soon. I am estimating about 4 weeks to have the first ones from this build.

    If you would like to be notified when I have them, please send me an email. I prioritize my list based on when I receive the request.

Share Audi Forum with friends