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

Connection timeout: Connection timed out: select #54

Open
mStirner opened this issue Feb 12, 2022 · 1 comment
Open

Connection timeout: Connection timed out: select #54

mStirner opened this issue Feb 12, 2022 · 1 comment

Comments

@mStirner
Copy link

mStirner commented Feb 12, 2022

Im trying to query my smart meter, with a USB/RS485 adapter. (Datasheet with modbus documentation)

With the "EEM Meter Setting" tool from the Manufacturer everything works fine, but with mbpoll i get always a connection timeout.

 sudo mbpoll -a 1 -b 9600 -t 3:float -r 1 -v  -c 1 /dev/ttyUSB0
debug enabled
Set number of values=1
Set mode to RTU for serial port
Set device=/dev/ttyUSB0
mbpoll 1.4-12 - FieldTalk(tm) Modbus(R) Master Simulator
Copyright © 2015-2019 Pascal JEAN, https://github.com/epsilonrt/mbpoll
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; type 'mbpoll -w' for details.

Opening /dev/ttyUSB0 at 9600 bauds (E, 8, 1)
Set response timeout to 1 sec, 0 us
Protocol configuration: Modbus RTU
Slave configuration...: address = [1]
                        start reference = 1, count = 1
Communication.........: /dev/ttyUSB0,       9600-8E1 
                        t/o 1.00 s, poll rate 1000 ms
Data type.............: 32-bit float (little endian), input register table

-- Polling slave 1... Ctrl-C to stop)
[01][04][00][00][00][02][71][CB]
Waiting for a confirmation...
ERROR Connection timed out: select
Read input register failed: Connection timed out
-- Polling slave 1... Ctrl-C to stop)
[01][04][00][00][00][02][71][CB]
Waiting for a confirmation...
ERROR Connection timed out: select
Read input register failed: Connection timed out
^C--- /dev/ttyUSB0 poll statistics ---
2 frames transmitted, 0 received, 2 errors, 100.0% frame loss

everything was closed.
Have a nice day !

When i compare the data that is send ([01][04][00][00][00][02][71][CB]), it looks exact the same as from the "EEM Meter" tool:
Unbenannt

Why do i cant get the values via mbpoll?

Thanks for any hint/help.


EDIT: I changed the connection settings, the parity was wrong.
Now it "connects" but the returned values are strange:

sudo mbpoll -a 1 -b 9600 -t 3:float -r 1 -v -P none -c 1 /dev/ttyUSB0
debug enabled
Set rtu parity=none
Set number of values=1
Set mode to RTU for serial port
Set device=/dev/ttyUSB0
mbpoll 1.4-12 - FieldTalk(tm) Modbus(R) Master Simulator
Copyright © 2015-2019 Pascal JEAN, https://github.com/epsilonrt/mbpoll
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; type 'mbpoll -w' for details.

Opening /dev/ttyUSB0 at 9600 bauds (N, 8, 1)
Set response timeout to 1 sec, 0 us
Protocol configuration: Modbus RTU
Slave configuration...: address = [1]
                        start reference = 1, count = 1
Communication.........: /dev/ttyUSB0,       9600-8N1 
                        t/o 1.00 s, poll rate 1000 ms
Data type.............: 32-bit float (little endian), input register table

-- Polling slave 1... Ctrl-C to stop)
[01][04][00][00][00][02][71][CB]
Waiting for a confirmation...
<01><04><04><43><6E><EC><F5><03><5A>
[1]: 	-2.37204e+27
-- Polling slave 1... Ctrl-C to stop)
[01][04][00][00][00][02][71][CB]
Waiting for a confirmation...
<01><04><04><43><6E><CE><26><5A><67>
[1]: 	-6.97359e+08
-- Polling slave 1... Ctrl-C to stop)
[01][04][00][00][00][02][71][CB]
Waiting for a confirmation...
<01><04><04><43><6E><CF><77><9A><0B>
[1]: 	-4.14839e+09
^C--- /dev/ttyUSB0 poll statistics ---
3 frames transmitted, 3 received, 0 errors, 0.0% frame loss

everything was closed.
Have a nice day !
@git-developer
Copy link
Contributor

@mStirner Please consider closing this issue since you could solve it on your own. We can continue the discussion even if it is closed.

What is "strange" about the values, what else do you expect? You could try whether setting the -B argument (big endian) helps.

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

2 participants