In the /var/log/messages file of my Raspberry Pi, which is connected through WiFi to my home WLAN, I repeatedly noticed this error message:
smsc95xx 1-1.1:1.0 eth0: unexpected urb length 0
Furthermore, I got “no route to host” messages when attempting to ssh to my RasPi. At the same time I couldn’t connect to lighttpd. Some research with Google suggested, that there might be a problem with the USB driver. Symptoms are characterized by fluctuating transfer rates and response times as well as bad WiFi connection quality leading to delayed keyboard response or garbled input when using ssh. Fortunately, there is a workaround:
One can disable eth0 using an init script on boot as described on this page (in German). The disable-ethernet script below should be placed into /etc/init.d. To run it on boot, do: sudo insserv disable-ethernet. To disable the script, do: sudo insserv -r disable-ethernet. As far as I can see in my /var/log/messages file, the problem has gone.
#!/bin/bash ### BEGIN INIT INFO # Provides: disable-ethernet # Required-Start: $local_fs # Required-Stop: # Default-Start: S # Default-Stop: # Short-Description: Disables on-board Ethernet to fix WiFi+Lapdock # Description: When using the Raspberry Pi Model B on the # Motorola Atrix Lapdock, inserting certain WiFi # adapters into either the RPi's spare USB port or # the Lapdock's USB ports causes the on-board # Ethernet and WiFi adapter to malfunction. # Disabling the on-board Ethernet driver allows # the WiFi adapter to work simultaneously with the # Lapdock. ### END INIT INFO . /lib/lsb/init-functions DEVICE_DIR=/sys/bus/usb/drivers/smsc95xx BUS_ID="1-1.1:1.0" INT_TOGGLE=true #issue ifdown and ifup? #INT_TOGGLE=false is_enabled () { [ -L "$DEVICE_DIR/$BUS_ID" ] && return 0 || return 1 } toggle_int () { is_enabled || return 0 #ethernet not enabled [ "$(ls -1 "$DEVICE_DIR/$BUS_ID/net" |wc -l)" -eq "1" ] || return 0 #something wrong $INT_TOGGLE || return 0 #user doesn't want this [ ! -f /run/network/ifstate ] && return 0 #run level S int_name=$(ls -1 "$DEVICE_DIR/$BUS_ID/net") if [ "$1" == "up" ]; then log_action_begin_msg "Bringing on-board interface up" ifup $int_name else log_action_begin_msg "Bringing on-board interface down" ifdown $int_name fi log_action_end_msg $? } case "$1" in start) if ! is_enabled; then log_failure_msg "Service already running. Exiting." exit 0 fi toggle_int down log_action_begin_msg "Disabling on-board network interface" echo "$BUS_ID" > $DEVICE_DIR/unbind log_action_end_msg $? exit $? ;; restart|reload|force-reload) echo "Error: argument '$1' not supported" >&2 exit 3 ;; stop) if is_enabled; then log_failure_msg "Service not running. Exiting." exit 0 fi log_action_begin_msg "Enabling on-board network interface" echo "$BUS_ID" > $DEVICE_DIR/bind log_action_end_msg $? toggle_int up exit $? ;; status) if is_enabled; then echo "Service is NOT running: on-board interface enabled" >&2 exit 1 else echo "Service is running: on-board interface disabled" exit 0 fi ;; *) echo "Usage: $0 start|stop|status" >&2 exit 3 ;; esac
Update
In /etc/modprobe.d, create a new configuration file e.g. 8192.conf containing two options for the 8192cu kernel module to disable power saving for the WLAN dongle:
options 8192cu rtw_power_mgnt=0 rtw_enusbss=0
… and you shouldn’t see any “no route to host messages” when you ssh to your Pi.