caiwang / board2ihost

0 stars 0 forks source link

hostapd on rocklite rtl8188 (lwfinger's driver) #57

Open unissoft-bj opened 9 years ago

unissoft-bj commented 9 years ago

sed -i 's|#DAEMON_CONF=""|DAEMON_CONF="/etc/hostapd/hostapd.conf"|g' /etc/default/hostapd cat /etc/default/hostapd | grep DAEMON_CONF= cat >> /etc/hostapd/hostapd.conf << EOF

The interface to listen on

interface=wlan0

The driver that is being used by the WiFi adapte

driver=nl80211

SSID or Network name

ssid=Matrix

Setting to Wireless G mode. A, B, and G are available

hw_mode=g

Working channel

channel=11

Open without authtication

auth_algs=1 wmm_enabled=0

EOF

reboot

root@ihost:~# ps aux | grep hostapd root 832 0.0 0.1 4084 1548 ? Ss 20:34 0:00 /usr/sbin/hostapd -B -P /var/run/hostapd.pid /etc/hostapd/hostapd.conf root 1181 0.0 0.1 3388 1148 pts/0 S+ 20:35 0:00 grep --color=auto hostapd root@ihost:~#

ssid matrix正常

unissoft-bj commented 9 years ago

root@ihost:~# iwconfig wlan0 IEEE 802.11bg ESSID:"Matrix" Nickname:"WIFI@REALTEK" Mode:Master Frequency:2.462 GHz Access Point: AC:A2:13:44:A4:74
Bit Rate:54 Mb/s Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off Encryption key:off Power Management:off Link Quality:0 Signal level:0 Noise level:0 Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0

sit0 no wireless extensions.

lo no wireless extensions.

eth0 no wireless extensions.

wlan1 IEEE 802.11bgn ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=0 dBm
Retry short limit:7 RTS thr:off Fragment thr:off Encryption key:off Power Management:off

root@ihost:~#

unissoft-bj commented 9 years ago

硬件不支持5ghz

root@ihost:~# cat /etc/hostapd/hostapd.conf

The interface to listen on

interface=wlan0

The driver that is being used by the WiFi adapte

driver=nl80211

SSID or Network name

ssid=Matrix

Setting to Wireless G mode. A, B, and G are available

hw_mode=a

Working channel

channel=36

Open without authtication

auth_algs=1 wmm_enabled=0

root@ihost:~# service hostapd start

root@ihost:~# hostapd -dd /etc/hostapd/hostapd.conf

random: Trying to read entropy from /dev/random Configuration file: /etc/hostapd/hostapd.conf rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0 rfkill: initial event: idx=1 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 phy0 nl80211: Set mode ifindex 4 iftype 3 (AP) nl80211: Setup AP(wlan0) - device_ap_sme=1 use_monitor=1 nl80211: Enable Probe Request reporting nl_preq=0x808d80 nl80211: Register frame type=0x40 nl_handle=0x808d80 match= nl80211: Add own interface ifindex 4 phy: phy0 BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits) nl80211: Regulatory information - country=00 nl80211: 2402-2472 @ 40 MHz 20 mBm nl80211: 2457-2482 @ 40 MHz 20 mBm nl80211: 2474-2494 @ 20 MHz 20 mBm nl80211: 5170-5250 @ 160 MHz 20 mBm nl80211: 5250-5330 @ 160 MHz 20 mBm nl80211: 5490-5730 @ 160 MHz 20 mBm nl80211: Added 802.11b mode based on 802.11g information Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=20 dBm channel 1 is disabled for use in AP mode, flags: 0x57 NO-IBSS PASSIVE-SCAN wlan0: IEEE 802.11 Configured channel (36) not found from the channel list of current mode (2) IEEE 802.11a wlan0: IEEE 802.11 Hardware does not support configured channel Could not select hw_mode and channel. (-3) wlan0: Unable to setup interface. hostapd_interface_deinit_free(0x8076f0) hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1 hostapd_interface_deinit(0x8076f0) hostapd_bss_deinit: deinit bss wlan0 wlan0: Flushing old station entries nl80211: flush -> DEL_STATION wlan0 (all) wlan0: Deauthenticate all stations nl80211: sta_remove -> DEL_STATION wlan0 ff:ff:ff:ff:ff:ff --> -22 (Invalid argument) wpa_driver_nl80211_set_key: ifindex=4 (wlan0) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0 wpa_driver_nl80211_set_key: ifindex=4 (wlan0) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0 wpa_driver_nl80211_set_key: ifindex=4 (wlan0) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0 wpa_driver_nl80211_set_key: ifindex=4 (wlan0) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0 hostapd_cleanup(hapd=0x8082e0 (wlan0)) hostapd_free_hapd_data: Interface wlan0 wasn't started hostapd_interface_deinit_free: driver=0x85208 drv_priv=0x808be0 -> hapd_deinit nl80211: Skip disabling of Probe Request reporting nl_preq=0x88080509 while in AP mode nl80211: Remove monitor interface: refcount=0 nl80211: Remove beacon (ifindex=4) netlink: Operstate: ifindex=4 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP) nl80211: Set mode ifindex 4 iftype 2 (STATION) nl80211: Teardown AP(wlan0) - device_ap_sme=1 use_monitor=1 nl80211: Disable Probe Request reporting nl_preq=0x88080509 hostapd_interface_free(0x8076f0) hostapd_interface_free: free hapd 0x8082e0 hostapd_cleanup_iface(0x8076f0) hostapd_cleanup_iface_partial(0x8076f0) hostapd_cleanup_iface: free iface=0x8076f0 root@ihost:~#

unissoft-bj commented 9 years ago

不稳定 image