{"id":13782897,"url":"https://github.com/farshield/tachograph_d8","last_synced_at":"2025-05-11T16:33:27.136Z","repository":{"id":138307399,"uuid":"109805468","full_name":"farshield/tachograph_d8","owner":"farshield","description":"Tachograph D8 serial output interpreter","archived":false,"fork":false,"pushed_at":"2017-11-07T08:29:48.000Z","size":10,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-24T16:14:42.731Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/farshield.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-11-07T08:10:35.000Z","updated_at":"2024-04-04T19:17:09.000Z","dependencies_parsed_at":"2024-01-28T06:06:34.493Z","dependency_job_id":"90b7d67f-7440-49e8-9537-06dc1bcc7491","html_url":"https://github.com/farshield/tachograph_d8","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farshield%2Ftachograph_d8","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farshield%2Ftachograph_d8/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farshield%2Ftachograph_d8/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farshield%2Ftachograph_d8/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/farshield","download_url":"https://codeload.github.com/farshield/tachograph_d8/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213838104,"owners_count":15645778,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T18:01:47.472Z","updated_at":"2024-08-03T18:11:00.124Z","avatar_url":"https://github.com/farshield.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# tachograph_d8\n\nTachograph D8 serial output interpreter for `VDO` and `Stoneridge` models. Code was designed for `PIC24` but can be adapted to any controller. Make sure you setup an interrupt-based UART driver which calls the notification functions from the `tacho` module. `FRAM`, `J1939` and `FMI` parts can be removed.\n\n`Stoneridge` specs can be found at this [link](http://files.webyan.com/10552/files/D8/1231_078-990136%2001%20SE5000%20rev%207%20D8%20Serial%20data%20Output.pdf).\n\nI was unable to find specs for the `VDO` tachograph so an attempt at reverse engineering the frame was made.\n\n## VDO frame interpretation\n\nFrame arrival period = ~1 second\n\n### Frame length (bytes)\n\n```\n106 - both cards inserted\n88 - 1 card\n70 - no card\n```\n\n### Content\n\n```\n----------------------\nFrame start\n----------------------\n\nByte[0] - 0x55 - U  # sync byte (for autobaud?)\nByte[1] - 0x44 - D  # device name\nByte[2] - 0x54 - T  # -\nByte[3] - 0x43 - C  # -\nByte[4] - 0x4F - O  # -\n\nByte[5] - 0x00 - '0' # reserved? (zero)\n\n----------------------\nTime info\n----------------------\n\nByte[6] - 0xAC - '172'  # UTC seconds (0.25sec/bit) [0-236]\nByte[7] - 0x1E - '30'  # UTC minutes\nByte[8] - 0x0D - \\r  # UTC hours\nByte[9] - 0x08 - '8'  # month\nByte[10] - 0x47 - G '71'  # day (0.25day/bit) - value of 0 is null (day 1 starts at 0.25)\nByte[11] - 0x20 - ' ' '32'  # year (1985 offset)\nByte[12] - 0x7D - } '125'  # local minute offset (1 min/bit and -125 min offset)\nByte[13] - 0x80 - '128'  # local hour offset ( 1 h/bit and -125 h offset)\n\n----------------------\nDriver info\n----------------------\n\nByte[14] - 0x0A - \\n '10'  # driver 1\u00262 working state + vehicle motion? (ex. 01 011 011)\nByte[15] - 0x00 - '0'  # overspeed \u0026 driver 1 time rel states (0x40) (0x41)\nByte[16] - 0xC0 - '192'  # driver 2 rel states\nByte[17] - 0xC0 - '192'  # system event (first bit)\n\n----------------------\nCar info\n----------------------\n\nByte[18] - 0x00 - '0'  # speed LSB (1/256 km/h/bit)\nByte[19] - 0x00 - '0'  # speed MSB (1 km/h/bit)\n\nByte[20] - 0x9B - '155' # High resolution total vehicle distance (4 bytes)\nByte[21] - 0xB2 - '178' # - 5 m/bit gain\nByte[22] - 0xE1 - '225' # -\nByte[23] - 0x05 - '5'   # - MSB\n\nByte[24] - 0x03 - '3'   # High resolution trip distance (4 bytes)\nByte[25] - 0x6F - o     # - 5 m/bit\nByte[26] - 0x53 - S     # -\nByte[27] - 0x00 - '0'   # - MSB\n\nByte[28] - 0x40 - @     # K-factor (2 bytes)\nByte[29] - 0x1F - '31'\n\nByte[30] - 0xFF - '255'\nByte[31] - 0xFF - '255'\n\nByte[32] - 0x50 - P\nByte[33] - 0x04 - '4'\n\n----------------------\nVehicle identification\n----------------------\n\nByte[34] - 0x11 - '17' # VIN length (17 bytes)?\nByte[35] - 0x57 - W  # VIN start\nByte[36] - 0x44 - D  # -\nByte[37] - 0x42 - B  # -\nByte[38] - 0x39 - 9  # -\nByte[39] - 0x36 - 6  # -\nByte[40] - 0x33 - 3  # -\nByte[41] - 0x34 - 4  # -\nByte[42] - 0x30 - 0  # -\nByte[43] - 0x33 - 3  # -\nByte[44] - 0x31 - 1  # -\nByte[45] - 0x4C - L  # -\nByte[46] - 0x37 - 7  # -\nByte[47] - 0x31 - 1  # -\nByte[48] - 0x37 - 7  # -\nByte[49] - 0x37 - 7  # -\nByte[50] - 0x32 - 2  # -\nByte[51] - 0x39 - 9  # -\n\n----------------------\nCustom string?\n----------------------\n\nByte[52] - 0x0E - '14' # Custom string length (14 bytes)?\nByte[53] - 0x01 - '1' # Custom string start...\nByte[54] - 0x31 - 1\nByte[55] - 0x32 - 2\nByte[56] - 0x33 - 3\nByte[57] - 0x54 - T\nByte[58] - 0x45 - E\nByte[59] - 0x53 - S\nByte[60] - 0x54 - T\nByte[61] - 0x20 - ' '\nByte[62] - 0x20 - ' '\nByte[63] - 0x20 - ' '\nByte[64] - 0x20 - ' '\nByte[65] - 0x20 - ' '\nByte[66] - 0x20 - ' '\n\n-------------------------\n1st Driver identification\n-------------------------\n\nByte[67] - 0x12 - '18' # is non-zero if card is available\nByte[68] - 0x04 - '4'  #\nByte[69] - 0x29 - )    # issuing member state (0x29 - Romania)\nByte[70] - 0x30 - 0  # card number start\nByte[71] - 0x30 - 0  #\nByte[72] - 0x30 - 0  #\nByte[73] - 0x30 - 0  #\nByte[74] - 0x30 - 0  #\nByte[75] - 0x30 - 0  #\nByte[76] - 0x30 - 0  #\nByte[77] - 0x30 - 0  #\nByte[78] - 0x30 - 0  #\nByte[79] - 0x30 - 0  #\nByte[80] - 0x38 - 8  #\nByte[81] - 0x36 - 6  #\nByte[82] - 0x48 - H  #\nByte[83] - 0x31 - 1  #\nByte[84] - 0x30 - 0  #\nByte[85] - 0x31 - 1  #\n\n-------------------------\n2nd Driver identification\n-------------------------\n\nByte[86] - 0x00 - '0' # 2nd card not present\n\n-------------------------\nEnd of frame\n-------------------------\n\nByte[87] - 0xCC - '204' # CRC-8 simple XOR\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarshield%2Ftachograph_d8","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffarshield%2Ftachograph_d8","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarshield%2Ftachograph_d8/lists"}