1.先执行ps查看,把默认启动的kill掉:
root@TinaLinux:/# ps
969 root 2312 S wpa_supplicant -iwlan0 -Dnl80211 -c/etc/wifi/wpa_sup
987 root 940 R ps
root@TinaLinux:/# kill -9 969
2.填入wifi信息
root@TinaLinux:/# vi /etc/wifi/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/etc/wifi/wpa_supplicant/sockets
update_config=1
network={
ssid=“wifi名”
psk=“密码”
}
3.连接wifi
root@TinaLinux:/# wpa_supplicant -B -c /etc/wifi/wpa_supplicant/wpa_supplicant.conf -i wlan0
root@TinaLinux:/# udhcpc -i wlan0
一连接,就不断地输出Log
root@TinaLinux:/# mkdir -p /var/log/wpa_supplicant
root@TinaLinux:/# wpa_supplicant -B -c /etc/wpa_supplicant.conf -i wlan0
Successfully initialized wpa_supplicant
root@TinaLinux:/# [ 6576.540332] wlan0: authenticate with e4:26:8b:e9:f3:c0 (try 1)
[ 6576.547473] [STA_WRN] [HT40][xradio_join_work][bss_ht_info]:
[ 6576.547473] [primary_chan :0x0000000b]
[ 6576.547473] [ht_param :0x00000000]
[ 6576.547473] [operation_mode:0x00000017]
[ 6576.547473] [stbc_param :0x00000000]
[ 6576.547473] [basic_set[0] :0x00000000]
[ 6576.575586] [STA_WRN] [HT40][xradio_join_work][PhyModeCfg:0x0007]
[ 6576.575586] [ModemFlags :0x00000007]
[ 6576.575586] [ChWidthCfg :0x00000000]
[ 6576.575586] [PriChCfg :0x00000000]
[ 6576.575586] [BandCfg :0x00000000]
[ 6576.575586] [STBC_Enable :0x00000000]
[ 6576.575586] [PreambleCfg :0x00000000]
[ 6576.575586] [SGI_Enable :0x00000000]
[ 6576.575586] GF_Enable :0x00000000]
[ 6576.648897] wlan0: authenticated
[ 6576.653431] wlan0: associate with e4:26:8b:e9:f3:c0 (try 1)
[ 6576.677844] wlan0: RX AssocResp from e4:26:8b:e9:f3:c0 (capab=0x1431 status=0 aid=17)
[ 6576.686994] wlan0: associated
[ 6576.695006] [AP_WRN] [STA] ASSOC HTCAP 11N 58
[ 6576.699901] [AP_WRN] [HT40][xradio_bss_info_changed][ht_prot:0x0000000e][HtProtMode:0x0003][Green:0x0004]
[ 6576.710759] [AP_WRN] [HT40][xradio_bss_info_changed][PhyModeCfg:0x5007]
[ 6576.710759] [ModemFlags :0x00000007]
[ 6576.710759] [ChWidthCfg :0x00000000]
[ 6576.710759] [PriChCfg :0x00000000]
[ 6576.710759] [BandCfg :0x00000000]
[ 6576.710759] [STBC_Enable :0x00000000]
[ 6576.710759] [PreambleCfg :0x00000001]
[ 6576.710759] [SGI_Enable :0x00000001]
[ 6576.710759] [GF_Enable :0x00000000]
[ 6576.783053] wlan0: deauthenticating from e4:26:8b:e9:f3:c0 by local choice (reason=1)
[ 6576.792052] [WSM_WRN] Issue unjoin command(TX).
[ 6576.799211] [WSM_WRN] STA mode, send_deauth_to_self
[ 6576.804785] [TXRX_WRN] Issue unjoin command(TX) by self.
[ 6578.530374] wlan0: authenticate with e4:26:8b:e9:f3:c0 (try 1)
[ 6578.537489] [STA_WRN] [HT40][xradio_join_work][bss_ht_info]:
[ 6578.537489] [primary_chan :0x0000000b]
[ 6578.537489] [ht_param :0x00000000]
[ 6578.537489] [operation_mode:0x00000017]
[ 6578.537489] [stbc_param :0x00000000]
[ 6578.537489] [basic_set[0] :0x00000000]
[ 6578.565421] [STA_WRN] [HT40][xradio_join_work][PhyModeCfg:0x0007]
[ 6578.565421] [ModemFlags :0x00000007]
[ 6578.565421] [ChWidthCfg :0x00000000]
[ 6578.565421] [PriChCfg :0x00000000]
[ 6578.565421] [BandCfg :0x00000000]
[ 6578.565421] [STBC_Enable :0x00000000]
[ 6578.565421] [PreambleCfg :0x00000000]
[ 6578.565421] [SGI_Enable :0x00000000]
[ 6578.565421] GF_Enable :0x00000000]
[ 6578.624374] wlan0: authenticated
[ 6578.628751] wlan0: associate with e4:26:8b:e9:f3:c0 (try 1)
[ 6578.639461] wlan0: RX AssocResp from e4:26:8b:e9:f3:c0 (capab=0x1431 status=0 aid=18)
[ 6578.648631] wlan0: associated
[ 6578.656449] [AP_WRN] [STA] ASSOC HTCAP 11N 58
[ 6578.661344] [AP_WRN] [HT40][xradio_bss_info_changed][ht_prot:0x0000000e][HtProtMode:0x0003][Green:0x0004]
[ 6578.672343] [AP_WRN] [HT40][xradio_bss_info_changed][PhyModeCfg:0x5007]
[ 6578.672343] [ModemFlags :0x00000007]
[ 6578.672343] [ChWidthCfg :0x00000000]
[ 6578.672343] [PriChCfg :0x00000000]
[ 6578.672343] [BandCfg :0x00000000]
[ 6578.672343] [STBC_Enable :0x00000000]
[ 6578.672343] [PreambleCfg :0x00000001]
[ 6578.672343] [SGI_Enable :0x00000001]
[ 6578.672343] [GF_Enable :0x00000000]
[ 6578.716795] [WSM_WRN] wsm_flush_tx:No pengding, but hw_bufs_used=1
[ 6578.746756] wlan0: deauthenticating from e4:26:8b:e9:f3:c0 by local choice (reason=1)
[ 6578.755780] [WSM_WRN] Issue unjoin command(TX).
[ 6578.762772] [WSM_WRN] STA mode, send_deauth_to_self
[ 6578.768254] [TXRX_WRN] Issue unjoin command(TX) by self.
[ 6580.399530] wlan0: authenticate with e4:26:8b:e9:f3:c0 (try 1)
[ 6580.406732] [STA_WRN] [HT40][xradio_join_work][bss_ht_info]:
[ 6580.406732] [primary_chan :0x0000000b]
[ 6580.406732] [ht_param :0x00000000]
[ 6580.406732] [operation_mode:0x00000017]
[ 6580.406732] [stbc_param :0x00000000]
[ 6580.406732] [basic_set[0] :0x00000000]
[ 6580.434660] [STA_WRN] [HT40][xradio_join_work][PhyModeCfg:0x0007]
[ 6580.434660] [ModemFlags :0x00000007]
[ 6580.434660] [ChWidthCfg :0x00000000]
[ 6580.434660] [PriChCfg :0x00000000]
[ 6580.434660] [BandCfg :0x00000000]
[ 6580.434660] [STBC_Enable :0x00000000]
[ 6580.434660] [PreambleCfg :0x00000000]
[ 6580.434660] [SGI_Enable :0x00000000]
[ 6580.434660] GF_Enable :0x00000000]
[ 6580.537369] wlan0: authenticated
[ 6580.541837] wlan0: associate with e4:26:8b:e9:f3:c0 (try 1)
[ 6580.552250] wlan0: RX AssocResp from e4:26:8b:e9:f3:c0 (capab=0x1431 status=0 aid=19)
[ 6580.561315] wlan0: associated
[ 6580.569123] [AP_WRN] [STA] ASSOC HTCAP 11N 58
[ 6580.574109] [AP_WRN] [HT40][xradio_bss_info_changed][ht_prot:0x0000000e][HtProtMode:0x0003][Green:0x0004]
[ 6580.585069] [AP_WRN] [HT40][xradio_bss_info_changed][PhyModeCfg:0x5007]
[ 6580.585069] [ModemFlags :0x00000007]
[ 6580.585069] [ChWidthCfg :0x00000000]
[ 6580.585069] [PriChCfg :0x00000000]
[ 6580.585069] [BandCfg :0x00000000]
[ 6580.585069] [STBC_Enable :0x00000000]
[ 6580.585069] [PreambleCfg :0x00000001]
[ 6580.585069] [SGI_Enable :0x00000001]
[ 6580.585069] [GF_Enable :0x00000000]
[ 6580.652810] wlan0: deauthenticating from e4:26:8b:e9:f3:c0 by local choice (reason=1)
[ 6580.661801] [WSM_WRN] Issue unjoin command(TX).
[ 6580.668021] [WSM_WRN] STA mode, send_deauth_to_self
[ 6580.673549] [TXRX_WRN] Issue unjoin command(TX) by self.
[ 6582.309506] wlan0: authenticate with e4:26:8b:e9:f3:c0 (try 1)
[ 6582.316623] [STA_WRN] [HT40][xradio_join_work][bss_ht_info]:
[ 6582.316623] [primary_chan :0x0000000b]
[ 6582.316623] [ht_param :0x00000000]
[ 6582.316623] [operation_mode:0x00000017]
[ 6582.316623] [stbc_param :0x00000000]
[ 6582.316623] [basic_set[0] :0x00000000]
[ 6582.344560] [STA_WRN] [HT40][xradio_join_work][PhyModeCfg:0x0007]
[ 6582.344560] [ModemFlags :0x00000007]
[ 6582.344560] [ChWidthCfg :0x00000000]
[ 6582.344560] [PriChCfg :0x00000000]
[ 6582.344560] [BandCfg :0x00000000]
[ 6582.344560] [STBC_Enable :0x00000000]
[ 6582.344560] [PreambleCfg :0x00000000]
[ 6582.344560] [SGI_Enable :0x00000000]
[ 6582.344560] GF_Enable :0x00000000]
[ 6582.450135] wlan0: authenticated
[ 6582.454576] wlan0: associate with e4:26:8b:e9:f3:c0 (try 1)
[ 6582.486789] wlan0: RX AssocResp from e4:26:8b:e9:f3:c0 (capab=0x1431 status=0 aid=20)
[ 6582.495994] wlan0: associated
[ 6582.504028] [AP_WRN] [STA] ASSOC HTCAP 11N 58
[ 6582.508922] [AP_WRN] [HT40][xradio_bss_info_changed][ht_prot:0x0000000e][HtProtMode:0x0003][Green:0x0004]
[ 6582.519774] [AP_WRN] [HT40][xradio_bss_info_changed][PhyModeCfg:0x5007]
[ 6582.519774] [ModemFlags :0x00000007]
[ 6582.519774] [ChWidthCfg :0x00000000]
[ 6582.519774] [PriChCfg :0x00000000]
[ 6582.519774] [BandCfg :0x00000000]
[ 6582.519774] [STBC_Enable :0x00000000]
[ 6582.519774] [PreambleCfg :0x00000001]
[ 6582.519774] [SGI_Enable :0x00000001]
[ 6582.519774] [GF_Enable :0x00000000]
[ 6582.689604] wlan0: deauthenticating from e4:26:8b:e9:f3:c0 by local choice (reason=1)
[ 6582.698630] [WSM_WRN] Issue unjoin command(TX).
[ 6582.742818] [WSM_WRN] STA mode, send_deauth_to_self
[ 6582.748316] [TXRX_WRN] Issue unjoin command(TX) by self.
[ 6593.838480] wlan0: authenticate with e4:26:8b:e9:f3:c0 (try 1)
[ 6593.845626] [STA_WRN] [HT40][xradio_join_work][bss_ht_info]:
[ 6593.845626] [primary_chan :0x0000000b]
[ 6593.845626] [ht_param :0x00000000]
[ 6593.845626] [operation_mode:0x00000017]
[ 6593.845626] [stbc_param :0x00000000]
[ 6593.845626] [basic_set[0] :0x00000000]
[ 6593.873586] [STA_WRN] [HT40][xradio_join_work][PhyModeCfg:0x0007]
[ 6593.873586] [ModemFlags :0x00000007]
[ 6593.873586] [ChWidthCfg :0x00000000]
[ 6593.873586] [PriChCfg :0x00000000]
[ 6593.873586] [BandCfg :0x00000000]
[ 6593.873586] [STBC_Enable :0x00000000]
[ 6593.873586] [PreambleCfg :0x00000000]
[ 6593.873586] [SGI_Enable :0x00000000]
[ 6593.873586] GF_Enable :0x00000000]
[ 6593.937060] wlan0: authenticated
[ 6593.941470] wlan0: associate with e4:26:8b:e9:f3:c0 (try 1)
[ 6593.958563] wlan0: RX AssocResp from e4:26:8b:e9:f3:c0 (capab=0x1431 status=0 aid=21)
[ 6593.967719] wlan0: associated
[ 6593.975792] [AP_WRN] [STA] ASSOC HTCAP 11N 58
[ 6593.980694] [AP_WRN] [HT40][xradio_bss_info_changed][ht_prot:0x0000000e][HtProtMode:0x0003][Green:0x0004]
[ 6593.991554] [AP_WRN] [HT40][xradio_bss_info_changed][PhyModeCfg:0x5007]
[ 6593.991554] [ModemFlags :0x00000007]
[ 6593.991554] [ChWidthCfg :0x00000000]
[ 6593.991554] [PriChCfg :0x00000000]
[ 6593.991554] [BandCfg :0x00000000]
[ 6593.991554] [STBC_Enable :0x00000000]
[ 6593.991554] [PreambleCfg :0x00000001]
[ 6593.991554] [SGI_Enable :0x00000001]
[ 6593.991554] [GF_Enable :0x00000000]
[ 6594.071230] wlan0: deauthenticating from e4:26:8b:e9:f3:c0 by local choice (reason=1)
[ 6594.080247] [WSM_WRN] Issue unjoin command(TX).
[ 6594.086684] [WSM_WRN] STA mode, send_deauth_to_self
[ 6594.092223] [TXRX_WRN] Issue unjoin command(TX) by self.