help with serial i/o from a device?

Oliver Grawert ogra at ubuntu.com
Thu Sep 6 07:53:24 UTC 2018


hi
Am Mittwoch, den 05.09.2018, 23:30 -0400 schrieb Robert Heller:
...
> cat /dev/ttyUSB0 > outfile.bin
...

beyond roberts exccellent explanation, you can also use dd for byte
streams, that gives you a bit more control than cat (allowing to set
blocksize, legth or offset of what you want to capture)

sudo dd if=/dev/ttyUSB0 of=outfile.bin

(there you can for example use bs=1MB count=1 to capture exactly 1MB of
data ... or skip=1kB to cut off the first kilobyte (i.e. a header, in
case you only want the payload data) of the stream)

"man dd" has all the dirty details :)

ciao
	oli
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20180906/f3ec7f0a/attachment.sig>


More information about the ubuntu-users mailing list