Results 1 to 4 of 4
How do I get a serial device to simply send me the
data without mucking it about.
I mean, if I write a c prog in DOS or a C ...
- 11-29-2010 #1Just Joined!
- Join Date
- Nov 2010
- Posts
- 5
Serial comms with no terminal nonsence, really raw
How do I get a serial device to simply send me the
data without mucking it about.
I mean, if I write a c prog in DOS or a C prog on an embedded system,
I get the bytes that ar sent down the line.
With linux I seem to get extra characters in it (0x1A crops up alot)
and its very frustrating.
I am using a virtual machine with WinXP in it, merely
to monitor a 38400 baud 1 stop bit 8 data bits serial line.
The linux terminall /dev/ttyUSB0, throws data at me nicely
but about 10% of it is gonk.
Please I want some magic command
like
stty -F /dev/ttyUSB0 38400 -totallyraw
- 11-30-2010 #2Just Joined!
- Join Date
- Jul 2008
- Posts
- 81
Have you tried "stty raw"? No - sign because "stty -raw" means _NOT_ raw.
- 11-30-2010 #3Just Joined!
- Join Date
- Nov 2010
- Posts
- 5
yep I know that one.
Its almost like the data is sometimes shifted one bit or something.
I connect to the XP virtual machine, and look at the data and recognise
sequences. On Linux I just don't.
How do I get 8 bits data, 1 stop bit NO TERMINAL NONSENCE out of linux serial ?
- 11-30-2010 #4Linux Engineer
- Join Date
- Feb 2005
- Posts
- 1,044
You have to go through the stty man page and disable all the nice stuff the tty handler does to make your life easier ... echoe, onlcr, icrnl, clocal, ignbrk, crterase, work through and see what works. I'm not surprised XP is easy since it does very little for you generally, so there's not much to stop it doing.


Reply With Quote