Eu estou tentando usar um osso preto beagle executando o Ubuntu 14.04 agir como um ponto de acesso e um cliente sem fio ao mesmo tempo
o objetivo é usar o ponto de acesso para permitir que um cliente se conecte, abra uma página através de um servidor httpd e, em seguida, configure / conecte a um sinal sem fio local
o wifi usa o chipset Atheros AR9271 que usa o driver ath9k_htc
Eu estou querendo saber se isso é específico para este chipset vs um chipset suportado padrão ath9k ou estou faltando o óbvio indescritível?
Eu posso fazer o ponto de acesso funcionar usando um dispositivo virtual
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
com a entrada / etc / network / interfaces
auto wap0
iface wap0 inet static
hostapd /etc/hostapd/hostapd.conf
address 192.168.8.1
netmask 255.255.255.0
e entrada de /etc/hostapd/hostapd.conf para um mínimo
interface=wap0
driver=nl80211
ssid=BeagleBoneBlack
channel=1
e /etc/dnsmasq.conf no mínimo com
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
Eu posso fazer com que um cliente se conecte sem fio usando uma variedade de ferramentas
(nmcli / wicd / iw / ...)
Eu posso me conectar a outro roteador usando wlan0
se a criptografia estiver desativada
quando tento conectar-me a outro roteador com wpa1/2
ativado, começo a obter resultados engraçados com qualquer cliente e várias versões de kernel / driver (compat 3.8.x através de backports 3.19.x)
tudo, desde a execução de wpa_supplicant
diretamente
wpa_passphrase "NETWORK_SSID" "WPA_PASS_PHRASE" > /etc/wpa_supplicant.conf
wpa_supplicant -i wlan0 -Dwext -Dn180211 -c/etc/wpa_supplicant.conf
saída (repetida algumas dúzias de vezes em ordem diferente)
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
ao executar o wpa_supplicant antes de inicializar o dispositivo virtual 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=]
para usar o / etc / network / interfaces definido como
auto wlan0
iface wlan0 inet dhcp
wpa-ssid "NETWORK_SSID"
wpa-psk "WPA_PASS_PHRASE"
e executando
ifdown wlan0; ifup wlan0;
saída
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.
a linha DHCPDISCOVER então se repete com vários valores de intervalo até falhar
O wicd simplesmente não faz nada quando o hostapd está rodando no wap0
Eu certamente estou pular alguns passos que eu tentei até agora, a melhor referência que sugere que o que eu estou fazendo deve funcionar (eu posso postar mais uma dúzia com peças que me ajudaram até aqui se for útil para alguém)
Criando ponto de acesso WiFi em uma única interface em Linux
** EDITAR **
Eu tentei mudar o canal hostaptd para corresponder ao canal do roteador que estou tentando conectar - ainda não conectando, mas começando a fazer wicd para fazer algo quando o hostapd está rodando
wicd control através de python w / dbus (provavelmente irrelevante, mas esperando que este thread ajude alguém depois que uma solução for encontrada)
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)
Saída de log do 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
Saída wicd - hostapd parou
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