Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: USB device in domU?

On Fri, Feb 14, 2020 at 09:06:09AM +0000, Emmanuel Dreyfus wrote:
> The device is a USB 3G modem, all I need is access to /dev/ttyU0. 
> hence some king of serial over IP proxy would do the job. I am 
> sure this already exists for other purposes.

Replying to myself again:! I got some success with socat 
(available form pkgsrc):

On the dom0:
/root/.ssh/authorized_keys has a line for the domU's root, with a
command option:
command="/usr/bin/cu -l /dev/ttyU0 -s 115200" ssh-rsa AAAAB3... root@domU

On the domU, I start:
socat -ls PTY,link=/dev/rttyU0,rawer,ignoreof SYSTEM:"ssh dom0",pty,sighup

Then programs on the domU can access the 3G modem through /dev/rttyU0

Emmanuel Dreyfus

Home | Main Index | Thread Index | Old Index