Autoconfigure ue0 on device connection

Hi guys,

Finally I had a day free to do some first tests with my new BeagleBone(s) Green.
I did not change the OS on the BBG for now. I want to make some tests with
Grove stuff on Linux first.

When I first connect the BBG to FreeBSD-11.1 via usb, FreeBSD correctly
shows me in dmesg
Code:
urndis0 on uhub1
urndis0: <RNDIS Communications Control> on usbus1
ue0: <USB Ethernet> on urndis0
ue0: Ethernet address: c8:fd:19:c7:f1:07

Good, I can configure "ue0" via ifconfig and then ssh to the BBG.
Very smooth. It just works.

What I would like to do now is: each time I connect a device with ethernet
address, say "c8:fd:19:c7:f1:07", I wish I could automatically run the ifconfig stuff,
and then run some other scripts.

I have no idea where to look for to achieve this, can you give me some directions ?

bye
Nicola
 
What I would like to do now is: each time I connect a device with ethernet
address, say "c8:fd:19:c7:f1:07", I wish I could automatically run the ifconfig stuff,
and then run some other scripts.
Possible, but you'll have to create some devd.conf(5) rules for it.

It might be easier to simply use this in /etc.conf:
Code:
ifconfig_DEFAULT="DHCP"
The _DEFAULT will configure the first ethernet interface that's found during boot. But doesn't work if you plugin the device after the BB has booted.
 
The devd.conf seems to fit perfectly my needs at first sight !
I will study that man page tomorrow.

The ifconfig_DEFAULT is not ideal for my situation, I have a few BeagleBone(s)
and I need to plug them in and out without rebooting my main FreeBSD system.

Thank you again SirDice !
Bye
 
The devd.conf seems to fit perfectly my needs at first sight !
I will study that man page tomorrow.

The ifconfig_DEFAULT is not ideal for my situation, I have a few BeagleBone(s)
and I need to plug them in and out without rebooting my main FreeBSD system.

Thank you again SirDice !
Bye

The actual way to set USB tethering is:
ifconfig_ue0="SYNCDHCP
This will assign an IP address at boot time. But I suggest you to statically assign IPs. Life is easier that way.
 
The actual way to set USB tethering is:
ifconfig_ue0="SYNCDHCP
This will assign an IP address at boot time. But I suggest you to statically assign IPs. Life is easier that way.

Umm, I solved the problem last summer. I ensure you devd is enough, it works well.

Your configuration is interesting though, I see what it does here, but it supposes I want to install a DHCP server on the BBB, which, in general, it is not true.

bye
n.
 
Back
Top