Wifi Dongle

#1

Hello,

I tried to configure my Shake to use a wifi Dongle instead of the internal wifi. But, it appears to me that the shake is still using its internal wifi. How do I check which wifi it is using, to be certain, and how do I change it? I already followed the steps listed on the help page.

Thank you!
E

#2

Hi @EB1,

The interface won’t appear much different if you’ve followed the steps correctly, which makes it tough to figure out if it’s configured correctly. Can you send the output of ls /sys/class/net/, lsusb and iwconfig?

Ian

#3

Thank you Ian.

from iwconfig:

docker0   no wireless extensions.

eth0      no wireless extensions.

lo        no wireless extensions.

veth15db7a6  no wireless extensions.

veth6b0b3db  no wireless extensions.

wlan0     IEEE 802.11  ESSID:"NETGEAR92"
          Mode:Managed  Frequency:2.417 GHz  Access Point: 04:A1:51:DB:12:A2
          Bit Rate=28.8 Mb/s   Tx-Power=31 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=49/70  Signal level=-61 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:2139  Invalid misc:0   Missed beacon:0

vethe90f096 no wireless extensions.

From lsusb:

Bus 001 Device 005: ID 0e8d:7610 MediaTek Inc.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

From ls /sys/class/net

docker0  eth0  lo  veth15db7a6  veth6b0b3db  vethe90f096  wlan0
#4

Thanks @EB1. You are correct that your device isn’t working. This might be because you have a relatively new MediaTek device that doesn’t have a driver in the RaspberryPi kernel yet.

After some searching through the RaspberryPi forums, this post seems to suggest that you can run a script to download and install a pre-compiled driver for the MediaTek 7610.

Please note that we are not responsible for making external devices work with the Shake. However, I think this should work to at least get the OS to recognize the wifi device. If you choose to proceed, execute the following steps on your Pi.

Please also note that as a general rule of computing, you should never run any code directly from the internet without looking at it first. We are not responsible if this script crashes your Pi for whatever reason. The Pi forum post suggests running the following commands:

sudo wget http://downloads.fars-robotics.net/wifi-drivers/install-wifi -O /usr/bin/install-wifi
sudo chmod +x /usr/bin/install-wifi

Make sure you check the install-wifi script at this point to make sure it looks the way you think it should. Now you should be able to install using:

sudo install-wifi

Let me know if you have further questions.
Ian

#5

I should note here for future searches looking for info that when you run the lsusb command and get a line like this:

0e8d is the vendor ID (in this case MediaTek), and
7610 is the product ID.

#6

I suspect that the same happens with my S&B.

How can I distinguish between the RPI’s own Wifi module and my Wifi dongle?

I see the following:
ls /sys/class/net/
indocker0 eth0 lo veth19ee74e veth62884fa vethec260ff wlan0

lsusb:
Bus 001 Device 005: ID 7392:a812 Edimax Technology Co., Ltd Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter' Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

iwconfig:
docker0 no wireless extensions. eth0 no wireless extensions. vethec260ff no wireless extensions. lo no wireless extensions. veth19ee74e no wireless extensions. veth62884fa no wireless extensions. wlan0 IEEE 802.11 ESSID:"NAT1" Mode:Managed Frequency:2.462 GHz Access Point: 60:38:E0:72:89:3C Bit Rate=72.2 Mb/s Tx-Power=31 dBm Retry short limit:7 RTS thr:off Fragment thr:off Power Management:on Link Quality=56/70 Signal level=-54 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:3 Invalid misc:0 Missed beacon:0

#7

@UW1 your WiFi device is the following:

Bus 001 Device 005: ID 7392:a812 Edimax Technology Co., Ltd

This is another dongle with a Realtek chipset (similar to the one from the OP). It looks me like it has the wrong driver. Since it’s a Realtek device, you should also be able to install the driver for it fairly easily following the steps above. I’ve pasted them again in order below. The same caveats apply about running code from the web, but this script has worked for myself and others many times.

sudo wget http://downloads.fars-robotics.net/wifi-drivers/install-wifi -O /usr/bin/install-wifi
sudo chmod +x /usr/bin/install-wifi
sudo install-wifi

After installing the driver I’ve found it’s best to turn off the Power Management feature of the chip, which tends to cause issues. To do this, type sudo nano rc.local and add the following line:

iwconfig wlan0 power off

Then save and exit using CTRL+O, Enter, and CTRL+X, and restart. If your Shake is configured to connect to a network SSID it should do so automatically.

Let me know if you encounter problems.

#8

@UW1 @EB1 If you follow the above steps and continue to notice that two wlan devices are listed when you run ifconfig then you may need to “blacklist” the pi’s internal wifi. To do this, ssh to the pi and do the following:

  1. Disable in boot config

    sudo nano /boot/config.txt
    

    paste the following line into config.txt, then save (Ctrl+O then Enter) and exit (Ctrl+X)

    dtoverlay=pi3-disable-wifi
    

  1. Add to modprobe blacklist:
    sudo nano /etc/modprobe.d/raspi-blacklist.conf
    
    add the following lines (same process as above):
    blacklist brcmfmac
    blacklist brcmutil
    

EDIT: you will have to restart for these changes to take effect.

#9

Thank you very much for your support.

I could install a driver following this procedure:
https://edimax.freshdesk.com/support/solutions/articles/14000032146-how-to-install-ew-7811-ac600-series-and-ew-7822uac-adapters-on-raspberry-pi

It worked perfectly well and now I got both WLAN adapters appearing as working. It shows with the blue LED on the dongle which I have never observed before.

I will switch off the WiFi on the RPI as suggested by you.

When you mention do shut off the power management is this on the RPI‘s native adapter or on the dongle?

1 Like
#10

I mean on the dongle. Per this post it seems power management doesn’t actually save much energy, and instead causes tx/rx errors between the access point and the dongle. This page also contains a method to do this inside of the wpa_supplicant file.