gianfrdp/SDM120C

ERROR (110) Connection timed out

Closed this issue · 1 comments

hello i'm a newbee and have a problem with the usb-serial connection with the SDM220.

i use a usb serial adapter (black stick with 2 connections for the modbus)

my loggings are:
pi@raspberrypi:~/SDM120C $ sudo sdm120c -a 1 -b9600 -PN -d1 -j500 -w30 /dev/ttyUSB0
20200525-23:47:32.569877: sdm120c(3746) debug_flag = 1
20200525-23:47:32.569970: sdm120c(3746) optind = 7, argc = 9, c = j, optarg = 500
20200525-23:47:32.570010: sdm120c(3746) resp_timeout = 500, count_param = 0
20200525-23:47:32.570050: sdm120c(3746) optind = 8, argc = 9, c = w, optarg = 30
20200525-23:47:32.570091: sdm120c(3746) yLockWait = 30, count_param = 0
20200525-23:47:32.570130: sdm120c(3746) cmdline="sdm120c -a 1 -b9600 -PN -d1 -j500 -w30 /dev/ttyUSB0"
20200525-23:47:32.570196: sdm120c(3746) szttyDevice: /dev/ttyUSB0
20200525-23:47:32.570230: sdm120c(3746) devLCKfile: </var/lock/LCK..ttyUSB0>
20200525-23:47:32.570264: sdm120c(3746) devLCKfileNew: </var/lock/LCK..ttyUSB0.3746>
20200525-23:47:32.570296: sdm120c(3746) PID: 3746
20200525-23:47:32.570471: sdm120c(3746) Attempting to get lock on Serial Port /dev/ttyUSB0...
20200525-23:47:32.570534: sdm120c(3746) Acquiring shared lock on /var/lock/LCK..ttyUSB0...
20200525-23:47:32.570585: sdm120c(3746) Shared lock on /var/lock/LCK..ttyUSB0 acquired...
20200525-23:47:32.570684: sdm120c(3746) Checking for lock
20200525-23:47:32.570852: sdm120c(3746) errno=0, bRead=2 PID=3746 LckPID=3746
20200525-23:47:32.570891: sdm120c(3746) Checking process 3746 (sdm120c) for lock
20200525-23:47:32.570967: sdm120c(3746) PID: 3746 COMMAND: "sdm120c" LckPID: 3746 LckCOMMAND: "sdm120c" LckPIDcommand "sdm120c" = me
20200525-23:47:32.571002: sdm120c(3746) Appears we got the lock.
20200525-23:47:32.571035: sdm120c(3746) resp_timeout=50000000us
20200525-23:47:32.571137: sdm120c(3746) Libmodbus context open (9600N2)
20200525-23:47:32.571179: sdm120c(3746) Byte timeout disabled.
20200525-23:47:32.571215: sdm120c(3746) New response timeout: 0s, 50000000us
20200525-23:47:32.575878: sdm120c(3746) 1/1. Register Address 30001 [0000]
20200525-23:47:33.076550: sdm120c(3746) ERROR (110) Connection timed out, 1/1, Address 30001 [0000]
20200525-23:47:33.076810: sdm120c(3746) Response timeout gave up after 500592us
20200525-23:47:33.080419: sdm120c(3746) devLCKfile: </var/lock/LCK..ttyUSB0>
20200525-23:47:33.080612: sdm120c(3746) devLCKfileNew: </var/lock/LCK..ttyUSB0.3746>
20200525-23:47:33.080797: sdm120c(3746) Clearing Serial Port Lock (3746)...
20200525-23:47:33.080994: sdm120c(3746) Acquiring exclusive lock on /var/lock/LCK..ttyUSB0...
20200525-23:47:33.081186: sdm120c(3746) Exclusive lock on /var/lock/LCK..ttyUSB0 acquired (0) Success...
20200525-23:47:33.081410: sdm120c(3746) cmdLen=7
20200525-23:47:33.081595: sdm120c(3746) cmdLen=7 COMMAND is not null
20200525-23:47:33.081708: sdm120c(3746) errno=0, bRead=2 LckPID=3746 PID=3746 COMMAND='sdm120c'
20200525-23:47:33.081812: sdm120c(3746) errno=0, bRead=-1 LckPID=3746 PID=0 COMMAND=''
20200525-23:47:33.081965: sdm120c(3746) Clearing Serial Port Lock done
NOK
20200525-23:47:33.082140: sdm120c(3746) NOK

can anyone give some help or tips please.

Problem solved! I don't know the answer but it's just start working.