Raspberry Pi without screen, configure WiFi in SD card

WiFi network configuration

The operation method is simple:

  • Use the computer to read the SD card flashed with the Raspbian system. Create a new wpa_supplicant.conf file in the boot partition, that is, /bootthe directory , fill in the content according to the following reference format and save the wpa_supplicant.conf file.

  • country=CN
    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    update_config=1
    
    network={
          
          
    ssid="WiFi名"
    psk="密码"
    key_mgmt=WPA-PSK
    priority=1
    }
    
    network={
          
          
    ssid="WiFi名"
    psk="密码"
    key_mgmt=WPA-PSK
    priority=2
    scan_ssid=1
    }
    
    • Instructions and example WiFi configurations with different security:

      • #ssid: the ssid of the network
      • #psk:password
      • #priority: connection priority, the higher the number, the higher the priority (cannot be negative)
      • #scan_ssid: When connecting to hidden WiFi, you need to specify this value as 1
    • If your WiFi does not have a password

      • network={
                  
                  
        ssid="你的无线网络名称(ssid)"
        key_mgmt=NONE
        }
        
    • If your WiFi uses WEP encryption

      • network={
                  
                  
        ssid="你的无线网络名称(ssid)"
        key_mgmt=NONE
        wep_key0="你的wifi密码"
        }
        
    • If your WiFi uses WPA/WPA2 encryption

      • network={
                  
                  
        ssid="你的无线网络名称(ssid)"
        key_mgmt=WPA-PSK
        psk="你的wifi密码"
        }
        

Guess you like

Origin blog.csdn.net/qq_39125451/article/details/116172930