WebThings on bhyve and USB

Grzegorz Junka list1 at gjunka.com
Wed Jun 12 21:37:36 UTC 2019


How to best approach Mozilla IoT Gateway? I have a FreeBSD home server 
and was thinking about running the gateway on it instead of a dedicated 
Raspberry Pi. Mozilla does provide instructions how to compile:

https://github.com/mozilla-iot/gateway

I could try to adapt to compile on FreeBSD natively, but this already 
sounds like a lot of work before even considering the main issue, which 
is the availability of FreeBSD drivers for supported IoT adapters:

https://github.com/mozilla-iot/wiki/wiki/Supported-Hardware

So, my first question is, if those devices should or would in any way be 
supported by FreeBSD kernel?


Then, if not natively on FreeBSD, how about running the docker image on 
Linux running on bhyve?

https://hub.docker.com/r/mozillaiot/gateway

I would need to somehow pass the USB ports to bhyve, so that Linux can 
pass them to the docker container. I heard it's not possible to pass 
specific USB ports but instead the whole PCI has to be passed and it 
seems to be as complex as it sounds:

https://forums.freebsd.org/threads/bhyve-and-usb-passthru.67273/
https://github.com/pr1ntf/iohyve/wiki/USB-3.0-PCI-Controller-Pass-through

So, my second question is if that approach to passing USB to bhyve is 
still the most recommended?

GrzegorzJ



More information about the freebsd-virtualization mailing list