建立无线热点-脚本-AP-hostapd-dhcpd,给没root的android手机使用。

笔记本/便携移动设备,手机平板等软硬件
hacker85
帖子: 585
注册时间: 2010-02-25 11:19

Re: 建立无线热点-脚本-AP-hostapd-dhcpd,给没root的android手机使用。

#46

帖子 hacker85 » 2015-05-06 8:52

eexpress 写了:

代码: 全选

iw list|grep '* AP'
没显示你的网卡支持ap模式,就不继续走了...
命令下去后,显示的内容如下:

代码: 全选

iw list | grep '* AP'
		 * AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
		 * AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
		 * AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
		 * AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
这是支持还是不支持?
NM里直接设置的方式是给root过的,修改过网络设置的android手机使用的。
现在root后的手机也没有修改网络配置的操作呀,不涉及。
hacker85
帖子: 585
注册时间: 2010-02-25 11:19

Re: 建立无线热点-脚本-AP-hostapd-dhcpd,给没root的android手机使用。

#47

帖子 hacker85 » 2015-05-06 9:43

代码: 全选

./ap.sh 
./ap.sh: 21: ./ap.sh: msg: not found
		 * AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
		 * AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
		 * AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
		 * AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
net.ipv4.ip_forward = 1
Internet Systems Consortium DHCP Server 4.2.4
Copyright 2004-2012 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Wrote 0 leases to leases file.
Listening on LPF/wlan0/08:10:74:67:98:87/192.168.0.0/24
Sending on   LPF/wlan0/08:10:74:67:98:87/192.168.0.0/24
Sending on   Socket/fallback/fallback-net
random: Trying to read entropy from /dev/random
Configuration file: /tmp/hostapd.conf
nl80211: Could not add multicast membership for vendor events: -2 (No such file or directory)
rfkill: initial event: idx=2 type=1 op=0 soft=0 hard=0
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Using driver-based off-channel TX
nl80211: interface wlan0 in phy phy2
nl80211: Set mode ifindex 5 iftype 3 (AP)
nl80211: Failed to set interface 5 to mode 3: -95 (Operation not supported)
nl80211: Try mode change after setting interface down
nl80211: Set mode ifindex 5 iftype 3 (AP)
nl80211: Failed to set interface 5 to mode 3: -95 (Operation not supported)
nl80211: Interface mode change to 3 from 0 failed
nl80211: Could not configure driver mode
nl80211: Remove monitor interface: refcount=0
netlink: Operstate: ifindex=5 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
nl80211: Set mode ifindex 5 iftype 2 (STATION)
nl80211 driver initialization failed.
hostapd_interface_deinit_free(0x850c6f0)
hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1
hostapd_interface_deinit(0x850c6f0)
hostapd_bss_deinit: deinit bss wlan0
hostapd_cleanup(hapd=0x850d2f0 (wlan0))
hostapd_free_hapd_data: Interface wlan0 wasn't started
hostapd_interface_deinit_free: driver=(nil) drv_priv=(nil) -> hapd_deinit
hostapd_interface_free(0x850c6f0)
hostapd_interface_free: free hapd 0x850d2f0
hostapd_cleanup_iface(0x850c6f0)
hostapd_cleanup_iface_partial(0x850c6f0)
hostapd_cleanup_iface: free iface=0x850c6f0

请看一下这是什么原因导致的,手机上搜索不到wifi信号。
PS:我是apt-get 安装得hostapd,其版本是2.1了,更新时间在2015年,相信许多bug已修复了,我的系统是14.04……难道还是因为hostapd版本高不支持的原因 ???
头像
ak2008
帖子: 262
注册时间: 2009-03-06 10:52
系统: ubuntu-12.04

Re: 建立无线热点-脚本-AP-hostapd-dhcpd,给没root的android手机使用。

#48

帖子 ak2008 » 2016-03-02 9:43

MARK,MARK
fengwu66
帖子: 13
注册时间: 2010-04-16 8:34

Re: 建立无线热点-脚本-AP-hostapd-dhcpd,给没root的android手机使用。

#49

帖子 fengwu66 » 2016-04-01 8:52

收藏一下
greegree
帖子: 70
注册时间: 2006-06-29 10:38

Re: 建立无线热点-脚本-AP-hostapd-dhcpd,给没root的android手机使用。

#50

帖子 greegree » 2016-11-03 22:46

使用这个脚本的时候,手机端能够搜到wifi,但是输秘密始终显示“密码不匹配”

wlan0: STA ec:5a:86:f1:f1:9a IEEE 802.1X: unauthorizing port
wlan0: STA ec:5a:86:f1:f1:9a IEEE 802.11: deauthenticated due to local deauth request
nl80211: Set beacon (beacon_set=1)
nl80211: Event message available
nl80211: Ignored unknown event (cmd=20)


这个是为什么?
回复