[TAG] USB test module

Jimmy O'Regan joregan at gmail.com
Wed Jan 14 22:40:12 MSK 2009


2009/1/14 Ben Okopnik <ben at linuxgazette.net>:
> On Wed, Jan 14, 2009 at 12:03:54PM +0000, Jimmy O'Regan wrote:
>> 2009/1/14 Ben Okopnik <ben at linuxgazette.net>:
>> >
>> > Eeep. I was hoping it wasn't that complicated - some equivalent of
>> > 'netcat' or whatever... maybe I do need to wait.
>>
>> socat ('netcat++' - http://www.dest-unreach.org/socat/) can redirect
>> serial ports, but nothing about USB there.
>
> ----------------------------------------------------------------------
> root at Tyr:~# mknod -m 0664 /dev/ttyUSB9 c 188 9
> root at Tyr:~# ls -l /dev/ttyUSB9
> crw-rw-r-- 1 root root 188, 9 2009-01-14 11:37 /dev/ttyUSB9
> root at Tyr:~# echo Hello|socat - /dev/ttyUSB9
> 2009/01/14 11:37:47 socat[23056] E open("/dev/ttyUSB9", 02002, 0666): No such device or address
> ----------------------------------------------------------------------
>
> Oh well - it was definitely worth trying! Certainly sounded like a good
> possibility...
>
>> Well, qemu has some virtual usb devices: it can emulate a USB storage
>> device using a directory, or a USB mouse or tablet using X's. It tends
>> to attract a lot of experimental patches, so perhaps there's a virtual
>> serial device floating on the net somewhere.
>
> I guess my first hopes for this didn't pan out; this seems to be a
> Non-Trivial Task. I was hoping that there was something like "socat"
> (thanks, Jimmy!) for it, but - doesn't seem like it.
>
> Maybe I should just grit my teeth and wait till the end of the week. :)

FWIW, the USB Serial virtual device was integrated into qemu: perhaps
you could use it with qemu's userspace emulation?




More information about the TAG mailing list