Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


raspbian_wifi

Raspbian - wifi configuration

  • Wifi↔USB: Alpha AWUS036NHA
  • SBC: RaspberryPi B+
  • OS: Raspbian / kernel 3.12.22+
  • Country: The Netherlands
  • Output before, using wrong regulatory domain, channel 12 and 13 are missing:
    # iwlist wlan0 channel
    wlan0     11 channels in total; available frequencies :
              Channel 01 : 2.412 GHz
              Channel 02 : 2.417 GHz
              Channel 03 : 2.422 GHz
              Channel 04 : 2.427 GHz
              Channel 05 : 2.432 GHz
              Channel 06 : 2.437 GHz
              Channel 07 : 2.442 GHz
              Channel 08 : 2.447 GHz
              Channel 09 : 2.452 GHz
              Channel 10 : 2.457 GHz
              Channel 11 : 2.462 GHz
              Current Frequency:2.462 GHz (Channel 11)

Install prerequisites

  • Install packages:
    apt-get install crda

Modify regulatory domain

  • Edit /etc/default/crda
    REGDOMAIN=NL
  • Reboot
  • Channels after reboot: iwlist wlan0 channel
    # iwlist wlan0 channel
    wlan0     13 channels in total; available frequencies :
              Channel 01 : 2.412 GHz
              Channel 02 : 2.417 GHz
              Channel 03 : 2.422 GHz
              Channel 04 : 2.427 GHz
              Channel 05 : 2.432 GHz
              Channel 06 : 2.437 GHz
              Channel 07 : 2.442 GHz
              Channel 08 : 2.447 GHz
              Channel 09 : 2.452 GHz
              Channel 10 : 2.457 GHz
              Channel 11 : 2.462 GHz
              Channel 12 : 2.467 GHz
              Channel 13 : 2.472 GHz
              Current Frequency:2.462 GHz (Channel 11)

Configure wireless

  • /etc/wpa_supplicant/wpa_supplicant.conf
    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    update_config=1
    
    network={
            ssid="<ssid>"
            bssid=<bssid MAC if needed>
            psk="<psk key>"
            proto=RSN
            key_mgmt=WPA-PSK
            pairwise=CCMP
            auth_alg=OPEN
    }
  • /etc/network/interfaces
    auto lo
    
    iface lo inet loopback
    iface eth0 inet dhcp
    
    allow-hotplug wlan0
    iface wlan0 inet manual
    wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
    iface default inet dhcp
  • Fixing WiFi dropout issues: /etc/modprobe.d/8192cu.conf
    # Disable power saving
    options 8192cu rtw_power_mgnt=0 rtw_enusbss=1 rtw_ips_mode=1
  • reboot
raspbian_wifi.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1