{"id":18762196,"url":"https://github.com/liyanboy74/modbus","last_synced_at":"2025-04-13T03:32:07.562Z","repository":{"id":41089144,"uuid":"305792835","full_name":"liyanboy74/modbus","owner":"liyanboy74","description":"MODBUS RTU library for STM32 STM8 AVR LPC \u0026 more","archived":false,"fork":false,"pushed_at":"2024-07-21T04:57:12.000Z","size":669,"stargazers_count":38,"open_issues_count":0,"forks_count":9,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T21:22:03.372Z","etag":null,"topics":["c","library","modbus","rtu","stm32"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/liyanboy74.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}},"created_at":"2020-10-20T18:03:35.000Z","updated_at":"2024-11-08T18:48:24.000Z","dependencies_parsed_at":"2024-07-21T05:51:11.138Z","dependency_job_id":null,"html_url":"https://github.com/liyanboy74/modbus","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liyanboy74%2Fmodbus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liyanboy74%2Fmodbus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liyanboy74%2Fmodbus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liyanboy74%2Fmodbus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liyanboy74","download_url":"https://codeload.github.com/liyanboy74/modbus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248659690,"owners_count":21141160,"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":["c","library","modbus","rtu","stm32"],"created_at":"2024-11-07T18:20:00.729Z","updated_at":"2025-04-13T03:32:07.320Z","avatar_url":"https://github.com/liyanboy74.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MODBUS\nModbus RTU C library for embedded systems.\n\n![MBLib-data-flow](https://user-images.githubusercontent.com/64005694/154830661-b1cc3740-ec50-44c9-9330-b34d01b1224c.svg)\n\n### Requirements\n**Memory**\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003c/td\u003e\n        \u003ctd\u003eFlash\u003c/td\u003e\n        \u003ctd\u003eRAM\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cstrong\u003eMaster\u003c/td\u003e\n        \u003ctd\u003e~2K\u003c/td\u003e\n        \u003ctd\u003e64\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cstrong\u003eSlave\u003c/td\u003e\n        \u003ctd\u003e~4K\u003c/td\u003e\n        \u003ctd\u003e96 *\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n* Without database size, default +68 Byte.\n\n### Guide \n\nFollow below steps:\n- Select master or slave mode in `mb.h` or in Compiler Defines.\n- Send Byte-by-Byte received data to `mb_rx_new_data()` for processing .\n- Use `mb_set_tx_handler()` for set callback for transmit data from MODBUS layer.\n- In master mode, received packet don't process automatically! so the callback must be set by `mb_set_master_process_handler()` .\n\n**Note:** The library don't handle Rx Timout error! the `mb_rx_timeout_handler()` must be call for reset rx buffer index .\n\n### Examples\n- [STM32 MODBUS Slave Example](https://github.com/ioelectro/modbus-stm32-slave-example.git)\n- [STM8 MODBUS Slave Example](https://github.com/ioelectro/modbus-stm8-slave-example)\n- [AVR MODBUS Network Example](https://github.com/ioelectro/modbus-avr-example.git)\n\n\n### File Description\n**Common**\n- `mb` : Common MODBUS init,functions and types\n- `mb-link` : Prepare Packet for send, receive and process\n- `mb-crc` : Cyclic redundancy check\n- `mb-packet` : Make packets\n\n**Slave**\n- `mb-check` : Checking received data\n- `mb-process` : Process received packets\n- `mb-table` : Database\n\n### Run Test.c\nAfter installing `GCC` and `Make` , run below command:\n```\nmake test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliyanboy74%2Fmodbus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliyanboy74%2Fmodbus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliyanboy74%2Fmodbus/lists"}