Connection timeout: `Connection timed out: select`
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:
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 !
@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.