{"id":16242074,"url":"https://github.com/chenxuuu/llcom","last_synced_at":"2025-05-14T21:07:57.985Z","repository":{"id":41368080,"uuid":"181629842","full_name":"chenxuuu/llcom","owner":"chenxuuu","description":"🛠功能强大的串口工具。支持Lua自动化处理、串口调试、WinUSB、串口曲线、TCP测试、MQTT测试、编码转换、乱码恢复等功能","archived":false,"fork":false,"pushed_at":"2025-04-06T08:16:24.000Z","size":4064,"stargazers_count":952,"open_issues_count":17,"forks_count":223,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-04-06T15:03:54.903Z","etag":null,"topics":["com","encoding-decoding","ipv6-support","libusb","lua","mqtt-client","rs232","serial-port","serial-port-monitor","ssl-server","tcp-client","tcp-server","udp-client","udp-server","winusb"],"latest_commit_sha":null,"homepage":"https://llcom.papapoi.com/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chenxuuu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"chenxuuu","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2019-04-16T06:38:35.000Z","updated_at":"2025-04-03T08:17:28.000Z","dependencies_parsed_at":"2023-02-19T06:16:13.833Z","dependency_job_id":"b75a4e60-89ba-4e15-9a24-682ca58e7fe7","html_url":"https://github.com/chenxuuu/llcom","commit_stats":{"total_commits":505,"total_committers":7,"mean_commits":72.14285714285714,"dds":0.0653465346534653,"last_synced_commit":"b1d1c2f232cbb331b94c9ebdb61280e5de387609"},"previous_names":[],"tags_count":112,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenxuuu%2Fllcom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenxuuu%2Fllcom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenxuuu%2Fllcom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenxuuu%2Fllcom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chenxuuu","download_url":"https://codeload.github.com/chenxuuu/llcom/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248752930,"owners_count":21156181,"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":["com","encoding-decoding","ipv6-support","libusb","lua","mqtt-client","rs232","serial-port","serial-port-monitor","ssl-server","tcp-client","tcp-server","udp-client","udp-server","winusb"],"created_at":"2024-10-10T14:09:24.253Z","updated_at":"2025-04-13T17:35:33.687Z","avatar_url":"https://github.com/chenxuuu.png","language":"C#","readme":"# LLCOM\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n[![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors-)\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\n[English readme click here](/README_EN.md)\n\n![icon](/llcom/llcom.ico)\n\n[![Build status](https://ci.appveyor.com/api/projects/status/telji5j8r0v5001c?svg=true)](https://ci.appveyor.com/project/chenxuuu/llcom)\n[![MIT](https://img.shields.io/static/v1.svg?label=license\u0026message=Apache+2\u0026color=blue)](https://github.com/chenxuuu/llcom/blob/master/LICENSE)\n[![code-size](https://img.shields.io/github/languages/code-size/chenxuuu/llcom.svg)](https://github.com/chenxuuu/llcom/archive/master.zip)\n\n可运行lua脚本的高自由度串口调试工具。使用交流群：`931546484`\n\n## 下载\n\n从微软商店安装：\n\n\u003ca href='//www.microsoft.com/store/apps/9PMPB0233S0S?cid=storebadge\u0026ocid=badge'\u003e\u003cimg src='https://developer.microsoft.com/store/badges/images/Chinese_Simplified_get-it-from-MS.png' alt='Chinese badge' width='160'/\u003e\u003c/a\u003e\n\nexe便携版：[国内用户点我下载](https://llcom.papapoi.com/llcom.zip)\n\nCI快照版：[Appveyor Artifacts](https://ci.appveyor.com/project/chenxuuu/llcom/build/artifacts)\n\n所有正式版本：[GitHub Releases](https://github.com/chenxuuu/llcom/releases/latest)\n\n## 功能列表\n\n- 其他串口调试功能具有的功能\n- 收发日志清晰明了，可同时显示HEX值与实际字符串\n- 自动保存串口与Lua脚本日志，并附带时间\n- 串口断开后，如果再次连接，会自动重连\n- 发送的数据可被用户自定义的Lua脚本提前处理\n- 右侧快捷发送栏，快捷发送条目数量不限制\n- 右侧快捷发送栏，支持10页数据，互相独立\n- 可独立运行Lua脚本，并拥有定时器与协程任务特性（移植自[合宙Luat Task架构](http://wiki.openluat.com/doc/luatFramework/)）\n- 可选文字编码格式\n- 终端功能，直接敲键盘发送数据（包含ctrl+字母键）\n- 可单独隐藏发送数据\n- 集成TCP、UDP、SSL测试服务端/客户端功能，并且支持IPV6\n- 集成各种编码互转功能\n- 集成乱码恢复功能\n- 集成mqtt测试功能\n- 集成串口监听功能，可监听其他软件的串口通信数据\n\n![screen](/image/screen.png)\n![screen3](/image/screen3.png)\n![screen2](/image/screen2.jpg)\n\n## 特色功能示范\n\n### 使用Lua脚本提前处理待发送的数据\n\n1. 结尾加上换行回车\n\n```lua\nreturn uartData..\"\\r\\n\"\n```\n\n2. 发送16进制数据\n\n```lua\nreturn uartData:fromHex()\n```\n\n此脚本可将形如`30313233`发送数据，处理为`0123`的结果\n\n3. 更多玩法等你发现\n\n```lua\njson = require(\"JSON\")\nt = uartData:split(\",\")\nreturn json:encode({\n    key1 = t[1],\n    key2 = t[2],\n    key3 = t[3],\n})\n```\n\n此脚本可将形如`a,b,c`发送数据，处理为`{\"key1\":\"a\",\"key2\":\"b\",\"key3\":\"c\"}`的结果\n\n**此处理脚本，同样对右侧快捷发送区域有效。**\n\n### 独立的Lua脚本自动处理串口收发\n\n右侧的Lua脚本调试区域，可直接运行你写的串口测试脚本，如软件自带的：\n\n```lua\n--注册串口接收函数\nuartReceive = function (data)\n    log.info(\"uartReceive\",data)\n    sys.publish(\"UART\",data)--发布消息\nend\n\n--新建任务，等待接收到消息再继续运行\nsys.taskInit(function()\n    while true do\n        local _,udata = sys.waitUntil(\"UART\")--等待消息\n        log.info(\"task waitUntil\",udata)\n        local sendResult = apiSendUartData(\"ok!\")--发送串口消息\n        log.info(\"uart send\",sendResult)\n    end\nend)\n\n--新建任务，每休眠1000ms继续一次\nsys.taskInit(function()\n    while true do\n        sys.wait(1000)--等待1000ms\n        log.info(\"task wait\",os.time())\n    end\nend)\n\n--1000ms循环定时器\nsys.timerLoopStart(log.info,1000,\"timer test\")\n```\n\n甚至你可以利用xlua框架的特性，调用C#接口完成任何你想做的事情\n\n```lua\nrequest = CS.System.Net.WebRequest.Create(\"http://example.com\")\nrequest.ContentType = \"text/html;charset=UTF-8\";\nrequest.Timeout = 5000;--超时时间\nrequest.UserAgent = \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36 Vivaldi/2.2.1388.37\";\n\nresponse = request:GetResponse():GetResponseStream()\n\nmyStreamReader = CS.System.IO.StreamReader(response, CS.System.Text.Encoding.UTF8);\n\nprint(myStreamReader:ReadToEnd())--打印获取的body内容\n\nmyStreamReader:Close()\nresponse:Close()\n```\n\n使用此功能，你可以完成大部分的自动化串口调试操作。\n\n## 接口文档\n\n接口文档可以在[这个页面](https://github.com/chenxuuu/llcom/blob/master/LuaApi.md)查看\n\n## 已知问题与待添加的功能（请大家反馈，谢谢！）\n\n- [x] ~~bug：某些条件下（比如Air720重启），COM口消失后不会被释放，导致无法再次开启该COM口，只能重启软件（[.net 框架的bug，微软的人在看了](https://github.com/dotnet/corefx/issues/39464)）~~（已解决 #2f26e68）\n\n## 开源\n\n如果各位大佬不觉得麻烦的话，欢迎对本项目进行pr或直接重构。\n\n本项目在前期只是为了实现功能，代码相当零散，所以不太适合阅读我的源码进行学习，等我有空的时候会重构代码。\n\n本项目采用Apache 2.0协议，如有借用，请保留指向该项目的链接。\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/whc2001\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/16266909?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003ewhc2001\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/chenxuuu/llcom/commits?author=whc2001\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/chenxuuu/llcom/issues?q=author%3Awhc2001\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://www.chenxublog.com/\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/10357394?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003echenxuuu\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#projectManagement-chenxuuu\" title=\"Project Management\"\u003e📆\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/neomissing\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/22003930?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eneomissing\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-neomissing\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/RYLF\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/28991981?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eRuoYun\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/chenxuuu/llcom/issues?q=author%3ARYLF\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://www.diycms.com\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/13432299?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003e王龙\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-wanglong126\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"https://github.com/chenxuuu/llcom/issues?q=author%3Awanglong126\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e \u003ca href=\"https://github.com/chenxuuu/llcom/commits?author=wanglong126\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/linhongz\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/49241612?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003elinhongz\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-linhongz\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"https://github.com/chenxuuu/llcom/issues?q=author%3Alinhongz\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](htts://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n\n\n## 特别感谢\n\n[![icon-resharper](/image/icon-resharper.svg)](https://www.jetbrains.com/?from=LLCOM)\n","funding_links":["https://ko-fi.com/chenxuuu"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchenxuuu%2Fllcom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchenxuuu%2Fllcom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchenxuuu%2Fllcom/lists"}