为何ap设置好后,手机无法连接?

包含网卡/无线网的网络问题和ADSL/校园网/宽带拨号支持及代理/共享等网络使用问题
回复
whaha
帖子: 104
注册时间: 2016-07-08 17:43
系统: debian8

为何ap设置好后,手机无法连接?

#1

帖子 whaha »

新买的usb无线网卡。
lsusb
Bus 003 Device 003: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n

iw list
Wiphy phy0
max # scan SSIDs: 4
max scan IEs length: 2257 bytes
Retry short limit: 7
Retry long limit: 4
Coverage class: 0 (up to 0m)
Device supports RSN-IBSS.
Supported Ciphers:
* WEP40 (00-0f-ac:1)
* WEP104 (00-0f-ac:5)
* TKIP (00-0f-ac:2)
* CCMP (00-0f-ac:4)
* CMAC (00-0f-ac:6)
Available Antennas: TX 0x1 RX 0x1
Configured Antennas: TX 0x1 RX 0x1
Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* monitor
* mesh point
* P2P-client
* P2P-GO

上网方式是pppoe拨号
cat /etc/network/interfaces

auto dsl-provider
iface dsl-provider inet ppp
pre-up /bin/ip link set eth0 up
provider dsl-provider

auto eth0
iface eth0 inet static
address 192.168.1.101
netmask 255.255.255.0
dns-server 114.114.114.114


auto wlan1
iface wlan1 inet static
address 192.168.1.110
netmask 255.255.255.0
broadcast 192.168.0.255

cat /etc/hostapd/hostapd.conf
interface=wlan1
driver=nl80211
ssid=test
hw_mode=g
channel=6
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=3
wpa_passphrase=password
wpa_pairwise=TKIP
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP


cat /etc/dnsmasq.conf
interface=wlan1
listen-address=192.168.1.101
dhcp-range=192.168.1.101,192.168.1.150,12h
dhcp-option=3,192.168.1.101
dhcp-option=6,114.114.114.114

hostapd -B /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
Using interface wlan1 with hwaddr 00:1a:8c:30:08:b1 and ssid "test"
wlan1: interface state UNINITIALIZED->ENABLED
wlan1: AP-ENABLED

现在我用android手机来连接这个wifi ap了,输入帐号,密码后,总是处于autherticating status,请问,如何解决?
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 为何ap设置好后,手机无法连接?

#2

帖子 vickycq »

whaha 写了:上网方式是pppoe拨号
尝试使用 https://github.com/oblique/create_ap NAT 模式

若直接使用 hostapd 参考 https://nims11.wordpress.com/2012/04/27 ... ess-point/
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
whaha
帖子: 104
注册时间: 2016-07-08 17:43
系统: debian8

Re: 为何ap设置好后,手机无法连接?

#3

帖子 whaha »

我使用 hostapd,参照这篇文章做了。
https://nims11.wordpress.com/2012/04/27 ... ess-point/

因为,我是pppoe上网,

/home/initsoftap wlan0 ppp0
Internet Systems Consortium DHCP Server 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Config file: /etc/dhcp/dhcpd.conf
Database file: /var/lib/dhcp/dhcpd.leases
PID file: /var/run/dhcpd.pid
net.ipv4.ip_forward = 1
Wrote 0 leases to leases file.


用手机进行连接,没有任何反应。
回复