Solved devd on interface ue0

Hi guys,

In need your help, i can't understand what I am doing wrong.

The problem is, when i connect an external embedded device to my laptop FreeBSD-11.1
the interface "ue0" appers in my dmesg. I can configure it well manually, but would like
to automatize the process with devd.

I added the following to /etc/devd.conf, service devd restart , then rebooted my
embedded machine.
Code:
attach 100 {
        device-name "ue0";
        action "ifconfig ue0 inet 192.168.7.1 netmask 255.255.255.0";
};

I tried many times, to change many things, but i can't get it, the ifconfig
line is not executed.
Do you see what i am doing wrong ?

What I see in my laptop "dmesg" is:
Code:
ugen1.2: <The FreeBSD Project httpswww.FreeBSD.org USB Ethernet Adapter> at usbus1
cdce0 on uhub1
cdce0: <USB Ethernet Comm Interface> on usbus1
ue0: <USB Ethernet> on cdce0
ue0: Ethernet address: 2a:02:03:04:05:06

bye
n.
 
I believe you should use the full path: /sbin/ifconfig.

Hello aragats, i tried but i get no sign of life. I tried also this:
Code:
attach 100 {
    device-name "ue0";
    # action "/sbin/ifconfig ue0 inet 192.168.7.1 netmask 255.255.255.0";
    action "logger Hello ue0";
};

But the string "Hello ue0" does not appear in /var/log/messages .

I did not put "/sbin/" because in other examples I see in /etc/devd.conf there isn't.
 
News, I tell you where I arrived.
-] i can detecte cdce0
-] still i can not detect ue0
*] i would prefer to detect "ue0" because i want to run ifconfig over it.

The point i was mistaking before is that the driver is cdce, not ue.

Code:
# ---- does not work (this is wrong) ----
attach 100 {
    device-name "ue0";
    # action "/sbin/ifconfig ue0 inet 192.168.7.1 netmask 255.255.255.0";
    action "logger ====== Hello ue0";
};

# ---- works ! 
attach 101 {
    device-name "cdce0";
    action "logger ====== Hello cdce0";
};

# ---- does not work 
notify 102 {
    match "system"        "IFNET";
    match "subsystem"       "ue0";
    # match "type"        "ATTACH";
    match "type"        "LINK_UP";    
    action "logger ---- Hello IFNET ue0";
};
 
Code:
Go into /etc/syslog.conf and turn on devd logging.
Uncomment Line 32 and 33
I saw it yesterday, already done;)
Well? What is in your logs? You sure your rule is correct? Try adding action "logger devd: ue0 rule invoked" and check if it will appear in your logs.

Edit: And which of the above messages are in your logs?
 
Well? What is in your logs? You sure your rule is correct? Try adding action "logger devd: ue0 rule invoked" and check if it will appear in your logs.

Edit: And which of the above messages are in your logs?

This is what i see in /var/log/messages

Code:
Aug 26 14:26:02 fbs kernel: ugen1.2: <The FreeBSD Project httpswww.FreeBSD.org USB Ethernet Adapter> at usbus1
Aug 26 14:26:02 fbs kernel: cdce0 on uhub0
Aug 26 14:26:02 fbs kernel: cdce0: <USB Ethernet Comm Interface> on usbus1
Aug 26 14:26:02 fbs kernel: ue0: <USB Ethernet> on cdce0
Aug 26 14:26:02 fbs kernel: ue0: Ethernet address: 2a:02:03:04:05:06
Aug 26 14:26:03 fbs p: ====== Hello cdce0
 
Solved, what works is this

Code:
notify 101 {
    match "system"        "IFNET";
    match "subsystem"       "ue0";
    match "type"          "ATTACH";
    action "logger ====== Hello IFNET ue0";
    action "ifconfig ue0 192.168.7.1 netmask 255.255.255.0";
};
 
Back
Top