Avatar of schmiggles
schmigglesFlag for United States of America

asked on 

Are there any applications that run on Linux (prefer Ubuntu if possible) to act as a data collector for serial to Ethernet?

We have several machines in our production area with serial interfaces that are connected to Lantronix WiBox RS232 to TCP/IP converters.  The WiBox can be configured as a server to send any output to an IP address and port.  Currently we are using Aggsoft's Advanced TCP/IP Data Logger so the output is dumped to a text file. (see http://www.aggsoft.com/tcpip-data-logger.htm)

Is there a way to do with this a Linux distro?  Are there any Linux applications that can listen on a port and output the data to a plain text file?

Thanks!  
Linux DistributionsLinux Networking

Avatar of undefined
Last Comment
wilhelm_voigt
Avatar of wilhelm_voigt
wilhelm_voigt
Flag of Austria image

Try netcat ("nc", http://netcat.sourceforge.net).

It can listen on any port (e. g. 12345) by calling it as

nc -p 12345 -l

If you simply redirect it's output to a file ("nc -p 12345 -l > output.txt"), you'll have a dump of the contents it read (try connecting to the running instance, e. g. from the same host, by "nc localhost 12345" and type some text, end with Ctrl-C).
Avatar of schmiggles
schmiggles
Flag of United States of America image

ASKER

Can netcat create a new text file for each day with the filename based on the date?  Can it listen on multiple ports so each device has a separate text file in a separate folder?  Should have added that to my question.  Sorry for not giving a better description!

Thanks!
Avatar of wilhelm_voigt
wilhelm_voigt
Flag of Austria image

Netcat itself can't do that, it just provides TCP/UDP connectivity. If you want to use it for the mentioned purpose, you will need some scripts to wrap around netcat. I'll think up some small demo script.
ASKER CERTIFIED SOLUTION
Avatar of wilhelm_voigt
wilhelm_voigt
Flag of Austria image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Linux Distributions
Linux Distributions

A Linux distribution is an operating system made as a software collection based on the Linux kernel and, often, on a package management system and are available for a variety of systems. A typical Linux distribution comprises a Linux kernel, GNU tools and libraries, additional software, documentation, a window system (the most common being the X Window System), a window manager, and a desktop environment. Most Linux systems are open-source software made available both as compiled binaries and in source code form, allowing modifications to the original software. Over three hundred distributions are in active development, including commercially backed distributions (such as Fedora, openSUSE and Ubuntu) and community-driven distributions (such as Debian, Slackware, Gentoo and Arch Linux).

29K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo