OS/Raspberry Pi

Raspberry PI : WiFi

파란크리스마스 2024. 1. 27. 10:13
728x90

출처

WiFi 상태 확인

pi@raspberrypi:~$ iwconfig
lo        no wireless extensions.
 
eth0      no wireless extensions.
 
wlan0     IEEE 802.11  ESSID:"bluexmas"  
          Mode:Managed  Frequency:2.452 GHz  Access Point: 88:36:6C:45:F7:B0   
          Bit Rate=58.5 Mb/s   Tx-Power=31 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=62/70  Signal level=-48 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:1  Invalid misc:0   Missed beacon:0

SSID 목록 조회

pi@raspberrypi:~$ sudo iwlist wlan0 scan | grep SSID
                    ESSID:"U+Net7CCC"
                    ESSID:"bluexmas"
                    ESSID:"U+Net6519_5G"
                    ESSID:"Robin"
                    ESSID:"U+Net6519"
                    ESSID:"SK_WiFiGIGA71B1"
                    ESSID:"SK_WiFiGIGA71B1_2.4G"
                    ESSID:"\x00\x00\x00\x00\x00\x00\x00"
                    ESSID:"U+Net7CCC_5G"
                    ESSID:"\x00\x00\x00\x00\x00\x00\x00"

숨겨진 SSID 연결

scan_ssid값이 1인 경우 숨겨진 SSID 연결 설정

pi@raspberrypi:~$ cat /etc/wpa_supplicant/wpa_supplicant.conf 
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=GB
 
network={
       ssid="bluexmas5G"
       scan_ssid=1
       psk="test1234" 
}

Network Manager 변경

pi@raspberrypi:~$ sudo raspi-config

NetworkManager 실행 상태 확인

pi@raspberrypi:~$ sudo systemctl status NetworkManager 
● NetworkManager.service - Network Manager
     Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
    Drop-In: /usr/lib/systemd/system/NetworkManager.service.d
             └─10-dhcpcd.conf
     Active: active (running) since Sat 2024-01-27 01:57:21 GMT; 4min 3s ago
       Docs: man:NetworkManager(8)
   Main PID: 496 (NetworkManager)
      Tasks: 3 (limit: 4088)
        CPU: 681ms
     CGroup: /system.slice/NetworkManager.service
             └─496 /usr/sbin/NetworkManager --no-daemon
 
Jan 27 01:57:31 raspberrypi NetworkManager[496]:   [1706320651.3284] device (wlan0): state change: ip-config -> ip-check (r>
Jan 27 01:57:31 raspberrypi NetworkManager[496]:   [1706320651.3382] device (wlan0): state change: ip-check -> secondaries >
Jan 27 01:57:31 raspberrypi NetworkManager[496]:   [1706320651.3390] device (wlan0): state change: secondaries -> activated>
Jan 27 01:57:31 raspberrypi NetworkManager[496]:   [1706320651.3405] manager: NetworkManager state is now CONNECTED_LOCAL
Jan 27 01:57:31 raspberrypi NetworkManager[496]:   [1706320651.3541] manager: NetworkManager state is now CONNECTED_SITE
Jan 27 01:57:31 raspberrypi NetworkManager[496]:   [1706320651.3547] policy: set 'bluexmas' (wlan0) as default for IPv4 routing>
Jan 27 01:57:31 raspberrypi NetworkManager[496]:   [1706320651.3557] dns-mgr: Writing DNS information to /sbin/resolvconf
Jan 27 01:57:31 raspberrypi NetworkManager[496]:   [1706320651.4547] device (wlan0): Activation: successful, device activat>
Jan 27 01:57:31 raspberrypi NetworkManager[496]:   [1706320651.4568] manager: NetworkManager state is now CONNECTED_GLOBAL
Jan 27 01:57:31 raspberrypi NetworkManager[496]:   [1706320651.4589] manager: startup complete

NetworkManager 연결 정보 확인

pi@raspberrypi:~$ cd /etc/NetworkManager/system-connections
pi@raspberrypi:/etc/NetworkManager/system-connections$ ls
bluexmas.nmconnection
pi@raspberrypi:/etc/NetworkManager/system-connections$ sudo cat bluexmas.nmconnection 
[connection]
id=bluexmas
uuid=db18715a-410e-4c57-8fc3-475a7391faec
type=wifi
interface-name=wlan0
permissions=
timestamp=1706314246
 
[wifi]
mac-address-blacklist=
mode=infrastructure
seen-bssids=88:36:6C:45:F7:B0;
ssid=bluexmas
 
[wifi-security]
auth-alg=open
key-mgmt=wpa-psk
psk=s2u2n4g6
 
[ipv4]
dns-search=
method=auto
 
[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto
 
[proxy]