From Electron Cloud
Revision as of 06:22, 29 June 2011 by Ecloud (Talk | contribs) (Created page with 'For example for a Nokia N900, create <code>/etc/udev/rules.d/99-nokia-n900.rules</code>: SUBSYSTEM=="net", ACTION=="add", ATTRS{idVendor}=="0421", ATTRS{idProduct}=="01c8", ATT…')

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

For example for a Nokia N900, create /etc/udev/rules.d/99-nokia-n900.rules:

SUBSYSTEM=="net", ACTION=="add", ATTRS{idVendor}=="0421", ATTRS{idProduct}=="01c8", ATTRS{manufacturer}=="Nokia", ATTRS{product}=="N900 (PC-Suite Mode)", NAME="n900", RUN+="/sbin/ifconfig n900 192.168.2.14"

This is much less complex than solutions involving ifplugd/netcfg, results in a unique and recognizable network name, and may even work if you plug in multiple USB devices. (Hopefully those which use static IPs all use unique ones though.)