找回密码
 注册
查看: 5480|回复: 8

Running software on Linux?

[复制链接]

0

主题

2

回帖

24

积分

Member

积分
24
发表于: 18-03-2021 21:26:59
| 显示全部楼层 |阅读模式
Edited by xchoo at 18-03-2021 21:29

Hi there!
I've been testing my CT-3 on windows and it's been working great so far. My primary goal is to use it to automatically log power data for USB devices connected to my machine. I would like to also get it running in a Linux operating system, but the typical approaches of using `wine` or `mono` do not appear to be working. Does anyone have any suggestions as to what I might try?

I took a peek at the csharp library, and it seems like communication is done over the serial port, but the communication protocol is quite complex. Is there a way to get the communication protocol schema so that I can reimplement it in Python or something?

Thanks!
回复

使用道具 举报

1

主题

45

回帖

207

积分

Moderator

积分
207
发表于: 24-03-2021 21:39:08
| 显示全部楼层
Hi, sorry for the delay.

Unfortunately, we don't provide the protocol schema (decent amount of work to write the documentation).

I don't know the condition of wine or mono. But I guess there is a problem of detecting the device since the software use some windows APIs to detect the correct device (won't show any serial port blindly regardless of what kind of device it is).

So it's a very unfortunate stuck situation.
回复

使用道具 举报

0

主题

2

回帖

24

积分

Member

积分
24
 楼主| 发表于: 10-04-2021 18:42:58
| 显示全部楼层
Hi! I managed to get it to run in Linux.

A note for the devs: I had to modify the ShizukuProtocol.dll code to fix an issue with the wrong value being set for `this.targetPort.BaudRate` (in the `_ShizukuProtocol` function). The original value was 11520000, and I corrected this to 115200. After doing this, everything worked without error on Linux. Before, it was giving an error about having an invalid speed.

For anyone else who works with Linux and is curious as to how to set this up:
1. Install WINE and winetricks: `apt install wine winetricks`
2. Configure your wine to be 32 bit: `WINEARCH=win32 winecfg`
3. Install dotnet45 in your wine environment: `winetricks dotnet45`
4. Add your user account to the `dialout` group: `usermod -aG dialout <username>`
5. Log out and log back into your account.
6. Add a serial port configuration for your wine environment: `wine regedit`
6a. Then go to: HKEY_LOCAL_MACHINE > Software > Wine > Ports , and add a string entry with the name "COM1" and the value "/dev/ttyACM0" (or whatever device the CT-3 gets mounted to)
7. Run your program with `wine <program_exe>`.

Note: The Shizuku app does start, but does not detect the serial port. You must write your own app using the ShizukuProtocol.dll extension.
回复

使用道具 举报

0

主题

2

回帖

24

积分

Member

积分
24
 楼主| 发表于: 10-04-2021 18:45:48
| 显示全部楼层
Edited by xchoo at 11-04-2021 09:19

<deleted -- double post>
回复

使用道具 举报

0

主题

4

回帖

24

积分

Member

积分
24
发表于: 03-05-2021 04:17:22
| 显示全部楼层
Nice!
I did not yet get my CT-3 to measure power consumption of my Thinkpad and my mobiles so have not looked deeper into host mode with Linux, but I plan to try out https://github.com/wellsaid/Py-AVHzY-CT-2 .
回复

使用道具 举报

0

主题

4

回帖

46

积分

Member

积分
46
发表于: 06-05-2021 10:52:26
| 显示全部楼层
roger2k 03-05-2021 04:17
Nice!
I did not yet get my CT-3 to measure power consumption of my Thinkpad and my mobiles so have n ...

will not work
回复

使用道具 举报

0

主题

4

回帖

24

积分

Member

积分
24
发表于: 08-05-2021 16:15:48
| 显示全部楼层

Can you share details?
回复

使用道具 举报

0

主题

4

回帖

46

积分

Member

积分
46
发表于: 09-05-2021 11:58:05
| 显示全部楼层
roger2k 08-05-2021 16:15
Can you share details?

CT-3 does not react to this program in any way (apparently it has other commands)
回复

使用道具 举报

1

主题

6

回帖

47

积分

Member

积分
47
发表于: 08-06-2021 17:58:41
| 显示全部楼层
Edited by mrspirytus at 12-06-2021 13:16

It would be great to even log data to csv file

EDIT: I see that the GUI app on windows can do this. Good. I still would like to have a command-line app at least on Linux.
Did the don't library work with Dotnet core 5? or is it older Dotnet framework Windows only?

回复

使用道具 举报

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

本版积分规则

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

GMT-8, 24-04-2024 19:41 , Processed in 0.100117 sec., 16 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

Release 20231001, © 2001-2024, Tencent Cloud.

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

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