{"id":47624298,"url":"https://github.com/wdfk-prog/can_uds","last_synced_at":"2026-04-01T22:35:17.878Z","repository":{"id":327184878,"uuid":"1099657142","full_name":"wdfk-prog/can_uds","owner":"wdfk-prog","description":"The implementation of the ISO14229-1 (UDS) protocol stack suitable for RT-Thread. It provides functions such as CAN console mode and file transfer.适用于 RT-Thread 的 ISO14229-1 (UDS) 协议栈实现。提供CAN控制台模式与文件传输等功能。","archived":false,"fork":false,"pushed_at":"2026-03-21T07:44:56.000Z","size":168,"stargazers_count":3,"open_issues_count":1,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-21T19:18:29.619Z","etag":null,"topics":["c","can","iso14229","isotp","rt-thread","uds"],"latest_commit_sha":null,"homepage":"http://wdfk-prog.space/can_uds/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wdfk-prog.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-19T09:23:38.000Z","updated_at":"2026-03-21T07:44:59.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/wdfk-prog/can_uds","commit_stats":null,"previous_names":["wdfk-prog/can_uds"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/wdfk-prog/can_uds","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdfk-prog%2Fcan_uds","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdfk-prog%2Fcan_uds/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdfk-prog%2Fcan_uds/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdfk-prog%2Fcan_uds/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wdfk-prog","download_url":"https://codeload.github.com/wdfk-prog/can_uds/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdfk-prog%2Fcan_uds/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31292661,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["c","can","iso14229","isotp","rt-thread","uds"],"created_at":"2026-04-01T22:35:17.184Z","updated_at":"2026-04-01T22:35:17.870Z","avatar_url":"https://github.com/wdfk-prog.png","language":"C","readme":"[中文](README_ZN.md)\n\n# can_uds\n\n`can_uds` is an **RT-Thread-oriented ISO 14229-1 / UDS server-side integration repository** focused on the **ECU / server side**. The repository currently provides:\n\n- a generic UDS / ISO-TP protocol core and headers\n- an RT-Thread port layer and runtime environment\n- a set of mountable business services under `service/`\n- example applications, including a base example and a `0x2A + ULOG` periodic-streaming example\n\n\u003e The repository contents are centered on the RT-Thread server component, and this README has been rewritten to match the code that actually exists today.\n\n---\n\n## 1. Positioning\n\nTypical use cases include:\n\n- MCU / ECU diagnostics\n- production-line test, after-sales maintenance, and remote service\n- DID-backed parameter access\n- `0x2F` I/O control\n- periodic data or log streaming through `0x2A`\n- remote console execution through `0x31`\n- file read/write workflows through `0x34 ~ 0x38`\n\nThis is not just a bare protocol core. It is a **practical RT-Thread UDS integration framework**.\n\n---\n\n## 2. Repository layout\n\n```text\ncan_uds/\n├── examples/\n├── service/\n├── docs/\n│   ├── zh/\n│   └── en/\n├── iso14229.c\n├── iso14229.h\n├── iso14229_rtt.c\n├── iso14229_rtt.h\n├── rtt_uds_config.h\n├── Kconfig\n├── SConscript\n├── README.md\n├── README_en.md\n└── package.json\n```\n\n---\n\n## 3. Implemented services\n\n| SID | Service | Implementation file | Notes |\n|---|---|---|---|\n| 0x10 | Diagnostic Session Control | `service_0x10_session.c` | default / extended / programming sessions |\n| 0x11 | ECU Reset | `service_0x11_reset.c` | delayed reset after positive response |\n| 0x22 | ReadDataByIdentifier | `service_0x22_0x2E_param.c` | parameter-read adapter |\n| 0x27 | Security Access | `service_0x27_security.c` | Seed / Key unlock flow |\n| 0x28 | Communication Control | `service_0x28_comm.c` | application RX/TX gating |\n| 0x2A | ReadDataByPeriodicIdentifier | `service_0x2A_periodic.c` | provider registration and scheduling |\n| 0x2E | WriteDataByIdentifier | `service_0x22_0x2E_param.c` | parameter-write adapter |\n| 0x2F | InputOutputControlByIdentifier | `service_0x2F_io.c` | takeover / return-control handling |\n| 0x31 | RoutineControl | `service_0x31_console.c` | remote-console routine |\n| 0x34/0x36/0x37/0x38 | File-transfer related services | `service_0x36_0x37_0x38_file.c` | file I/O with CRC closure |\n| 0x3E | TesterPresent | core | session keep-alive |\n\n---\n\n## 4. Client / Tester Implementation\n\nThis repository mainly provides a **UDS server (ECU-side)** implementation.\n\nIf you need a corresponding diagnostic client (tester), refer to the Linux example below:\n\n👉 https://github.com/wdfk-prog/iso14229/tree/rtt/examples/rtt_server/client_demo\n\nThis demo is based on Linux + SocketCAN / ISO-TP and can be used for:\n\n- Integration testing with this server\n- Verifying UDS services (0x10 / 0x22 / 0x31 / file transfer, etc.)\n- Serving as a base for production or debugging tools\n\n\u003e Recommendation: use this client_demo during early bring-up and protocol validation.\n\n## 5. Quick start\n\n1. Enable the package and the services you need in `menuconfig`.\n2. Make sure the BSP CAN driver can send and receive frames correctly.\n3. Create the runtime environment with `rtt_uds_create()`.\n4. Mount services with `rtt_uds_*_service_mount()`.\n5. Feed received CAN frames into the stack with `rtt_uds_feed_can_frame()`.\n\n```c\n#include \"rtt_uds_service.h\"\n\nstatic rtt_uds_env_t *g_env;\n\nRTT_UDS_SEC_SERVICE_DEFINE(security_service, 0x01, 0xA5A5A5A5);\nRTT_UDS_IO_SERVICE_DEFINE(io_service);\nRTT_UDS_FILE_SERVICE_DEFINE(file_service);\nRTT_UDS_0X2A_SERVICE_DEFINE(periodic_service);\n\nstatic int uds_app_init(void)\n{\n    rtt_uds_config_t cfg = {0};\n\n    g_env = rtt_uds_create(\u0026cfg);\n    if (g_env == RT_NULL)\n    {\n        return -RT_ERROR;\n    }\n\n    rtt_uds_sec_service_mount(g_env, \u0026security_service);\n    rtt_uds_io_service_mount(g_env, \u0026io_service);\n    rtt_uds_file_service_mount(g_env, \u0026file_service);\n    rtt_uds_0x2a_service_mount(g_env, \u0026periodic_service);\n\n    return RT_EOK;\n}\n```\n\nFor a guided setup path, see [`docs/en/quick-start.md`](docs/en/quick-start.md).\n\n---\n\n## 6. Documentation\n\n### API Documentation\n\nThe complete API reference (HTML) is published through GitHub Pages:\n\n➡️ https://wdfk-prog.space/can_uds/\n\n### Project Docs (English)\n\n- [Architecture](docs/en/architecture.md)\n- [Quick Start](docs/en/quick-start.md)\n- [Service Guide](docs/en/service-guide.md)\n- [DID Design](docs/en/did-design.md)\n- [File Transfer](docs/en/file-transfer.md)\n- [Console Service](docs/en/console-service.md)\n- [0x2A Periodic Service](docs/en/0x2a-periodic.md)\n- [Porting Notes](docs/en/porting-notes.md)\n\n---\n\n## 7. Chinese docs\n\nSee [`README_ZN.md`](README_ZN.md) for the Chinese entry, or go directly to [`docs/zh/`](docs/zh/).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwdfk-prog%2Fcan_uds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwdfk-prog%2Fcan_uds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwdfk-prog%2Fcan_uds/lists"}