chenxuuu / llcom Goto Github PK
View Code? Open in Web Editor NEW🛠功能强大的串口工具。支持Lua自动化处理、串口调试、串口监听、串口曲线、TCP测试、MQTT测试、编码转换、乱码恢复等功能
Home Page: https://llcom.papapoi.com/
License: Apache License 2.0
🛠功能强大的串口工具。支持Lua自动化处理、串口调试、串口监听、串口曲线、TCP测试、MQTT测试、编码转换、乱码恢复等功能
Home Page: https://llcom.papapoi.com/
License: Apache License 2.0
TCP服务器工具可以接收客户端数据但是发送数据客户端收不到
程序如果改变了位置和窗口尺寸
下次运行时会先在屏幕中间默认尺寸展示
紧接着会马上改变位置和尺寸到上次的地方,会抖动
可以先隐藏窗口,处理完成后再进行展示
串口目前有勾选是否显示HEX的选项
很多时候串口交互是纯HEX的,在通过代码进行解码
是否考虑给日志模式增加选项,仅显示HEX
比如日志如下
[2021-12-01 10:18:41.9613] ← ������
HEX:A1 1A A2 00 11 B1 1B
[2021-12-01 10:18:42.0032] → ������
HEX:A1 1A A2 00 11 B1 1B
[2021-12-01 10:18:42.9769] ← ������
HEX:A1 1A A2 00 11 B1 1B
[2021-12-01 10:18:43.0048] → ������
HEX:A1 1A A2 00 11 B1 1B
[2021-12-01 10:18:43.4253] ← ������
HEX:A1 1A A2 00 11 B1 1B
[2021-12-01 10:18:43.4472] → ������
HEX:A1 1A A2 00 11 B1 1B
SSCOM5显示如下
[10:21:17.968]发→◇A1 1A A2 00 11 22 B1 1B □
[10:21:17.970]收←◆A1 1A A2 00 11 22 B1 1B
[10:21:18.304]发→◇A1 1A A2 00 11 22 B1 1B □
[10:21:18.307]收←◆A1 1A A2 00 11 22 B1 1B
数据显示HEX还是文本数据这个选项可以考虑放到外面吗,因为这个选项用到的频率比较高。同时显示两者的话,如果是hex数据那么文本数据就有可能是乱码的,对于强迫症患者来说非常难受。
运行lua脚本的地方,在下面合适的位置放一个清空吧
是否可以考虑加入一些动态曲线的api,实现弹出个框,绘制动态曲线的功能?
调试某些产品时通常需要整晚运行,第二天再查看日志。希望脚本输出内容可以保存到文件中,方便调试。
最近开发的项目中,涉及到串口和蓝牙BLE数据通讯,经常需要手动写代码来测试数据的收发,分别要在Windows和安卓上写代码来测试,但是效率和实用性比较低,这个工具用lua脚本来写,扩展开来的话,用作调试/测试工具,应该很方便,希望的扩展如下:
1、支持CRC计算,这个在串口传输时的数据校验经常用到;
2、支持二进制文件读写,在我的项目中会通过串口传声音数据,所以需要解析出来并保存成文件;
3、支持C库扩展,因为我的声音数据是opus编码的,这个编码提供的是C源码,如果此项目能支持通过lua调用第三方C库的API,那扩展性就很强了,这个需求可以另外开一个repo来专门说明吧;
4、支持BLE数据收发,在IOT项目也经常用到,Windows原生开发可以参考微软的例子:https://github.com/microsoft/BluetoothLEExplorer;
5、既然说到BLE支持,那就涉及到手机端开发了,考虑到跨平台开发的话,能选择的方案有微软的Xamarin: https://docs.microsoft.com/zh-cn/xamarin/和谷歌的Flutter: https://flutterchina.club/docs/,如果用Xamarin因为是C#开发,可能跟现有工程代码能有一定的复用,缺点是Xamarin在国内很少人用,用Flutter的话,就相当于开发一个全新的APP了,这个需要考虑好;
以上,涉及蓝牙和跨平台开发可以一起来做,这个项目做成一个给嵌入式用的小型测试平台应该还是挺实用的;
调整软件界面大小以及在显示区域的位置后,关闭软件再次开启时,会先在默认位置以默认大小的方式显示出来,再闪现到自定义大小及自定义位置。
TCP服务器工具可以接收客户端数据但是发送数据客户端无法收到
您的功能请求是否与解决某些问题有关?请描述一下。/ Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
描述您想要的解决方案 / Describe the solution you'd like
A clear and concise description of what you want to happen.
描述您考虑过的替代方案 / Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
其他备注信息
Add any other context or screenshots about the feature request here.
描述一下这个bug / Describe the bug
请使用简介并详细的语句,来描述这个bug。 / A clear and concise description of what the bug is.
复现步骤 / To Reproduce
按照下面的步骤,可以复现bug / Steps to reproduce the behavior:
预期的行为 / Expected behavior
清楚简洁地描述你希望发生的事情。 / A clear and concise description of what you expected to happen.
截图 / Screenshots
如果需要,请放上你的截图。 / If applicable, add screenshots to help explain your problem.
日志 / Logs
有,请上传日志为附件 / Upload your log files.
系统信息 / Desktop (please complete the following information):
其他备注信息 / Additional context
Add any other context about the problem here.
您的功能请求是否与解决某些问题有关?请描述一下。/ Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
当数据量很大的时候,会将数据先放到文件,然后批量发送,这时候不希望等待很久才能发送完毕。
描述您想要的解决方案 / Describe the solution you'd like
A clear and concise description of what you want to happen.
在c#框架中直接开放出发送文件的api,让其在lua脚本中可调用。
描述您考虑过的替代方案 / Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
我尝试直接使用lua读取文件发送,但是这样发送太慢,会消耗很长的时间。
其他备注信息
Add any other context or screenshots about the feature request here.
您的功能请求是否与解决某些问题有关?请描述一下。/ Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
执行lua脚本后发现代码写的有一些问题,在外部编辑器已经做了修改
重新运行脚本,需要按下两次停止,然后再重新按下运行
流程感觉多了一些
描述您想要的解决方案 / Describe the solution you'd like
A clear and concise description of what you want to happen.
在lua脚本停止运行后,暂停按钮已经变得没有作用,改为重新运行感觉会更好
1、与SSCOM类似增加TCP/UDP的支持;以后可以考虑增加MQTT等。串口与网络做一种通道的选择。
2、命令行带脚本启动。比如使用命令行带参数,分别打开串口1、串口2进行不同的脚本收发。这样可以进行自动与重复调试。
一直有这个bug的上报,先记一下,目前原因不明
at MS.Win32.UnsafeNativeMethods.PostMessage(HandleRef hwnd, WindowMessage msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Interop.HwndTarget.UpdateWindowSettings(Boolean enableRenderTarget, Nullable`1 channelSet)
at System.Windows.Interop.HwndTarget.UpdateWindowPos(IntPtr lParam)
at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
Application | llcom |
---|---|
Version | 1.0.5.8 |
Date | 2021-04-29 00:44:06Z |
OS | Windows 10 |
CLR | 4.0.30319.42000 |
CrashReporter.NET Version | 1.6.0.0 |
模块断开USB连接后,程序崩溃
描述一下这个bug / Describe the bug
请使用简介并详细的语句,来描述这个bug。 / A clear and concise description of what the bug is.
打开串口后发送数据无反应
复现步骤 / To Reproduce
按照下面的步骤,可以复现bug / Steps to reproduce the behavior:
预期的行为 / Expected behavior
清楚简洁地描述你希望发生的事情。 / A clear and concise description of what you expected to happen.
截图 / Screenshots
如果需要,请放上你的截图。 / If applicable, add screenshots to help explain your problem.
日志 / Logs
有,请上传日志为附件 / Upload your log files.
系统信息 / Desktop (please complete the following information):
其他备注信息 / Additional context
Add any other context about the problem here.
您的功能请求是否与解决某些问题有关?请描述一下。/ Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
描述您想要的解决方案 / Describe the solution you'd like
A clear and concise description of what you want to happen.
描述您考虑过的替代方案 / Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
其他备注信息
Add any other context or screenshots about the feature request here.
同样是遗留已久的bug
现象:软件彻底无反应,cpu不涨
当时的日志:
[DBG] [OpenClosePortButton]now:True
[DBG] [OpenClosePortButton]close
[DBG] [UartClose]refreshSerialDevice
[DBG] [refreshSerialDevice]start
[DBG] [refreshSerialDevice]lastPortBaseStream.Dispose
经过排查,是卡在了这一行:
Line 40 in 9a54f05
又tm是微软的bug
描述一下这个bug / Describe the bug
实时执行lua语句 - [Enter] 点击后卡死
复现步骤 / To Reproduce
按照下面的步骤,可以复现bug / Steps to reproduce the behavior:
代码区没有提示
可以按TAB和SHIFT TAB来调整格式
但是不能用SHIFT /来增加注释和取消注释
这个应该挺实用的
想了解下这个实现原理,因为这个好像是要绑定进程的,这个dll 的实现原理可以跨平台到linux吗?
描述一下这个bug / Describe the bug
打开一个llcom(v.1.0.2.6),运行lua脚本对收到的串口数据进行回送,刚开始时发出和回送间的延迟是120ms左右,llcom运行1个晚上后,回送时延变为300ms左右
复现步骤 / To Reproduce
按照下面的步骤,可以复现bug / Steps to reproduce the behavior:
预期的行为 / Expected behavior
持续运行较长时间lua脚本(如一个晚上)后,收发时延有初始的120ms左右,延长至300ms左右;
截图 / Screenshots
如果需要,请放上你的截图。 / If applicable, add screenshots to help explain your problem.
系统信息 / Desktop (please complete the following information):
其他备注信息 / Additional context
运行的lua脚本:
--由于软件有自动保存
--所以请勿在开启本软件的同时
--用其他编辑器编辑此处打开了的脚本
--以免被覆盖掉
--建议在此处require你在改的脚本
--注册串口接收函数
uartReceive = function (data)
log.info("uart receive",data)
sys.publish("UART",data)--发布消息
end
--新建任务,等待接收到消息再继续运行
sys.taskInit(function()
while true do
--等待消息,超时1000ms
local r,udata = sys.waitUntil("UART",1000)
log.info("uart wait",r,udata)
if r then
--local str=tostring(udata)
--发送串口消息,并获取发送结果
local sendResult = apiSendUartData("ok!"..tostring(udata))
log.info("uart send",sendResult)
end
end
end)
--新建任务,每休眠1000ms继续一次
--sys.taskInit(function()
-- while true do
-- sys.wait(1000)--等待1000ms
-- log.info("task wait",os.time())
-- end
--end)
--1000ms循环定时器
--sys.timerLoopStart(log.info,1000,"timer test")
1、与SSCOM类似增加TCP/UDP的支持;以后可以考虑增加MQTT等。串口与网络做一种通道的选择。
2、命令行带脚本启动。比如使用命令行带参数,分别打开串口1、串口2进行不同的脚本收发。这样可以进行自动与重复调试。
建议抽象 通道为 tcp/udp/串口,类似sscom那样
您的功能请求是否与解决某些问题有关?请描述一下。/ Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
描述您想要的解决方案 / Describe the solution you'd like
A clear and concise description of what you want to happen.
描述您考虑过的替代方案 / Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
其他备注信息
Add any other context or screenshots about the feature request here.
描述一下这个bug / Describe the bug
使用附件中的setting文件无法正常启动。
settings - 无法启动.zip
复现步骤 / To Reproduce
按照下面的步骤,可以复现bug / Steps to reproduce the behavior:
如上描述。
系统信息 / Desktop (please complete the following information):
其他备注信息 / Additional context
疑为json解析或是封装存在问题。上一次的正常配置文件也没有正常读取。并且使用上一次的配置文件时,无法扫描到脚本目录的脚本。
增加一个导入按键,直接导入SSCOM的ini文件
您的功能请求是否与解决某些问题有关?请描述一下。/ Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
llcom 有计划支持 Linux 系统吗?
描述您想要的解决方案 / Describe the solution you'd like
A clear and concise description of what you want to happen.
vs 的工程可以用 linux 的 mono 的 xbuild 后可以在 linux 下运行,但是串口等功能会无法使用。这可能需要用serialport-lib-dotnet 来兼容和转换
描述您考虑过的替代方案 / Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
其他备注信息
Add any other context or screenshots about the feature request here.
近期发现了这个软件并尝试使用,感觉很方便
正好经常写串口类的lua程序,就希望可以先在工具中跑通代码后再移植到开发板中
少量的代码测试没什么问题,但是如果代码长度过长,if开头,对应的结尾不好寻找
希望可以有个折叠,还有线条做个指示,这样就很方便了
最后祝程序越来越完善,感谢免费分享
描述一下这个bug / Describe the bug
调整软件界面大小以及在显示区域的位置后,关闭软件再次开启时,会先在默认位置以默认大小的方式显示出来,再闪现到自定义大小及自定义位置。
复现步骤 / To Reproduce
关闭软件重新打开,百分百复现
预期的行为 / Expected behavior
重新打开软件不会先在默认位置以默认大小显示,直接按照用户上次关闭软件前的位置和大小显示
截图 / Screenshots
日志 / Logs
无
系统信息 / Desktop (please complete the following information):
您的功能请求是否与解决某些问题有关?请描述一下。/ Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
是的,经常需要使用不同的指令流,所以需要记录成快捷列表,但是“1-6”的名字不方便协作沟通和使用。
描述您想要的解决方案 / Describe the solution you'd like
A clear and concise description of what you want to happen.
导出导入快捷列表页面包含列表名称,并且可以自定义修改
描述您考虑过的替代方案 / Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
添加一个类似于右键自定义修改名称的功能,保存在llcom配置文件里
其他备注信息
Add any other context or screenshots about the feature request here.
暂无
描述一下这个bug / Describe the bug
win7 64bit系统上能打开串口,无法收发数据。
复现步骤 / To Reproduce
按照下面的步骤,可以复现bug / Steps to reproduce the behavior:
预期的行为 / Expected behavior
收发数据正常
截图 / Screenshots
无
系统信息 / Desktop (please complete the following information):
其他备注信息 / Additional context
Add any other context about the problem here.
json = require("JSON")
t = uartData:split(",")
return JSON:encode({
key1 = t[1],
key2 = t[2],
key3 = t[3],
})
应修改为
json = require("JSON")
t = uartData:split(",")
return json:encode({
key1 = t[1],
key2 = t[2],
key3 = t[3],
})
JSON:encode
改为小写json:encode
您的功能请求是否与解决某些问题有关?请描述一下。/ Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
很多时候,并不关心时间戳的问题,而此时输出窗口的时间戳反而显得有些多余
描述您想要的解决方案 / Describe the solution you'd like
A clear and concise description of what you want to happen.
给输出窗口加一个 时间戳的开关
描述您考虑过的替代方案 / Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
其他备注信息
Add any other context or screenshots about the feature request here.
您的功能请求是否与解决某些问题有关?请描述一下。/ Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
描述您想要的解决方案 / Describe the solution you'd like
A clear and concise description of what you want to happen.
描述您考虑过的替代方案 / Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
其他备注信息
Add any other context or screenshots about the feature request here.
需要自动增加回车换行的功能,能否支持一下
发送和接收字节无法清除,建议加上
比如单击或者双击或者右击对应记录,清除对应的数据
提供一个按id读的接口,方便拓展循环发送功能(类似SSCOM的循环发数据)
是否可以在lua代码区更改串口的设置呢
比如串口收到了某些消息,做好判断,通过某个方法修改串口的波特率,RTS,DTR等信息
调整软件界面大小以及在显示区域的位置后,关闭软件再次开启时,会先在默认位置以默认大小的方式显示出来,再闪现到自定义大小及自定义位置。
按Issue模板来写也只能这样说了,文字实在不好描述,看视频吧,软件窗口会跳
推荐他人使用llcom进行调试
使用外部编辑器luaStudio进行代码的编辑,在llcom运行脚本
每次回到luaStudio编辑器都会提示代码外部更新
如果代码编辑地方不打算做优化的话,是否可以在设置中增加一个选项
类似于ArduinoIde中的使用外部编辑器选项
勾选了这个选项后,在编辑界面代码时只读的,会加载不会再覆盖了
目前在右侧快捷发送区域可以选择hex模式发送,但是在主发送区域没有这个功能,只能发送文本数据,希望可以增加一个选项
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.