Re: device removal signals does not work for me



On Tue, 2011-11-15 at 13:45 +0100, Thomas Bechtold wrote:
> Hi,
> 
> i wrote a small program to test the NMClient signals (see attachment).
> When i have a usb-ethernet adapter attached, start the program and 
> remove the device, there is no "device-removed" signal sent.

Any chance you can run NM with --log-level=debug and see what (if any)
additional messages are printed out to make sure NM is doing the right
thing?  You can also run:

dbus-monitor "type='signal',sender='org.freedesktop.NetworkManager',interface='org.freedesktop.NetworkManager'"

and watch for the DeviceRemoved signal, which can help us isolate
whether the problem is with NM or libnm-glib/NMClient.

Dan

> When i replug the adapter, and then remove the adapter again, the signal 
> is sent.
> 
> Why is there no signal after the first removal? Maybe i miss something 
> in the code?
> 
> Here is the output of the program (with some kernel debug messages in 
> between):
> 
> # ./nm-test
> start test...
> start mainloop ...
> usb 1-2: USB disconnect, address 9
> MOSCHIP usb-ethernet driver 1-2:1.0: eth0: unregister 'MOSCHIP 
> usb-ethernet driver' usb-at91-2, MOSCHIP 7830/7730 usb-NET adapter
> client state changed to: 4
> active connections changed
> usb 1-2: new full speed USB device using at91_ohci and address 11
> usb 1-2: New USB device found, idVendor=9710, idProduct=7830
> usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> usb 1-2: Product: USB-MAC Controller
> usb 1-2: Manufacturer: Moschip Semiconductor
> usb 1-2: SerialNumber: 3b000e66
> usb 1-2: applying rev.C fixup
> usb 1-2: applying rev.C fixup
> MOSCHIP usb-ethernet driver 1-2:1.0: eth0: register 'MOSCHIP 
> usb-ethernet driver' at usb-at91-2, MOSCHIP 7830/7730 usb-NET adapter, 
> 00:13:3b:00:0e:66
> device added: 
> '/sys/devices/platform/at91_ohci/usb1/1-2/1-2:1.0/net/eth0' (eth0)
> active connections changed
> client state changed to: 2
> usb 1-2: USB disconnect, address 11
> MOSCHIP usb-ethernet driver 1-2:1.0: eth0: unregister 'MOSCHIP 
> usb-ethernet driver' usb-at91-2, MOSCHIP 7830/7730 usb-NET adapter
> device removed: 
> '/sys/devices/platform/at91_ohci/usb1/1-2/1-2:1.0/net/eth0' (eth0)
> client state changed to: 4
> active connections changed
> 
> 
> 
> 
> 
> 
> Cheers,
> 
> Tom
> 
> 
> _______________________________________________
> networkmanager-list mailing list
> networkmanager-list gnome org
> http://mail.gnome.org/mailman/listinfo/networkmanager-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]