Install XiaoMi USB Wifi on Raspberry Pi B

My device is a Raspberry Pi B.  The XiaoMi Wifi USB contains RT7601U.  It can be used with the below simple steps in Raspbian:

  1. run in root mode: sudo -s
  2. update the system with the below commands::
    1. apt-get update
    2. apt-get upgrade
    3. apt-get dist-upgrade
  3. Please reboot your system.
  4. You can check your Raspbian version with: uname -a
    root@raspberrypi:/home/pi# uname -a
    Linux raspberrypi 4.1.13+ #826 PREEMPT Fri Nov 13 20:13:22 GMT 2015 armv6l GNU/Linux
  5. The latest version has included firmware-ralink and MT7601U.   No additional download is needed.  We can check if MT7601U is  loaded:
    pi@raspberrypi ~ $ lsmod
    Module                  Size  Used by
    snd_bcm2835            22317  0
    snd_pcm                92581  1 snd_bcm2835
    snd_seq                61957  0
    snd_seq_device          5130  1 snd_seq
    snd_timer              23454  2 snd_pcm,snd_seq
    snd                    68161  5 snd_bcm2835,snd_timer,snd_pcm,snd_seq,snd_seq_device
    joydev                  9913  0
    evdev                  11364  2
    mt7601u                87685  0
    mac80211              622304  1 mt7601u
    cfg80211              499834  2 mac80211,mt7601u
    rfkill                 22491  1 cfg80211
    hid_sunplus             1749  0
    bcm2835_gpiomem         3703  0
    uio_pdrv_genirq         3690  0
    uio                    10002  1 uio_pdrv_genirq
    sg                     21963  0
  6. You can check if the Wifi USB is connected to the system:
    pi@raspberrypi ~ $ lsusb
    Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. SMC9512/9514 USB Hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
    Bus 001 Device 004: ID 04b4:6570 Cypress Semiconductor Corp.
    Bus 001 Device 005: ID 04fc:05d8 Sunplus Technology Co., Ltd Wireless keyboard/mouse
    Bus 001 Device 006: ID 8644:8003 Intenso GmbG Micro Line
    Bus 001 Device 007: ID 2717:4106


    Since Xiaomi has its own vendor ID 2717 and it is not recognized by the system.
  7. You can check if the Wifi USB can be detected:
    root@raspberrypi:/home/pi# iwconfig
    lo        no wireless extensions.

    eth0      no wireless extensions.

    In this case, no Wifi hardware is detected.
  8. You can verify if your system loads mt7601u, but some file is missing: 
    1. root@raspberrypi:/home/pi# dmesg | grep 7601
      [    9.529322] mt7601u 1-1.2.2:1.0: ASIC revision: 76010001 MAC revision: 76010500
      [    9.612429] mt7601u 1-1.2.2:1.0: Direct firmware load for mt7601u.bin failed with error -2
      [    9.629647] mt7601u: probe of 1-1.2.2:1.0 failed with error -2

      [    9.646081] usbcore: registered new interface driver mt7601u
  9.  Download the missing binary:
    1.  sudo wget https://github.com/porjo/mt7601/raw/master/src/mcu/bin/MT7601.bin -O /lib/firmware/mt7601u.bin (reference: MrEngMan@Raspberry Pi Forum)
    2. Reboot the system.
  10. Then you should now able to find your Wifi:
    pi@raspberrypi ~ $ iwconfig
    wlan0 
        IEEE 802.11bgn  ESSID:off/any

              Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm
              Retry short limit:7   RTS thr:off   Fragment thr:off
              Power Management:off

    lo        no wireless extensions.

    eth0      no wireless extensions.
  11. Please note your Wifi name is wlan0 in this sample.
  12. To further config the Wifi, follow this article on WIRELESS-CLI on official website:


     

Comments

Popular Posts