우분투 14.04를 실행하는 비글본 블랙을 액세스 포인트와 무선 클라이언트로 동시에 사용하려고 합니다. 목표는 액세스 포인트를 사용하여 클라이언트가 연결할 수 있도록 하고 httpd 서버를 통해 페이지를 연 다음 로컬 무선 신호 구성/연결
Wi-Fi는 ath9k_htc 드라이버를 사용하는 Atheros AR9271 칩셋을 사용합니다. 이것이 이 칩셋과 표준 ath9k 지원 칩셋에만 해당되는지 궁금합니다. 아니면 이해하기 어려운 명백한 내용을 놓치고 있습니까?
가상 장치를 사용하여 액세스 포인트를 작동시킬 수 있습니다
iw phy phy0 interface add wap0 type __ap
ifconfig wap0 hw ether 0a:35:9f:fe:44:01 # or any fake HW address
ifconfig wap0 192.168.8.1 netmask 255.255.255.0
ifconfig wap0 192.168.8.1 up
/etc/network/interfaces 항목 포함
auto wap0
iface wap0 inet static
hostapd /etc/hostapd/hostapd.conf
address 192.168.8.1
netmask 255.255.255.0
및 /etc/hostapd/hostapd.conf 항목을 최소로
interface=wap0
driver=nl80211
ssid=BeagleBoneBlack
channel=1
그리고 최소한 /etc/dnsmasq.conf
interface=lo,wap0
listen-address=127.0.0.1
no-dhcp-interface=lo
dhcp-range=192.168.8.10,192.168.8.50,255.255.255.0,12h
cache-size=0
다양한 도구(nmcli / wicd / iw / ...)를 사용하여 클라이언트를 무선으로 연결할 수 있습니다. 그런 다음 다음을 사용하여 다른 라우터에 연결할 수 있습니다.wlan0
암호화가 비활성화된 경우
활성화 된 다른 라우터에 연결하려고 하면 wpa1/2
모든 클라이언트 및 여러 커널/드라이버 버전(3.8.x에서 백포트 3.19.x까지 호환)에서 재미있는 결과가 나오기 시작합니다.
wpa_supplicant
직접 실행하는 것부터 모든 것
wpa_passphrase "NETWORK_SSID" "WPA_PASS_PHRASE" > /etc/wpa_supplicant.conf
wpa_supplicant -i wlan0 -Dwext -Dn180211 -c/etc/wpa_supplicant.conf
출력(다양한 순서로 수십 번 반복)
Successfully initialized wpa_supplicant
wlan0: CTRL-EVENT-SCAN-STARTED
wlan0: SME: Trying to authenticate with 04:a1:51:33:f3:64 (SSID='NETWORK_SSID' freq=2462 MHz)
wlan0: SME: Authentication request to the driver failed
가상 장치를 초기화하기 전에 wpa_supplicant를 실행할 때wap0
# wpa_supplicant -i wlan0 -Dwext -Dn180211 -c/etc/wpa_supplicant.conf
Successfully initialized wpa_supplicant
wlan0: CTRL-EVENT-SCAN-STARTED
wlan0: SME: Trying to authenticate with 98:fc:11:b7:48:a0 (SSID='mycomountain' freq=2437 MHz)
wlan0: Trying to associate with 98:fc:11:b7:48:a0 (SSID='NETWORK_SSID' freq=2437 MHz)
wlan0: Associated with 98:fc:11:b7:48:a0
wlan0: WPA: Key negotiation completed with 98:fc:11:b7:48:a0 [PTK=CCMP GTK=TKIP]
wlan0: CTRL-EVENT-CONNECTED - Connection to 98:fc:11:b7:48:a0 completed [id=0 id_str=]
다음으로 설정된 /etc/network/interfaces를 사용합니다.
auto wlan0
iface wlan0 inet dhcp
wpa-ssid "NETWORK_SSID"
wpa-psk "WPA_PASS_PHRASE"
그리고 달리는 중
ifdown wlan0; ifup wlan0;
산출
Internet Systems Consortium DHCP Client 4.2.4
Copyright 2004-2012 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/wlan0/e8:de:27:1f:6e:60
Sending on LPF/wlan0/e8:de:27:1f:6e:60
Sending on Socket/fallback
Internet Systems Consortium DHCP Client 4.2.4
Copyright 2004-2012 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/wlan0/e8:de:27:1f:6e:60
Sending on LPF/wlan0/e8:de:27:1f:6e:60
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3 (xid=0x39ec90a3)
# ...
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
그런 다음 DHCPDISCOVER 줄은 실패할 때까지 다양한 간격 값으로 반복됩니다.
Hostapd가 wap0에서 실행 중일 때 wicd는 아무 작업도 수행하지 못합니다.
나는 지금까지 시도한 몇 단계를 건너뛰고 있습니다. 내가 하고 있는 일이 효과가 있을 것이라고 제안하는 가장 좋은 참고 자료입니다. (누군가에게 도움이 된다면 여기까지 온 내용을 포함하여 12개 더 게시할 수 있습니다.)
Linux의 단일 인터페이스에서 WiFi 액세스 포인트 생성
** 편집하다 **
연결하려는 라우터 채널과 일치하도록 Hostaptd 채널을 변경하려고 시도했습니다. 여전히 연결되지 않았지만 Hostapd가 실행 중일 때 wicd가 작업을 수행하기 시작했습니다.
dbus가 포함된 Python을 통한 wicd 제어(아마도 관련이 없을 수 있지만 솔루션을 찾은 후 이 스레드가 다른 사람에게 도움이 되기를 바랍니다)
import dbus
bus = dbus.SystemBus()
wireless = dbus.Interface(bus.get_object('org.wicd.daemon', '/org/wicd/daemon/wireless'),
'org.wicd.daemon.wireless')
network_id = 0
wireless.ConnectWireless(network_id)
WICD 로그 출력
2015/04/20 16:47:30 :: Putting interface down
2015/04/20 16:47:30 :: Releasing DHCP leases...
2015/04/20 16:47:30 :: attempting to set hostname with dhclient
2015/04/20 16:47:30 :: using dhcpcd or another supported client may work better
2015/04/20 16:47:31 :: Setting false IP...
2015/04/20 16:47:31 :: Stopping wpa_supplicant
2015/04/20 16:47:31 :: Flushing the routing table...
2015/04/20 16:47:31 :: Putting interface up...
2015/04/20 16:47:33 :: Attempting to authenticate...
2015/04/20 16:48:09 :: wpa_supplicant authentication may have failed.
2015/04/20 16:48:09 :: connect result is
2015/04/20 16:48:09 :: exiting connection thread
2015/04/20 16:48:10 :: Sending connection attempt result bad_pass
2015/04/20 16:48:10 :: Autoconnecting...
2015/04/20 16:48:10 :: No wired connection present, attempting to autoconnect to wireless network
2015/04/20 16:48:13 :: Unable to autoconnect, you'll have to manually connect
2015/04/20 16:48:13 :: attempting to set hostname with dhclient
2015/04/20 16:48:13 :: using dhcpcd or another supported client may work better
2015/04/20 16:48:13 :: attempting to set hostname with dhclient
2015/04/20 16:48:13 :: using dhcpcd or another supported client may work better
출력 wicd - Hostapd가 중지되었습니다.
2015/04/20 16:58:58 :: Putting interface down
2015/04/20 16:58:58 :: Releasing DHCP leases...
2015/04/20 16:58:58 :: attempting to set hostname with dhclient
2015/04/20 16:58:58 :: using dhcpcd or another supported client may work better
2015/04/20 16:58:58 :: Setting false IP...
2015/04/20 16:58:58 :: Stopping wpa_supplicant
2015/04/20 16:58:58 :: Flushing the routing table...
2015/04/20 16:58:58 :: Putting interface up...
2015/04/20 16:59:00 :: Attempting to authenticate...
2015/04/20 16:59:02 :: Running DHCP with hostname HOSTNAME
2015/04/20 16:59:02 :: attempting to set hostname with dhclient
2015/04/20 16:59:02 :: using dhcpcd or another supported client may work better
2015/04/20 16:59:02 :: Internet Systems Consortium DHCP Client 4.2.4
2015/04/20 16:59:02 :: Copyright 2004-2012 Internet Systems Consortium.
2015/04/20 16:59:02 :: All rights reserved.
2015/04/20 16:59:02 :: For info, please visit https://www.isc.org/software/dhcp/
2015/04/20 16:59:02 ::
2015/04/20 16:59:02 :: Listening on LPF/wlan0/64:70:02:20:08:35
2015/04/20 16:59:02 :: Sending on LPF/wlan0/64:70:02:20:08:35
2015/04/20 16:59:02 :: Sending on Socket/fallback
2015/04/20 16:59:02 :: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3 (xid=0x136a5e8e)
2015/04/20 16:59:02 :: DHCPREQUEST of 192.168.0.15 on wlan0 to 255.255.255.255 port 67 (xid=0x136a5e8e)
2015/04/20 16:59:02 :: DHCPOFFER of 192.168.0.15 from 192.168.0.1
2015/04/20 16:59:02 :: DHCPACK of 192.168.0.15 from 192.168.0.1
2015/04/20 16:59:02 :: bound to 192.168.0.15 -- renewal in 42862 seconds.
2015/04/20 16:59:02 :: DHCP connection successful
2015/04/20 16:59:02 :: not verifying
2015/04/20 16:59:03 :: Connecting thread exiting.
2015/04/20 16:59:03 :: Sending connection attempt result success
답변1
어떤 하드웨어를 가지고 있는지 확실하지 않지만 Wi-Fi용 USB 스틱(예: TP-Links TL-WN722N)을 사용하는 경우 펌웨어 해킹 없이는 AP 모드 채널을 설정할 수 없습니다. 이는 여러 Linux 소스 등을 컴파일해야 하는 매우 간단하지 않은 작업입니다. 또한 기본 펌웨어는 채널 12와 13을 사용할 수 없는 국가용인 것 같습니다.