Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, Im wondering if there is a program to multiplex the output of a serial device.
I have an arduino with a gps plugged in transmitting NMEA data on /dev/ttyUSB0. I can get this information to u-center (Software by the gps chipset manufacturer) or to gpsd and out to other programs.
I'm trying to program my own ncurses app in python and was looking into using python-gps however it doesn't seem to be getting all the data from gpsd or something.
Anyway, I was wondering if there is a program to take the output from /dev/ttyUSB0 and output it through virtual devices so that gpsd, u-center and my own app can get all the gps data through connecting to the virtual devices?
Both u-center and gpsd can be connected but only one can get the data because once it's read from the device its gone.
The device just automatically starts dumping out NMEA strings at 9600 baud so no handshaking needed. Only need to communicate with it if I want to do extra configuration. But only one program at a time would be doing that since it would be user controlled. (at least in u-center and my own software, don't know if gpsd does anything, though there is an option to stop it?)
I would prefer a software solution if possible
yes, I'm using Ubuntu 9.10 x86_64. Will be using Ubuntu UNR when my netbook arrives which is really what I want this running on.
I don't think anything uses stdin. u-center doesn't, and gpsd doesn't seem to (tried it).
I can get the raw gps info from gpsd using gpspipe and open that in python for reading, so I can use that for my own app easily enough. But u-center is a wine app, it needs a link straight to the device from ~/.wine/dosdevices/com1 to /dev/ttyUSB0.
Is there no way I can even write a little app in some language to read from the /dev/device and create 2 to write to? It doesn't seem like it should be that hard. Just reading from one place and writing to two+. How do you open for writing a /dev like file/device/...what is it?
I don't think anything uses stdin. u-center doesn't, and gpsd doesn't seem to (tried it).
I can get the raw gps info from gpsd using gpspipe and open that in python for reading, so I can use that for my own app easily enough. But u-center is a wine app, it needs a link straight to the device from ~/.wine/dosdevices/com1 to /dev/ttyUSB0.
Is there no way I can even write a little app in some language to read from the /dev/device and create 2 to write to? It doesn't seem like it should be that hard. Just reading from one place and writing to two+. How do you open for writing a /dev like file/device/...what is it?
There is a command called 'tee' that you could use? It reads from stdin and outputs to a file and to stdout. The source is available if you wish to modify it?
This looked like a current post on topic to my problem.
I have some simple shell scripts for moving text data from the serial port around if you want them (they may need some tweaking depending on what version of debian you run)?
Back ground
Ebox 2300
Linux Puppy 2.16 frugal
Wine-0.9.28
I have been using the ebox to log temperatures from the serial port with simple scripts.
I thought I'd step it up a notch.
I just tried to operate a K190 temperature sensor / relay control circuit software in wine.
Wine appears to function fine with everything I have given it so far & gives the appearance of working with the K190 software until I connect to the com.
The consistent error I get is
".wine/dosdevices/com1"
I have created the symbolic links a couple of times using (deleting using rox file manager in between creations, some times the link comes up with a hazard triangle !)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.