sobota 23. novembra 2013

audi FIS 3-line protocol

I think, this apply for pre-CAN-BUS cars only, check sticker on your radio, if there are 3pins labled ENA DATA CLK in middle section of mini-iso connector:

static text

moving text












DEC 255-DEC
ASCII REAL
0 0 0 0 1 1 1 1
15 240

ADDR?
1 0 1 0 1 1 0 1
173 82
R
1 0 1 1 1 1 1 0
190 65
A
1 0 1 1 1 0 1 1
187 68
D
1 0 1 1 0 1 1 0
182 73
I
1 0 1 1 0 0 0 0
176 79
O
1 0 0 1 1 0 0 1
153 102
f _
1 0 1 1 1 0 0 1
185 70
F
1 0 1 1 0 0 1 0
178 77
M
1 0 1 1 1 0 0 1
185 70
F
1 0 1 1 0 0 1 0
178 77
M
1 1 0 0 1 1 1 0
206 49
1
1 1 0 1 0 0 1 0
210 45
-
1 1 0 0 1 1 1 0
206 49
1
1 1 0 1 1 1 1 1
223 32

1 1 0 1 1 1 1 1
223 32

1 1 0 1 1 1 1 1
223 32

1 1 0 1 1 0 1 0
218


CRC














0 0 0 0 1 1 1 1
15 240

ADDR?
1 1 0 1 1 1 1 1
223 32

1 1 0 1 1 1 1 1
223 32

1 1 0 1 1 1 1 1
223 32

1 1 0 0 0 1 1 1
199 56
8
1 1 0 0 0 1 1 0
198 57
9
1 1 0 1 0 0 0 1
209 46
.
1 1 0 0 1 1 0 0
204 51
3
1 1 0 1 1 1 1 1
223 32

1 0 1 1 1 0 0 1
185 70
F
1 0 1 1 0 0 1 0
178 77
M
1 1 0 0 1 1 1 0
206 49
1
1 1 0 1 0 0 1 0
210 45
-
1 1 0 0 1 1 1 0
206 49
1
1 1 0 1 1 1 1 1
223 32

1 1 0 1 1 1 1 1
223 32

1 1 0 1 1 1 1 1
223 32

1 1 0 0 0 1 0 0
196


CRC

CRC=MODULO(SUM(255-DEC),256) = ((SUM(0xFF-HEX))&0xFF)

Starting "pulse" ?

packet
so, it's SPI!?

TODO: try to use SPI libs to hadle this. http://www.gammon.com.au/forum/?id=10892

ENABLE is bi-direction "wire":

from audi concert plus
audi concert (nav)/chorus
and here is something like "ping" to radio:




Arduino code to receive from radio and to send text to cluster is down there:

Arduino code to send data from RS232 to cluster 

Arduino code to receive data from radio





comunication betwen arduino reader and actual radio

video of code in action









