Belcarra’s new Virtual Driver for Networked USB devices greatly improves the end user experience for interfacing smart devices to the Mac OS/X desktop.
Traditional solutions create a network interface for each attached device requiring the user to find and then configure a network service for the interface with the correct operating parameters (IP address etc.)
Belcarra’s solution features a Virtual Network Interface that is created when the system is started. This interface can be configured to a static IP address or simply default to use the normal DHCP configuration.
The Virtual Network driver contains a bridge that performs two functions. First it connects all compatible devices plugged into the system to the Virtual Network Interface. Second it contains a Virtual DHCP server that can be used to configure both the Host (Mac System) IP address and each of the attached devices.
The Problem
Commonly drivers model a collection of USB network devices as a collection of network interfaces, one per device. This model presents a number of issues:
- The interfaces are transient: they are (indirectly) created by USB cable events. Since the USB cable is not present at install time, the installer cannot create or configure the interface.
- multiple devices create multiple interfaces, typically by serial number. So, for instance, if a user upgrades from one device to another, the upgrade will create a new ethernet interface
- a predictable MAC address is a key tool for a configuration assistant tool to map Network Services to underlying devices. This is impossible if every device creates a new network interface.
Belcarra’s solution is to create a virtual interface which is independent of the USB subsystem, and therefore can be created and set up before any cable events, and also, has a MAC address which is independent of all the various devices.
Instead of creating multiple network interfaces, the driver bridges the various devices to the virtual interface.
If we connect, say 20 devices of the same kind, using a regular ethernet hardware interface for each one, then OS/X will create 20 enX interfaces, and the user will have to set all 20 of them up in the Network pane. Using a virtual network interface, we have a single interface independent of all the devices, and 32 bridge slots, numbered from 0 to 31, using a bit mask. When a device is connected, it is allocated one of those slots, and traffic from that device is bridged to the virtual interface. When the device is disconnected, the pending traffic is purged and the slot is freed. The Network pane sees only 1 network device, which is connected if one or more USB devices are connected, and disconnected otherwise.