Saturday, 23 November 2013

audi FIS 3-line protocol

UPDATE:

check libraries for reading data from radio and writing to cluster:

https://github.com/tomaskovacik/VAGFISReader
https://github.com/tomaskovacik/VAGFISWriter

Here is  wikipage with schematics:

https://github.com/tomaskovacik/VAGFISReader/wiki/How-to-connect

also page ti theory of operation:

https://github.com/tomaskovacik/VAGFISReader/wiki/Theory-of-operation

When writing to the cluster, no external components are required,the  cluster has all these components inside.


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:

some 2000 models can be switched from canbus to this 3lb protocol.

 

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









76 comments:

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

    ReplyDelete
    Replies
    1. of corse I have, sorry for moderation, stupid google didn't send my email about pending request to moderate

      t.

      Delete
  2. I do not know, it sould by something with K-line ....

    ReplyDelete
  3. sorry, I never play with canbus :/

    ReplyDelete
  4. Hi! I have audi allroad 2001. How can I connect arduino pro mini to my car?

    ReplyDelete
  5. I'm affraid, on 2001 models, can-bus is used for this.

    ReplyDelete
  6. 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".

    ReplyDelete
    Replies
    1. sorry I do not have ane spare free time :( but when got some, i make it for you :)

      Delete
  7. 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.

    ReplyDelete
    Replies
    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

      Delete
    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 ;)

      Delete
    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 :)

      Delete

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

    ReplyDelete

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

    ReplyDelete
    Replies
    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.

      Delete
  10. 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!!!

    ReplyDelete
    Replies
    1. https://en.wikipedia.org/wiki/Modulo_operation

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

      "address" is the same?

      Delete
    2. What address?

      ok then that is correct? 1726modulo256

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

      Delete
    4. thats bummer, I do not have VW, so I cant help you :( sorry

      Delete
  11. 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!!

    ReplyDelete
    Replies
    1. first 8bits is something unrelated to text, my guess is address of some kind. I add this to tables

      Delete
    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?

      Delete
  12. 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??

    ReplyDelete
    Replies
    1. year 2002? I think it's can-bus car ...

      Delete
    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.

      Delete
  13. 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

    ReplyDelete
  14. 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?

    ReplyDelete
    Replies
    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.

      Delete
  15. 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.

    ReplyDelete
    Replies
    1. patches are welcome ;) also I would like to mentioned, that same characters are on diferent posion then in standard ascii table, for example _

      Delete
    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.

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

      Delete
    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.

      Delete
  16. Russian Instruction: https://www.drive2.ru/l/466944997204164856/

    ReplyDelete
    Replies
    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 :/

      Delete
  17. 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 ;)

    ReplyDelete
  18. 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

    ReplyDelete
    Replies
    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

      Delete
  19. 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.

    ReplyDelete
    Replies
    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..

      Delete
  20. 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 ?

    ReplyDelete
    Replies
    1. vw need to have different checksum calculation, try change final checksum calculation from mod() to not(), like negation on sum

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

      Regards

      Delete
    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

      Delete
    4. I get the Error " NOT was not declared"

      Delete
    5. Sorry, no luck. I got the error " NOT was not declared

      Delete
    6. Ups sorry, arduino not() function is ~ so:

      ...sendbyte(~FIS_WRITE_CRC)

      Delete
  21. 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

    ReplyDelete
    Replies
    1. Check cluster coding if it is not coded for nvigation....

      Delete
    2. check newest commit at github

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

      Delete
    4. With the neweset version I event dont get a serial export in the serial monitor

      Delete
  22. 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

    ReplyDelete
  23. 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 ?

    ReplyDelete
  24. 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

    ReplyDelete
    Replies
    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 ;)

      Delete
    2. look at this: https://github.com/fismaker/fis

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

      Delete
  25. 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...)

    ReplyDelete
  26. 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..!

    ReplyDelete
    Replies
    1. just google, "schematics audi concert filetype:pdf"

      thx :)

      Delete
  27. 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...

    ReplyDelete
  28. hello :) That is can 2,0.... in Golf 4(Fabia 1FL,2NFL etc....) is can 1,6. Do you have some tutorials with can ID prom can 1,6 ? :) THX KubiCzech

    ReplyDelete
  29. Good afternoon.
    Excuse me, please.
    I want to connect a 16x2 screen using arduino to the VW Gamma5 radio.
    But downloading your sketch to arduino, the device does not display information.
    I ask for help.
    Can I have a more detailed description of how you connected the arduino to the radio?
    Thank.

    ReplyDelete
  30. Good afternoon.
    Excuse me, please.
    I want to connect a 16x2 screen using arduino to the VW Gamma5 radio.
    But downloading your sketch to arduino, the device does not display information.
    I ask for help.
    Can I have a more detailed description of how you connected the arduino to the radio?
    Thank.

    ReplyDelete
  31. Good afternoon.
    Excuse me, please.
    I want to connect a 16x2 screen using arduino to the VW Gamma5 radio.
    But downloading your sketch to arduino, the device does not display information.
    I ask for help.
    Can I have a more detailed description of how you connected the arduino to the radio?
    Thank.

    ReplyDelete
    Replies
    1. there is nothing special about connections:

      clk to arduino pin 3
      data to arduino pin 11
      enable to arduino pin 2
      put pull down resistor(4k7 - 10k) on enable line
      and of course, car ground to arduino gnd
      12v to arduino Vin

      but 1st check if you LCD is working without my code.

      Delete
  32. Hi! Great project :)
    Don't you now, will it work with the older models? Like an Audi V8 or Audi 200 20v? It is about 1990-1993 manufacture years. There is a smaller display than in your A4 1999m.y, with animated pictures with errors.

    ReplyDelete
    Replies
    1. do you have original radio sticker from that era? but 1996 a4 cluster works for sure :)

      Delete
    2. I have radio from the next generation with the same pins: CLOCK, DATA, ENA. And as far as I know the original radio has the same pins.
      https://old.pinouts.ru/Car-Stereo-Audi/audi_gamma_cc_auz.shtml

      Delete
    3. so it has enabel/data/clk in midle of mini-iso so it should works

      Delete
    4. Thanks for your fast answer.
      What interest me more is that the dashboard cluster can display information not only default pictograms but custom text :)
      The dashboard looks like that:
      https://www.drive2.ru/l/506320982495985976/

      Delete
    5. that one probably did not support it

      Delete
    6. Thx again. Have a good weekend

      Delete