68 komentárov:

  1. Do you have an email address? I want to ask you something :D

    OdpovedaťOdstrániť
    Odpovede
    1. of corse I have, sorry for moderation, stupid google didn't send my email about pending request to moderate

      t.

      Odstrániť
  2. hello, how do you switch to full screen?

    OdpovedaťOdstrániť
  3. I do not know, it sould by something with K-line ....

    OdpovedaťOdstrániť
  4. ok, i have a skoda symphony stereo with full FIS from a VW Golf mk4.
    It uses can bus for displaying data on top part of screen
    I am using arduino to find the canbus message ids from stereo to cluster and cluster to stereo. I want to display other paramenter(eg boost, speed, etc) on the FIS screen. any ideas?

    OdpovedaťOdstrániť
    Odpovede
    1. hi, what is the can bus pins in the golf 4 dash?? see also this blog, this guy learn you to send data and recieve data on can bus.

      http://secuduino.blogspot.com.es/2011/10/fis-seat-leon-cupra-english.html

      Odstrániť
  5. sorry, I never play with canbus :/

    OdpovedaťOdstrániť
  6. Hi! I have audi allroad 2001. How can I connect arduino pro mini to my car?

    OdpovedaťOdstrániť
  7. I'm affraid, on 2001 models, can-bus is used for this.

    OdpovedaťOdstrániť
  8. Hi Can give me somebody a simple code for atmega8. I use atmel studio 6.0 I want to send text to the cluster from the atmega not reading of the serial input. Example: I want to read "Audi A3".

    OdpovedaťOdstrániť
    Odpovede
    1. sorry I do not have ane spare free time :( but when got some, i make it for you :)

      Odstrániť
  9. I use atmega8 with internal 8MHz. The cluster pins connection is: clock>PD2, data>PD3, enable>PD4. I tried your code changed the connection in it but did not work yet.

    OdpovedaťOdstrániť
    Odpovede
    1. I testet it on 16MHz version, which are 5V version, arn't 8Mhz versions 3,3V ?

      anyway try new code:

      https://github.com/tomaskovacik/arduino/tree/master/VWFIS/FIS_protocol_emulator

      Odstrániť
    2. Hello. I also tried the new code on Dccduino clone with 12 Mhz quartz but it didn't work on FullFIS from Passat B5 FL. Do you have any ideas why it's not working? Messages from OEM radio works well. Thanks for any reply ;)

      Odstrániť
    3. try if radio send same data ("address byte" and crc) as on audi: https://github.com/tomaskovacik/arduino/blob/master/VWFIS/read_cluster/read_cluster.ino

      if yes, then there is a bug in my code :) write is as hobby, so it's posible, patches are welcome :)

      Odstrániť

  10. help that you need to fix the code that would just write a text without using the serial port

    OdpovedaťOdstrániť

  11. help that you need to fix the code that would just write a text without using the serial port

    OdpovedaťOdstrániť
    Odpovede
    1. https://github.com/tomaskovacik/arduino/tree/master/VWFIS/FIS_protocol_emulator

      change lines:
      String FIS_WRITE_line1="FIS protocol emulator by kovo"; //upper line 8characters are static, more then 8 will rotate
      String FIS_WRITE_line2="http://kovo-blog.blogspot.sk"; //lover line 8characters are static, more then 8 will rotate


      t.

      Odstrániť
  12. Hi im working on your code, but my FIS is from vw car, the crc check is different can you explain better that operation? CRC=MODULO(SUM(255-DEC),256) thanks!!!

    OdpovedaťOdstrániť
    Odpovede
    1. https://en.wikipedia.org/wiki/Modulo_operation

      SUM(255-DEC) is summ of all values in colom 255-DEC

      "address" is the same?

      Odstrániť
    2. What address?

      ok then that is correct? 1726modulo256

      Odstrániť
    3. hi you got to bring text fis vw? I tried the code on your kovo golf4 not what did not work :(

      Odstrániť
    4. thats bummer, I do not have VW, so I cant help you :( sorry

      Odstrániť
  13. Hi im working on your code, so my FIS is from VW car, i wrote some messages on the display but the crc check is different from audi FIS, can you explain better that CRC=MODULO(SUM(255-DEC),256)?? there is some messages from VW radio:
    7E ED 0F CE CF CF CF DF DF DF DF DF DF DF DF DF DF DF DF 9E
    7E ED 0F AC BE B9 BA DF DF DF DF DF DF DF DF DF DF DF DF 8E
    7E ED 0F DF C7 C6 D1 CC B2 B7 A5 B9 B2 CE E3 CE E3 E3 E3 F5

    Great job!! thanks!!

    OdpovedaťOdstrániť
    Odpovede
    1. first 8bits is something unrelated to text, my guess is address of some kind. I add this to tables

      Odstrániť
    2. I think that first 4 bits is other perform data, when this bits are send from radio the ENABLE signal is inactive, then the ENABLE signal is rising up for the rest of the bits.

      how do you do to calculate the crc operation for audi cluster? i tried to calculate crc bits from dumps but is too hard for me. any idea?

      Odstrániť
  14. I already have an A3´02 cluster and I tried to write in the cluster with your original code but it doesnt work... only bulbs, brake pad, washer fluid advise, maybe the cluster dont show radio message when have this troubles??

    OdpovedaťOdstrániť
    Odpovede
    1. year 2002? I think it's can-bus car ...

      Odstrániť
    2. Maybe is can bus, but I found electric diagram from ´96 to ´03 A3 8l and only navigation plus use can bus system, all "standar" radios use 3 line ENA/DATA/CLK, maybe is not active in coding of the cluster I try to check that.

      Odstrániť
  15. I conneted to the cluster via atmega 8 usning internal osc. It is working but something wrong. The demo text:

    String FIS_WRITE_line1="FIS protocol emulator by kovo";
    String FIS_WRITE_line2="http://kovo-blog.blogspot.sk";

    appear in different character. I changed the two line text and 123456789 is ok, the big letters ABCDEFGH... also works. the problem caused by the small letters abcdefgh.. when I used any small letter different character appear on the FIS. Any idea how can I write small letter what I want to the FIS?

    OdpovedaťOdstrániť
    Odpovede
    1. Cluster can not display small characters, i forgot to commit upper case version with strings. Check my youtube videos about know characters by cluster, i made loop wich try to write character with ascii table numbering from zero to 255

      T.

      Odstrániť
  16. Can we add a modification in the program? If We have to write a small character the program convert it to big one and after that write it to the FIS.

    OdpovedaťOdstrániť
    Odpovede
    1. patches are welcome ;) also I would like to mentioned, that same characters are on diferent posion then in standard ascii table, for example _

      Odstrániť
    2. If the caracter is bigger than 96 (it is the decimal code of the caracter) have to subtraction 32 from it and the result has to write on the FIS. a=97 A=65 97>96 means 97-32=65 we get A instead of a.

      Odstrániť
    3. try what I put on github, but according my test ,but I think it will be litle more complicated just like this ...

      Odstrániť
    4. Its ok, the small to big conversion is working, but there some other problem. The first line begin to scroll under 8 character also but the second line is fine I dont know why is it. The other is refres or something I think because the background light of the two line go off for a sec.

      Odstrániť
  17. Russian Instruction: https://www.drive2.ru/l/466944997204164856/

    OdpovedaťOdstrániť
    Odpovede
    1. thx! an drive.ru is complex information about VW: http://passatworld.ru/entry.php/1709-MultiMFA?bt=3752#comment3752

      lbut this do not works for me :/

      Odstrániť
  18. Hey, I just wanna know where can I find full schematics of radio you attached to article. BTW great work with reverse engineering those buses, many thanks for your work ;)

    OdpovedaťOdstrániť
  19. Zdravim, podarilo sa ti to rozbehat s nejakym BT modulom aby to zobrazovalo AVRCP meta data (mena songov)?
    Ak ano aky modul si pouzil?

    Predom vdaka za odpoved

    OdpovedaťOdstrániť
    Odpovede
    1. ahoj, neriesil som to moc, podla wiki podpora by mala byt aj v nalacnejsich cinskych moduloch postavenych na ovc3860 ale z toho co to vie predpokladam, ze jedina vec z 1.4 profilu je "absolut volume"

      https://en.wikipedia.org/wiki/List_of_Bluetooth_profiles#Audio.2FVideo_Remote_Control_Profile_.28AVRCP.29

      skusal som aj nejaky csr 86xx blk (4.0) modul ale tam som nerozbehal ovladanie cez UART

      Odstrániť
  20. Ahoj, měl bych dotaz chtěl bych rozchodit na arduinu s Clustrem Octavia, SuperB Mk1 třídrát 3LB. Nějak jsem nepochopil jestli se vkladají nějaké obvody mezi CLK, DATA, ENA. Díky za informaci.

    OdpovedaťOdstrániť
    Odpovede
    1. ahoj, nemusis to strihat staci zapojit paralelne, ale riskujes tam ze to bude superit s radiom, neviem ako sa to riesi ked je tam navigacia aj ... treba skusit..

      Odstrániť
  21. Hey, I run your sketch on a Nano, and my MFD is a VW Bus from 99, but I it didn't work. I´ve connected the Pins like in your sketch described.
    Is there any hint ?

    OdpovedaťOdstrániť
    Odpovede
    1. vw need to have different checksum calculation, try change final checksum calculation from mod() to not(), like negation on sum

      Odstrániť
    2. Thanks for the fast replay, but where is the final checksum calc ? Unfortunately I coulndt find mod().

      Regards

      Odstrániť
    3. my bad, sorry:
      remove 0xFF^ on all lines where CRC is calculated, for example: uint8_t FIS_WRITE_CRC=(0xFF^FIS_WRITE_START);

      change this FIS_WRITE_sendByte(FIS_WRITE_CRC%0x100);
      to this: FIS_WRITE_sendByte(NOT(FIS_WRITE_CRC));

      try it

      Odstrániť
    4. I get the Error " NOT was not declared"

      Odstrániť
    5. Sorry, no luck. I got the error " NOT was not declared

      Odstrániť
    6. Ups sorry, arduino not() function is ~ so:

      ...sendbyte(~FIS_WRITE_CRC)

      Odstrániť
  22. Unfortunately no luck again
    here is my changed code https://www.dropbox.com/sh/p9dtygw4gueectn/AAAOhmI_3VEPxC1E-ulyppHPa?dl=0
    I also changed the I/O ports to the PWM ones on the Nano

    OdpovedaťOdstrániť
    Odpovede
    1. Check cluster coding if it is not coded for nvigation....

      Odstrániť
    2. check newest commit at github

      Odstrániť
    3. Nope, tested on 3 different Arduinos. I´ve tested the 2 lines with vcds and they are fine

      Odstrániť
    4. With the neweset version I event dont get a serial export in the serial monitor

      Odstrániť
  23. ok, and coding of cluster is ?
    http://www.ross-tech.com/vag-com/cars/vwmkIV.html
    17-Instruments: K1 -- KWP-1281
    Look at the first two digits in the coding. Add the values for the options together to get the correct coding.

    00 - No available equipment
    +01 - Brakepad wear sensor warning active
    +02 - Seatbelt warning active
    +04 - Washer fluid level warning active
    +08 = Seatbelt Warning active (NAR only)
    +10 = Seatbelt Warning Driver & Passenger active (NAR only)
    +16 = Secondary Display (Radio/Navigation) active

    OdpovedaťOdstrániť
  24. Yes my coding of the cluster is 21xxxx
    16 for the display +1 for the brakepads and +4 for the washer fluid.
    what kind of arduino do you use ? UNO ?

    OdpovedaťOdstrániť
  25. so thats the problem probably, on audi at least for this type of communication (radio only, no navi) cluster must be coded without 16 try it please if you can. at least just to be sure, I use all kind of arduino, clones original it work on all

    OdpovedaťOdstrániť
    Odpovede
    1. ok, I change it agat try it out please ;) (last commit on github)

      I am on vacation so give me few hours to responce ;)

      Odstrániť
    2. look at this: https://github.com/fismaker/fis

      Odstrániť
    3. So, now I also on vacation and I have time to try again. I´ll give you a little feedback later

      Odstrániť
  26. Relly good project!

    Were you able to set up a test bench with a dismounted gauge cluster? I have an Audi cluster sitting on my desk but the FIS display shows a lot of warnings. Is there a trick to hooking it up?
    It would be easier to work with that rather than sitting in the car:)

    OdpovedaťOdstrániť
    Odpovede
    1. of corse you can, i'm on vacation so for now just link: http://www.audizine.com/forum/showthread.php/405961-Understanding-differences-between-Audi-A4-clusters-and-the-compatibility-issues you need to ground problematic parts like abs, brake pads wear sensors etc ... for fuel you need to put resistor between pin and ground, value must be search online ... (audi a4 b5 its 47ohm, a6 470ohms...)

      Odstrániť
  27. Hello, I just wanna know where would i be able to discover full schematics of radio you connected to article. BTW incredible work with figuring out those transports, much obliged for your work..!

    OdpovedaťOdstrániť
    Odpovede
    1. just google, "schematics audi concert filetype:pdf"

      thx :)

      Odstrániť
  28. Hi, you mention to use pull up resistor. Can you provide a schematic how to connect the Arduino to radio (with resistors) and the LCD display. I have an even older GAMMA BOSE with 3 line protocol. Would like to try if that works too...

    OdpovedaťOdstrániť