Raspberry Pi를 사용하여 WiFi 연결

2877 단어 RaspberryPi
USB WiFi 어댑터가 Raspberry Pi에 설치되어 있습니다.
좀 빠져서 필기하는 거야.
Raspberry Pi가 시작될 때 WiFi에 연결했으면 합니다.
WiFi 설정은 다음과 같습니다.
/etc/wpa_supplicant/wpa_supplicant.및 conf
/etc/network/interfaces
하지만 3시간가량 시도해 봤지만 제대로 연결되지 않았다.
번거로우므로 GUI에서 WiFi를 설정하기로 결정했습니다.
마우스가 없기 때문에 vnc를 넣고 원격 데스크톱으로 맥에 접근합니다.
$ sudo apt-get update
$ sudo apt-get install tightvncserver
$ tightvncserver

You will require a password to access your desktops.

Password:
Warning: password truncated to the length of 8.
Verify:
Would you like to enter a view-only password (y/n)? y
Password:
Warning: password truncated to the length of 8.
Verify:
xauth:  file /home/pi/.Xauthority does not exist

New 'X' desktop is raspberrypi:1

Creating default startup script /home/pi/.vnc/xstartup
Starting applications specified in /home/pi/.vnc/xstartup
Log file is /home/pi/.vnc/raspberrypi:1.log
vnc 연결에 사용할 비밀번호를 물어볼 수 있기 때문에 설정합니다.
finder를 통해 맥에서 원격 데스크톱을 연결할 수 있습니다.
finder cmd+K 열기
vnc://xx.xx.xx.xx:5901
xx는 Raspberry Pi의 IP 주소입니다.

이런 느낌으로 연결.
바탕 화면에서 WiFi Config 아이콘을 두 번 클릭하면 설정 도구가 열립니다.
어댑터에 wlan0이 표시되면 USB WiFi 어댑터로 인식됩니다.
Scan 을 클릭하여 액세스 포인트를 검색하고 연결합니다.
와이파이 설정이 완료됩니다.
/etc/wpa_supplicant/wpa_supplicant.및 conf
/etc/network/interfaces
이런 느낌이에요.
/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
/etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
        ssid="SSID"
        psk="password"
        proto=RSN
        key_mgmt=WPA-PSK
        pairwise=CCMP
        auth_alg=OPEN
}
이렇게 되면 Raspberry Pi는 전원을 켜기만 하면 원격으로 개발할 수 있다.
마우스와 키보드가 필요 없어 편리하다.

좋은 웹페이지 즐겨찾기