felHR85 / UsbSerial

Usb serial controller for Android
MIT License
1.78k stars 582 forks source link

modbus协议,可以发送,无法收到返回值 #283

Open 569405329 opened 4 years ago

569405329 commented 4 years ago

我们项目用的是串口通讯,但是高版本的安卓系统因权限问题不能很好的支持,准备使用这个开源项目,但是连接设备测试发送的时候,发现可以发送,但是无返回结果。转换用的CH340,求大神指点。

569405329 commented 4 years ago

已解决,感谢大神分享

tenutos commented 4 years ago

已解决,感谢大神分享 大哥,请问下是怎么解决的?

569405329 commented 4 years ago

demo发送的是ASCII码byte数组,Modbus应该发送16进制byte数组,转换一下类型就可以了

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: tenuto <notifications@github.com> 发送时间: 2019年9月28日 22:11 收件人: felHR85/UsbSerial <UsbSerial@noreply.github.com> 抄送: 569405329 <569405329@qq.com>, Author <author@noreply.github.com> 主题: 回复:[felHR85/UsbSerial] modbus协议,可以发送,无法收到返回值 (#283)

已解决,感谢大神分享 大哥,请问下是怎么解决的?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

569405329 commented 4 years ago

好的,微信569405329,互相交流一下

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: tenuto <notifications@github.com> 发送时间: 2019年9月28日 22:21 收件人: felHR85/UsbSerial <UsbSerial@noreply.github.com> 抄送: 569405329 <569405329@qq.com>, Author <author@noreply.github.com> 主题: 回复:[felHR85/UsbSerial] modbus协议,可以发送,无法收到返回值 (#283)

demo发送的是ASCII码byte数组,Modbus应该发送16进制byte数组,转换一下类型就可以了 发自我的iPhone … ------------------ 原始邮件 ------------------ 发件人: tenuto <notifications@github.com> 发送时间: 2019年9月28日 22:11 收件人: felHR85/UsbSerial <UsbSerial@noreply.github.com> 抄送: 569405329 <569405329@qq.com>, Author <author@noreply.github.com> 主题: 回复:[felHR85/UsbSerial] modbus协议,可以发送,无法收到返回值 (#283) 已解决,感谢大神分享 大哥,请问下是怎么解决的? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

哇塞,兄弟竟然在线,加个wechat:tenuto

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

tenutos commented 4 years ago

哇塞,竟然在线,加个微信?

------------------ 原始邮件 ------------------ 发件人: "569405329"notifications@github.com; 发送时间: 2019年9月28日(星期六) 晚上10:16 收件人: "felHR85/UsbSerial"UsbSerial@noreply.github.com; 抄送: "白沙"ba_sa@foxmail.com; "Comment"comment@noreply.github.com; 主题: Re: [felHR85/UsbSerial] modbus协议,可以发送,无法收到返回值 (#283)

demo发送的是ASCII码byte数组,Modbus应该发送16进制byte数组,转换一下类型就可以了

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: tenuto <notifications@github.com> 发送时间: 2019年9月28日 22:11 收件人: felHR85/UsbSerial <UsbSerial@noreply.github.com> 抄送: 569405329 <569405329@qq.com>, Author <author@noreply.github.com> 主题: 回复:[felHR85/UsbSerial] modbus协议,可以发送,无法收到返回值 (#283)

已解决,感谢大神分享 大哥,请问下是怎么解决的?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.