Raspberry Pi WiFi Direct
2018. 12. 26. 08:41ㆍLinux/Raspberry Pi
Raspberry Pi WiFi Direct 사용을 위한 설정 방법.
/etc/wpa_supplicant/wpa_supplicant.conf을 아래와 같이 수정한다.
ctrl_interface=DIR=/var/run/wpa_supplicant
update_config=1
ap_scan=1
device_name=RPi_3
/etc/wpa_supplicant/wpa_supplicant.conf을 아래와 같이 수정한다.
ctrl_interface=DIR=/var/run/wpa_supplicant
update_config=1
ap_scan=1
device_name=RPi_3
# Primary Device Type
# Used format: <categ>-<0UI>-<subcateg>
# 1-0050F204-1 (Computer / PC)
# 1-0050F204-1 (Computer / Server)
# 1-0050F204-1 (Storage / NAS)
# 1-0050F204-1 (Network Infrastructure / AP)
device_type=1-0050F204-1
driver_param=use_p2p_group_interface=1
driver_param=p2p_device=1
driver_param=p2p_device=1
# If you need to modify the group owner intent, 0-15, the higher
# number indicates preference to become the GO. You can also set
# this on p2p_connect commands.
p2p_go_intent=10
# p2p_go_ht40 - Default mode for HT40 enable when operating as GO.
# This will take effect for p2p_group_add and p2p_connect. Note that
# regulatory constraints and driver capabilities are consulted anyway,
# so setting it to 1 can't do real harm
# By default: 0 (disabled)
p2p_go_ht40=1
수정 후 아래와 같이 console에 입력한다.
$sudo wpa_supplicant -B -dd -iwlan0 -Dnl80211 -c /etc/wpa_supplicant/wpa_supplicant.conf
선택된 Interface출력
$wpa_cli p2p_find
수정 후 아래와 같이 console에 입력한다.
$sudo wpa_supplicant -B -dd -iwlan0 -Dnl80211 -c /etc/wpa_supplicant/wpa_supplicant.conf
선택된 Interface출력
$wpa_cli p2p_find
Slected interface 'p2p-dev-wlan0'
OK
Peer의 mac address를 출력.
$wpa_cli p2p_peers
$wpa_cli p2p_peers
Selected interface 'p2p-dev-wlan0'
aa:bb:cc:dd:ee:ff
PIN 인증을 통한 연결을 사용.
$wpa_cli p2p_connect [연결할 taget MAC address xx:xx:xx:xx:xx:xx] pin auth
PIN 번호가 생성 됨.
ex)
$wpa_cli p2p_connect aa:bb:cc:dd:ee:ff pin auth
12341234
$wpa_cli p2p_connect [연결할 target MAC Address yy:yy:yy:yy:yy:yy] [PIN 번호]
Ref:
http://processors.wiki.ti.com/index.php/OMAP_Wireless_Connectivity_NLCP_WiFi_Direct_Configuration_Scripts#Create_1:2_P2P_Group_-_Connect_with_PIN_code
https://w1.fi/cgit/hostap/plain/wpa_supplicant/wpa_supplicant.conf
$wpa_cli p2p_connect [연결할 target MAC Address yy:yy:yy:yy:yy:yy] [PIN 번호]
Ref:
http://processors.wiki.ti.com/index.php/OMAP_Wireless_Connectivity_NLCP_WiFi_Direct_Configuration_Scripts#Create_1:2_P2P_Group_-_Connect_with_PIN_code
https://w1.fi/cgit/hostap/plain/wpa_supplicant/wpa_supplicant.conf
'Linux > Raspberry Pi' 카테고리의 다른 글
Raspberry Pi 3B+를 이용한 Home Server 만들기 (0) | 2020.06.07 |
---|---|
GPIO 제어 (0) | 2019.08.18 |
Raspberry Pi TensorFlow (0) | 2019.01.10 |
라즈베리 파이 VNC 이용하기 (0) | 2018.12.31 |
라즈베리 파이 제로 W(Raspberry Pi Zero W) SSH로 Raspbian 설치하기 (0) | 2018.12.24 |