[prev in list] [next in list] [prev in thread] [next in thread] 

List:       netbsd-port-xen
Subject:    Re: USB device in domU?
From:       Emmanuel Dreyfus <manu () netbsd ! org>
Date:       2020-02-21 15:14:23
Message-ID: 20200221151423.GA25257 () homeworld ! netbsd ! org
[Download RAW message or body]

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
manu@netbsd.org
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic