Open smrqdt opened 8 months ago
I can confirm you observation if I plug a USB Ethernet adapter without a connection to a DHCP enabled network.
# dmesg -n7
#
# ci_hdrc ci_hdrc.0: EHCI Host Controller
ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.15
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: EHCI Host Controller
usb usb1: Manufacturer: Linux 5.15.0-175859-g5e2092fb8a27 ehci_hcd
usb usb1: SerialNumber: ci_hdrc.0
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
usb 1-1: new high-speed USB device number 2 using ci_hdrc
usb 1-1: New USB device found, idVendor=0bda, idProduct=8153, bcdDevice=30.00
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=6
usb 1-1: Product: USB 10/100/1000 LAN
usb 1-1: Manufacturer: Realtek
usb 1-1: SerialNumber: 000000
usb 1-1: reset high-speed USB device number 2 using ci_hdrc
r8152 1-1:1.0: Direct firmware load for rtl_nic/rtl8153a-4.fw failed with error -2
r8152 1-1:1.0: unable to load firmware patch rtl_nic/rtl8153a-4.fw (-2)
r8152 1-1:1.0 eth0: v1.12.11
# ifconfig
eth0 Link encap:Ethernet HWaddr A0:CE:C8:D7:D1:3F
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:14 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1591 (1.5 KiB) TX bytes:1591 (1.5 KiB)
usb0 Link encap:Ethernet HWaddr 00:05:F7:A8:1C:C2
inet addr:192.168.2.1 Bcast:0.0.0.0 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
# ifconfig
eth0 Link encap:Ethernet HWaddr A0:CE:C8:D7:D1:3F
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
eth0:avahi Link encap:Ethernet HWaddr A0:CE:C8:D7:D1:3F
inet addr:169.254.14.128 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:14 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1591 (1.5 KiB) TX bytes:1591 (1.5 KiB)
usb0 Link encap:Ethernet HWaddr 00:05:F7:A8:1C:C2
inet addr:192.168.2.1 Bcast:0.0.0.0 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
#
However in case the USB Ethernet adapter is connected to a network. Things work for me expected. Please see below.
PlutoSDR firmware uses a very lightweight mdev hotplug manager. (mdev is a udev replacement from Busybox) It supports some basic hotplug events. I don't we can use it for link-up type of events.
# dmesg -n7
# ci_hdrc ci_hdrc.0: EHCI Host Controller
ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.15
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: EHCI Host Controller
usb usb1: Manufacturer: Linux 5.15.0-175859-g5e2092fb8a27 ehci_hcd
usb usb1: SerialNumber: ci_hdrc.0
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
usb 1-1: new high-speed USB device number 2 using ci_hdrc
usb 1-1: New USB device found, idVendor=0bda, idProduct=8153, bcdDevice=30.00
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=6
usb 1-1: Product: USB 10/100/1000 LAN
usb 1-1: Manufacturer: Realtek
usb 1-1: SerialNumber: 000000
usb 1-1: reset high-speed USB device number 2 using ci_hdrc
r8152 1-1:1.0: Direct firmware load for rtl_nic/rtl8153a-4.fw failed with error -2
r8152 1-1:1.0: unable to load firmware patch rtl_nic/rtl8153a-4.fw (-2)
r8152 1-1:1.0 eth0: v1.12.11
r8152 1-1:1.0 eth0: carrier on
# ifconfig
eth0 Link encap:Ethernet HWaddr A0:CE:C8:D7:D1:3F
inet addr:10.44.3.53 Bcast:10.44.3.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:36 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2433 (2.3 KiB) TX bytes:2512 (2.4 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:14 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1591 (1.5 KiB) TX bytes:1591 (1.5 KiB)
usb0 Link encap:Ethernet HWaddr 00:05:F7:A8:1C:C2
inet addr:192.168.2.1 Bcast:0.0.0.0 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
#
Things seem to work for me...
I have a windows machine with a pluto attached to ethernet (cross over cable plus Ethernet/USB dongle), and another pluto connected to the normal network (wifi on my laptop), and a zed board with an FMCOMMS2 attached on the network attached to wifi.
I plug them in - they all show up on my windows machine.
C:\Users\rgetz>iio_info -s
Unable to create Local IIO context : Function not implemented (40)
Available contexts:
0: 192.168.1.120 (AD-FMCOMMS2-EBZ on Xilinx Zynq ZED), serial=00100 [ip:analog.local]
1: 169.254.10.121 (Analog Devices PlutoSDR Rev.C (Z7010-AD9363A)), serial=10447376de0b000ef1ff3400e99f9920d0 [ip:pluto.local]
2: 192.168.1.115 (Analog Devices PlutoSDR Rev.C (Z7010-AD9363A)), serial=10447376de0b000213002900fafa9908ec [ip:pluto.local]
the only problem is that the two plutos are on two different networks, and therefor don't see a name conflict when like this - so they show up on the windows machine as ip:pluto.local and ip:pluto.local (identical). You must use the ip number to differentiate them when you want to...
with ipv6 - it should be better...
But - it totally works for me now.
And can confirm - /proc/sys/kernel/hotplug
does not currently notify/poke mdev for cable carrier up/down messages, so there isn't an easy way to restart things...
However - I think that is because we don't have an allow-hotplug
in /etc/network/interfaces
need to do some checking when I have more time.
I think ifplud
needs to be added to busybox with a few scripts to tie things together - and then it would work...
I’m trying to use my Pluto with a rtl8153 usb ethernet dongle, but is seems the DHCP client is broken.
I logged in using the UART on the power USB port, and the link gets up, but the pluto seems not run a DHCP client:
After a short while avahi assigns a link-local address:
When I run
ifup usb0
(afterifdown usb0
, if avahi already assigned an address), the interface immediately gets an IP assigned via DHCP and everything works as it should:my config.txt:
The generated config seems fine:
log output:
I can provide necessary debug logs if you tell me where i can find them as I’m not familiar with the system layout.