Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On Linux Connection string must be in quotes #1

Open
si2la opened this issue Apr 5, 2024 · 0 comments
Open

On Linux Connection string must be in quotes #1

si2la opened this issue Apr 5, 2024 · 0 comments

Comments

@si2la
Copy link

si2la commented Apr 5, 2024

На самом деле, неплохая программа, спасибо, @lirik90 ! У меня Linux, и если строка подключения из нескольких параметров (скорость, четность и т.д.), то программа выполняется, но создается несколько "бекграунд" заданий с параметрами подключения (в этом виноват символ "&", как показалось):

./modbus_cli -w1,2,1 -t4 -a1 -s11  rtu:///dev/ttyACM0?baudRate=9600&dataBits=8&parity=0&stopBits=2&flowControl=0
[1] 26808
[2] 26809
[3] 26810
[4] 26811
[2]   Done                    dataBits=8
Connecting to modbus device: /dev/ttyACM0 Speed: 9600 Data8 NoParity OneStop NoFlowControl
Write: QVector(1, 2, 1)
11 = 1
12 = 2
13 = 1
Raw response: "000B0003"

[1]   Done                    ./modbus_cli -w1,2,1 -t4 -a1 -s11 rtu:///dev/ttyACM0?baudRate=9600
[3]-  Done                    parity=0
[4]+  Done                    stopBits=2
 

Если строку заключить в кавычки, то все ОК.

./modbus_cli -w1,2,1 -t4 -a1 -s11  "rtu:///dev/ttyACM0?baudRate=9600&dataBits=8&parity=0&stopBits=2&flowControl=0"
Connecting to modbus device: /dev/ttyACM0 Speed: 9600 Data8 NoParity TwoStop NoFlowControl
Write: QVector(1, 2, 1)
11 = 1
12 = 2
13 = 1
Raw response: "000B0003"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant