Proper socat and DigiTemp usage

75 views
Skip to first unread message

Jason Berry

unread,
Oct 3, 2017, 3:20:11 PM10/3/17
to DigiTemp
I've tested multiple command combinations in Debian 8 and 9 using various versions of socat and DigiTemp, but I'm stumped.

I use the following command to create a virtual COM port with a Digi PortServer TS MEI connected to a DS9097U.
# socat -d pty,link=/dev/virtualcom0,raw tcp:172.16.16.10:2102&

# ls -l /dev/ | grep virt
lrwxrwxrwx 1 root root     10 Oct  3 17:45 virtualcom0 -> /dev/pts/2


Executing DigiTemp works great for one run:
# digitemp_DS9097U -qa -c /etc/digitemp.conf
Oct 03 17:55:59 Sensor 0 C: 20.19 F: 68.34
Oct 03 17:56:00 Sensor 1 C: 26.75 F: 80.15
Oct 03 17:56:01 Sensor 2 C: 20.12 F: 68.22

But the second run fails:
# digitemp_DS9097U -qa -c /etc/digitemp.conf
Error 5: DS2480B Adapter Not Detected
Error 7: DS2480B: Bad Response
Error 7: DS2480B: Bad Response
Error 7: DS2480B: Bad Response
Error 7: DS2480B: Bad Response
Error 7: DS2480B: Bad Response
Error 7: DS2480B: Bad Response
Error 7: DS2480B: Bad Response
Error 7: DS2480B: Bad Response
Error 7: DS2480B: Bad Response

Socat remains running in the background and DigiTemp doesn't work again until I kill socat and re-execute.

Any ideas?

Jason Berry

unread,
Oct 3, 2017, 5:32:14 PM10/3/17
to DigiTemp
According to this post, I need to enable buffering....which apparently the PortServer TS 8/16 MEI Family of products cannot do :-(

The only way I see this succeeding with this PortServer model is crafting a script to launch socat, run DigiTemp once, then kill socat.
I'm sure there's a way to put it all into one string, but I haven't figured it out.
Reply all
Reply to author
Forward
0 new messages