usb0 persistent net rules debian wheezy

Hi all,

I’ve a BBB running debian wheezy.

There are entries in /etc/udev/rules.d/70-persistent-net-rules for the wired ethernet (eth0) and my USB wifi adapters but there isn’t one for the usb0 ethernet gadget on the OTG / mini port. I need to add a persistent net rule for this interface because other USB devices I have connected assume usb0 on boot so interfere with the configuration of other stuff - dnsmasq, /etc/network/interfaces etc.

I want the usb OTG port on the BBB to always be usb0 and any additional devices I add to take usb1…N …or any other naming scheme providing the OTG ethernet gadget always has the same name!

I’ve tried to add a persistent rule for the usb OTG ethernet port but can’t get it working. I expect this is because the MAC address of that interface seems to be randomly allocated on boot; every time I boot the MAC is different making it difficult to uniquely identify the usb OTG gadget in the persistent rules file.

Does anyone have any suggestions on how to resolve this? I presume I need to either make the interface MAC consistent across reboots or make a rule that to assign the interface’s name that isn’t dependent on the MAC address but still uniquely IDs it. I’m struggling to find info on both of these options online!

Thanks
Gareth