Tuesday, November 22, 2005

Debian, /etc/network interfaces and hotplug

Getting the A768i to work as a USB net device on 2.6.12 turned out to be pretty straightforward, once I worked out how. The trick is that to get hotplug to play nice with interfaces you must either tell hotplug to attempt to control all interfaces (there's a configuration option somewhere that escapes my recollection at this moment) or add an explicit mapping in /etc/network/interfaces. To do so:

iface usb0 inet static
address 192.168.1.2
netmask 255.255.255.0


is straightforward: it provides the configuration for the host end of the interface (the phone is 192.168.1.1) and

mapping hotplug
script grep
map usb0


is the magic glue to provide the "bring this up automatically when plugged in" behaviour.