iSerial emulation

For more advanced meter data users. Learn from others and ask questions about how to read meters, how to use the EKM Push Data, and how to display the meter data in useful ways.
Post Reply
aquarat
Posts: 7
Joined: Mon Sep 24, 2012 5:40 am

iSerial emulation

Post by aquarat »

Hi

If you happen to have an EKM meter attached to a remote Linux machine via a serial port and you'd like to configure the meter using EKM Dash, you can use the following command to share the serial port as if it were attached to an iSerial :

socat TCP-LISTEN:50000,fork /dev/ttyUSB0,raw,b9600,csize=2

b9600 is the baud
csize=2 means 7 data bits (socat refers to them as the character size)
vintozver
Posts: 6
Joined: Tue Oct 23, 2018 3:48 pm

Re: iSerial emulation

Post by vintozver »

Code: Select all

socat TCP-LISTEN:50000,reuseaddr,fork,max-children=1 file:/dev/ttySC0,raw,b9600,csize=2,nonblock,echo=0
* number of threads connecting to the serial must be limited to 1, otherwise simultaneous connections will result in garbage. EKM dash hooked up over the networks, without this option - messes up, and socat reports broken pipe yada yada
* non-block option
* no need to echo
* reuse address
Post Reply