I.MX6 wpa_cli 使用
/***********************************************************************
* I.MX6 wpa_cli 使用
* 说明:
* 在调试Android wifi功能之前,先要保证wpa_supplicant调试是正常才行,
* 否者都很难确定到底那一层的软件出了问题。
*
* 2016-6-28 深圳 南山平山村 曾剑锋
**********************************************************************/ 一、参考文档:
. 用wpa_cli 连接无线网络
http://blog.163.com/qk_zhu/blog/static/195076154201132081536347/
. wpa_cli 连接 wifi
http://www.cnblogs.com/lidabo/p/4660206.html 二、shell command:
. wpa_supplicant -iwlan0 -Dnl80211 -c/etc/wifi/wpa_supplicant.conf &
. wpa_cli -i wlan0 -p /data/misc/wifi/sockets 三、wpa_cli command:
. scan
. scan_results
. add_network
. set_network ssid "androidap"
. set_network key_mgmt NONE
. select_network
. enable_network 四、示例:
root@android:/ # wpa_cli -i wlan0 -p /data/misc/wifi/sockets
wpa_cli v2.-devel-4.2.2_rtw_r8680.
Copyright (c) -, Jouni Malinen <j@w1.fi> and contributors This software may be distributed under the terms of the BSD license.
See README for more details. Interactive mode > scan
OK
<>CTRL-EVENT-STATE-CHANGE id=- state= BSSID=::::: SSID=
<>CTRL-EVENT-SCAN-RESULTS
<>WPS-AP-AVAILABLE
<>CTRL-EVENT-STATE-CHANGE id=- state= BSSID=::::: SSID=
> scan_results
bssid / frequency / signal level / flags / ssid
ec::ca:e1:6b: - [WPA-PSK-CCMP][WPA2-PSK-CCMP][ESS] Aplex-AP
:b0:c6:0f::b0 - [WPA2-PSK-CCMP][ESS] Aplex-AP3
8c:be:be:::d2 - [WPA2-PSK-CCMP][ESS] Aplex_C
d0:fa:1d:::7b - [WPA-PSK-CCMP][WPA2-PSK-CCMP][ESS] SZSD
:b0:c6:4f:: - [WPA-PSK-CCMP][WPA2-PSK-CCMP][ESS] DXYP-
:fb:b2::bb: - [WPA-PSK-CCMP][WPA2-PSK-CCMP][ESS] TP-LINK-
c0:::fc::a1 - [WPA-PSK-CCMP][WPA2-PSK-CCMP][ESS] ZLY-TECH
::::e8:e1 - [WPA-PSK-TKIP+CCMP][WPA2-PSK-TKIP+CCMP][ESS]SZSD
:::ce:: - [WPA2-PSK-CCMP][WPS][ESS] sjb
f0:b4:::1d:f1 - [WPA2-PSK-CCMP][ESS] Xiaomi_888
a0:f3:c1::: - [WPA2-PSK-TKIP+CCMP][ESS] TP-LINK_952236
b0:d5:9d::: - [WPA2-PSK-CCMP][ESS] huo
f8:e9::b7::8a - [WPA-PSK-CCMP][WPA2-PSK-CCMP][WPS][ESS] laser309
::::8b: - [WPA-PSK-CCMP][WPA2-PSK-CCMP][ESS] \xe5\x85\x8d\xe8\xb4\xb9WiFi-
ec::ca::d1:f6 - [ESS] TP-LINK_D1F6
::::7d: - [ESS] androidap
> add_network > set_network ssid "androidap"
OK
> set_network key_mgmt NONE
OK
> select_network
OK
<>CTRL-EVENT-STATE-CHANGE id= state= BSSID=::::: SSID=androidap
> RTL871X: rtw_set_802_11_connect(wlan0) fw_state=0x00000008
<>CTRL-EVENT-SCAN-RESULTS
<>WPS-AP-AVAILABLE
<>Trying to associate with ::::7d: (SSID='androidap' freq= MHz)
<>CTRL-EVENT-STATE-CHANGE id= state= BSSID=::::: SSID=androidap
> RTL871X: start auth
RTL871X: auth success, start assoc
RTL871X: assoc success
<>CTRL-EVENT-STATE-CHANGE idADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
= state= BSSID=::::: SSID=androidap
<>Associated with ::::7d:
<>CTRL-EVENT-CONNECTED - Connection to ::::7d: completed (auth) [id= id_str=]
<>CTRL-EVENT-STATE-CHANGE id= state= BSSID=::::7d: SSID=androidap
> enable_entwork
Unknown command 'enable_entwork'
> enable_entworwlan0: no IPv6 routers present
> enable_network
OK
> q
root@android:/ # dhcpcd wlan0
dhcpcd[]: version 5.5. starting
dhcpcd[]: wlan0: rebinding lease of 192.168.43.34
dhcpcd[]: wlan0: acknowledged 192.168.43.34 from 192.168.43.1
dhcpcd[]: wlan0: checking for 192.168.43.34
dhcpcd[]: wlan0: leased 192.168.43.34 for seconds
dhcpcd[]: forked to background, child pid
root@android:/ # ping 14.215.177.37
PING 14.215.177.37 (14.215.177.37) () bytes of data.
bytes from 14.215.177.37: icmp_seq= ttl= time= ms
bytes from 14.215.177.37: icmp_seq= ttl= time=47.8 ms
bytes from 14.215.177.37: icmp_seq= ttl= time=91.4 ms
bytes from 14.215.177.37: icmp_seq= ttl= time=63.5 ms
^C
--- 14.215.177.37 ping statistics ---
packets transmitted, received, % packet loss, time 4007ms
rtt min/avg/max/mdev = 47.865/106.898/224.694/69.780 ms
root@android:/ #
I.MX6 wpa_cli 使用的更多相关文章
- I.MX6 AW-NB177NF wifi HAL 调试修改
/************************************************************************* * I.MX6 AW-NB177NF wifi H ...
- 【转】wpa_supplicant与wpa_cli之间通信过程
[转]wpa_supplicant与wpa_cli之间通信过程 转自:http://blog.chinaunix.net/uid-26585427-id-4051479.html wpa_suppli ...
- I.MX6 initramfs.cpio.gz.uboot unpack
/********************************************************************************* * I.MX6 initramfs ...
- I.MX6 eMMC 添加分区
/********************************************************************************* * I.MX6 eMMC 添加分区 ...
- I.MX6 WIFI wireless_tools 移植
/******************************************************************************** * I.MX6 WIFI wirel ...
- I.MX6 KEY_ROW4 can't as GPIO pin
/********************************************************************** * I.MX6 KEY_ROW4 can't as GP ...
- I.MX6 console 跳过 login
/*************************************************************************** * I.MX6 console 跳过 logi ...
- I.MX6 Android 5.1 快速合成系统
/**************************************************************************** * I.MX6 Android 5.1 快速 ...
- I.MX6 ubuntu-core-14.04 Apache php mysql Qt5
/*************************************************************************** * I.MX6 ubuntu-core-14. ...
随机推荐
- 一个抓取智联招聘数据并存入表格的python爬虫
talk is cheap...show you the code..... import requests import lxml,time,os from bs4 import Beautiful ...
- 【Ts 2】Nginx服务器搭建
在项目中,首先是需要Nginx服务器作为一个图片服务器来使用.那么,久涉及到服务器的搭建.这次服务器的搭建,主要是在三个环境上进行了学习:CentOS6.2,CentOS7,和Ubuntu16.那么本 ...
- python中的“坑”—持续更新
1.判断是否是回文 def is_back(s): ]==(s if s.strip() else False) print(is_back('上海自来水来自海上')) print(is_back(' ...
- PHP目录文件遍历
<meta charset="utf-8"><?php //遍历文件中的所有文件名称 foreach(glob("phpmyadmin/*") ...
- ie6 js报错汇总
假如ie6是一个非美女的人,那不知道为多少人乱刀砍多少次,假如不幸它是一个美女,那不知道要被多少人轮奸完之后还是乱刀砍死. ie6的js的错误说明总是很隐晦的,它喜欢和捉迷藏.报的行数和错误,常常不知 ...
- HDU 6076 (动态规划)
HDU 6076 Security Check Problem : 有两个长度为n的队列过安检,每个人有一个特征值.如果两个队列中的第一个人的特征值之差小于等于k,那么一次只能检查其中一个人,否则一次 ...
- PatentTips - Wear Leveling for Erasable Memories
BACKGROUND Erasable memories may have erasable elements that can become unreliable after a predeterm ...
- mySQL windows 服务
https://www.jizhuba.com/kejiyouxi/20171001/6006.html
- BUPT2017 springtraining(16) #1 题解
https://vjudge.net/contest/162590 A: 不难发现,当L=R时输出L,当L<R时输出2. B: 贪心得配对.1和n配 2和n-1配,对与对直接只要花1个代价就可以 ...
- 10-JS的函数学习
<html> <head> <title>js的函数学习</title> <meta charset="UTF-8"/> ...