找回密码
 注册
查看: 4166|回复: 2

CT-3 - Serial or TCP interface

[复制链接]

1

主题

1

回帖

9

积分

Newbie

积分
9
发表于: 16-10-2020 05:52:48
| 显示全部楼层 |阅读模式
I bought the CT-3 to use for functional testing of USB devices in a production line environment. I need to be able to read the instantaneous voltage and current from the device into another app with minimal input from the user.

I read somewhere that the CT-2 has a COM port interface where you can send "Get Meter Data" and receive the data back in binary format. This would have been perfect for my situation. Unfortunately, the CT-3 does not seem to have this capability, since I don't get any response on the COM port.

I have been able to use the Lua tcp (which seems customized and is undocumented except for in the sample Lua script) to send information over TCP, but unfortunately it seems the only way to initialize the TCP socket is by using the Shizuku System Box app and starting the Lua TCP port by clicking the Play button. I need to know how to create the TCP port automatically without using the app.

Similarly, I have been able to use the Lua print() function to print to the Terminal within the app, but I can't figure out how to get that data out to another app.

Please provide some more documentation on automation using either the serial interface or TCP.
回复

使用道具 举报

1

主题

45

回帖

207

积分

Moderator

积分
207
发表于: 16-10-2020 06:14:05
| 显示全部楼层
First about lua TCP: It won't work with print() function, sending data over TCP requires another sets of API which is not documented in English so far. However, you can easily understand functions just by a glance of their prototype, Chinese doc version: https://yk-lab.org:666/shizuku/lua-api/lua-api-zh-cn/Modules/tcp.html

Also, sending data over VCP of USB, forwarding by Shizuku System Box to TCP is so complicated, I'd recommend you to try C# API to communicate with the meter directly. However this part is also not well documented yet. You can have a look in the attachment, it should be able to get you started with comments.

These documentations will be completed (maybe slowly).

Shizuku Lib Example.zip

1.24 MB, 下载次数: 708

回复

使用道具 举报

1

主题

1

回帖

9

积分

Newbie

积分
9
 楼主| 发表于: 16-10-2020 12:12:18
| 显示全部楼层
Thank you! The C# library is exactly what I needed, since my application is in C#. I ended up using the ShizukuProtocol.CallerDescriptor.Callback_t to get the data I needed.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archive|手机版|小黑屋|AVHzY Forum

GMT-8, 18-04-2024 17:38 , Processed in 0.099246 sec., 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

Release 20231001, © 2001-2024, Tencent Cloud.

MultiLingual version, Rev. 4300, © 2009-2024 codersclub.org

快速回复 返回顶部 返回列表