RASPBERRY PI INSTALL SOCAT SERIAL
To configure both virtual serial ports upon boot, I utilize two systemd configuration files, named rvice and rvice in the folder /etc/systemd/system. If you need RFC 2217, I’ve seen multiple recommendations for ser2net, but I’ve never tried it.
The remote host is statically configured, and both flow control and modem line signalling are not required. to manage modem line signalling such as carrier detect (CD).the ability to configure the remote host (baud rate, etc).From what I can tell, the benefits of RFC 2217 are: For the PremierWave XN, TCP port 10001 is used for physical “Port 1” and TCP port 10002 is used for physical “Port 2”.Ī quick note about RFC 2217: This setup does not support it, but I don’t need it. tcp:x.x.x.x:y defines the address and TCP port of the target device.I have used raw with success, but raw is obsolete in favor of rawer. rawer sets “ rawer than raw mode”, passing I/O “almost unprocessed”.Still having some issues with actually making dialout work with the tools I’m using. perm – for now, I’m sticking with 0666 to give read/write to all groups.I’ve chosen “ dialout” to be consistent with other serial ports on the system. group defines the permissions of the device.I’ve chosen the names “ ttyV0“, “ ttyV1“, etc., (where “V” suggests “virtual”) though I suppose this is a matter of personal preference. link generates a symbolic link that points to the actual pseudo terminal ( pty).Fortunately, after researching several options, I’ve found that socat does exactly what I need, and is fairly ubiquitous in the Linux world.Ī virtual serial port is created using the following syntax: socat pty,link=/dev/ttyV0,group=dialout,perm=0666,rawer tcp:x.x.x.x:y
RASPBERRY PI INSTALL SOCAT SOFTWARE
Both are monitored by software on a BeagleBone Black board that runs Debian Linux.įrom what I can tell, Lantronix does not have a Linux tool that is similar to Com Port Redirector available. The Chemtrol unit can also be monitored remotely via its built-in RS-485 port. The second serial port of the DL06 PLC is used for monitoring via Modbus. But in the future, I may very well want to debug/monitor this same PLC remotely (via a VPN). At the moment, I am programming via a Laptop (connected via WiFi) only a dozen feet away. This works quite well, and has proven reliable.
To program the DirectLogic DL06 PLC, I utilize the Lantronix Com Port Redirector software, which creates virtual COM ports on a Windows-based client. Still, it’s definitely in the hopper for future projects. While I’m very impressed by the efforts of its developer, I found that it had some shortcomings for my application (in particular, the hard-coded baud/parity configurations). I should mention that when I started on this project, I intended to utilize esp-link for both serial devices. I need to connect a DirectLogic DL06 PLC via RS-232, a pool chemical controller ( Chemtrol PC-2100) via RS-485 and a BeagleBone Black to WiFi. Pool Systems AutomationĬurrently I’m working on a Pool Systems Automation project, which happens to fall under both the personal and volunteer categories. Plus, it can be found for “cheap” on surplus, which is a huge bonus for personal/volunteer projects.
Its feature set, capabilities and user interface are miles ahead of what I experienced on the W2250 or LES401A. While technically it, too, is EOL, it still has fairly recent firmware releases. I’ve also used a Black Box LES401A with success (I think it’s actually an older re-labeled B&B Electronics unit), but it’s bulky, has just one port, and is Ethernet-only.Įnter the Lantronix PremierWave XN. The MOXA W2250 Ethernet/WiFi devices I still rely upon daily to run HVAC, lighting and energy management in my home “mostly just work” – but are somewhat quirky, and lack great user interfaces (to be fair, these particular units are EOL). I’ve used several solutions in the past, with mixed success. Given that I also live in the modern world, I have a real need to connect to these devices remotely (over the Internet) or to distributed machines (such as VMs) with the need for excess cabling (i.e. I use a lot of devices that (still) communicate solely via the lowly serial port, whether that be via RS-232C or RS-485.