|
要做一台3DS远程擦肩站,需要把树莓派做成无线路由并且手动指定ESSID为attwifi,BSSID为4E:53:50:4F:4F:46。
网卡用的是EDUP-MS8516,驱动现在用的是系统自带的,hostapd是从网卡官网提供的源码手动编译的。
目前AP、DHCP、路由都搞定了,设备都可以通过树莓派无线上网。
但是BSSID无法更改。
BSSID默认是取的网卡MAC地址,现在hostapd无法手动指定BSSID,用ifconfig或macchanger也无法更改网卡的mac。
日志:
pi@raspberrypi ~ $ vi conf.txt
driver=rtl8188cu
interface=wlan0
#bridge=br0
#driver=nl80211
ssid=attwifi
bssid=4E:53:50:4F:4F:46
hw_mode=g
channel=6
auth_algs=1
wpa=0
#macaddr_acl=1
#accept_mac_file=/etc/hostapd/mac_accept
wmm_enabled=0
ignore_broadcast_ssid=0
~
pi@raspberrypi ~ $ sudo ./hostapd conf.txt
Configuration file: conf.txt
drv->ifindex=3
l2_sock_recv==l2_sock_xmit=0x0xe62638
+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
rtl871x_set_key_ops
rtl871x_set_key_ops
rtl871x_set_key_ops
rtl871x_set_key_ops
Using interface wlan0 with hwaddr e8:4e:06:06:98:89 and ssid 'attwifi'
rtl871x_set_wps_assoc_resp_ie
rtl871x_set_wps_beacon_ie
rtl871x_set_wps_probe_resp_ie
rtl871x_set_beacon_ops
rtl871x_set_hidden_ssid_ops
pi@raspberrypi ~ $ sudo macchanger --mac=4E:53:50:4F:4F:46 wlan0
ERROR: Can't read permanent MAC: Operation not supported
Permanent MAC: 00:00:00:00:00:00 (Xerox Corporation)
Current MAC: e8:4e:06:06:98:89 (unknown)
New MAC: 4e:53:50:4f:4f:46 (unknown)
pi@raspberrypi ~ $ ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr e8:4e:06:06:98:89
inet addr:10.5.5.1 Bcast:10.5.5.31 Mask:255.255.255.224
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:30 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
pi@raspberrypi ~ $ sudo ifconfig wlan0 down ;sudo ifconfig wlan0 hw ether 4E:53:50:4F:4F:46;sudo ifconfig wlan0 up
pi@raspberrypi ~ $ ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr e8:4e:06:06:98:89
inet addr:10.5.5.1 Bcast:10.5.5.31 Mask:255.255.255.224
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:30 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
macchanger前后updown也试过了,除了ERROR: Can't read permanent MAC: Operation not supported之外,其他都不报错,也不生效,现在不知所措了……
|
|