使用 命令svc wifi来调试,避免使用GUI

相关资料  https://community.freescale.com/thread/319407

D/WifiService( 313): setWifiEnabled: true pid=892, uid=1000

在源码目录下 frameworks/base/services/java/com/android/server/WifiService.java

public synchronized boolean setWifiEnabled(boolean enable) {

enforceChangePermission();
     Slog.d(TAG, "setWifiEnabled: " + enable + " pid=" + Binder.getCallingPid()
     + ", uid=" + Binder.getCallingUid());
    if (DBG) {
   Slog.e(TAG, "Invoking mWifiStateMachine.setWifiEnabled\n");
   }

if (enable) {
      reportStartWorkSource();
    }
    mWifiStateMachine.setWifiEnabled(enable);

........................................................................................

public void setWifiEnabled(boolean enable) {
mLastEnableUid.set(Binder.getCallingUid());
if (enable) {
/* Argument is the state that is entered prior to load */
sendMessage(obtainMessage(CMD_LOAD_DRIVER, WIFI_STATE_ENABLING, 0));
sendMessage(CMD_START_SUPPLICANT);
} else {
sendMessage(CMD_STOP_SUPPLICANT);
/* Argument is the state that is entered upon success */
sendMessage(obtainMessage(CMD_UNLOAD_DRIVER, WIFI_STATE_DISABLED, 0));
}
}

.........................................................................................

/*
   * Caller might not have WRITE_SECURE_SETTINGS,
   * only CHANGE_WIFI_STATE is enforced
  */

long ident = Binder.clearCallingIdentity();
  try {
    handleWifiToggled(enable);
  } finally {

Binder.restoreCallingIdentity(ident);
  }

if (enable) {
   if (!mIsReceiverRegistered) {
   registerForBroadcasts();
   mIsReceiverRegistered = true;
  }
  } else if (mIsReceiverRegistered) {
    mContext.unregisterReceiver(mReceiver);
    mIsReceiverRegistered = false;
   }

return true;
 }

D/BluetoothAdapter( 892): 1103147976: getState() : mService = null. Returning STATE_OFF

D/Tethering( 313): sendTetherStateChangedBroadcast 1, 0, 0

D/WifiStateMachine( 313): CMD_START_SUPPLICANT

E/NetdConnector( 313): NDC Command {11 softap fwreload wlan0 STA} took too long (538ms)

E/WifiStateMachine( 313): Failed to reload STA firmware java.lang.IllegalStateException: command '35 softap fwreload wlan0 STA' failed with '400 35 Softap operation failed (Cannot assign requested address)'

frameworks/base/wifi/java/android/net/wifi/WifiStateMachine.java

DriverLoadedState 

case CMD_START_SUPPLICANT:
Slog.d(TAG,"CMD_START_SUPPLICANT");

try {
mNwService.wifiFirmwareReload(mInterfaceName, "STA");
} catch (Exception e) {
loge("Failed to reload STA firmware " + e);
// continue
}

...........................................................................................

./base/services/java/com/android/server/NetworkManagementService.java

public void wifiFirmwareReload(String wlanIface, String mode) {
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
try {
mConnector.execute("softap", "fwreload", wlanIface, mode);
} catch (NativeDaemonConnectorException e) {
throw e.rethrowAsParcelableException();
}
}

.............................................................................................

W/SocketClient( 64): write error (Broken pipe)

D/CommandListener( 64): Setting iface cfg

D/CommandListener( 64): Trying to bring down wlan0

I/wpa_supplicant( 926): Successfully initialized wpa_supplicant

I/wpa_supplicant( 926): rfkill: Cannot open RFKILL control device

D/Tethering( 313): InitialState.processMessage what=4
D/Tethering( 313): sendTetherStateChangedBroadcast 0, 0, 0
I/wpa_supplicant( 926): rfkill: Cannot open RFKILL control device
E/wpa_supplicant( 926): nl80211: Could not configure driver to use managed mode
E/wpa_supplicant( 926): Could not read interface p2p0 flags: No such device
E/wpa_supplicant( 926): p2p0: Failed to initialize driver interface
I/wpa_supplicant( 926): wlan0: CTRL-EVENT-TERMINATING
E/WifiHW ( 313): Supplicant not running, cannot connect
E/WifiHW ( 313): Supplicant not running, cannot connect
E/WifiHW ( 313): Supplicant not running, cannot connect
E/WifiHW ( 313): Supplicant not running, cannot connect
E/WifiHW ( 313): Supplicant not running, cannot connect

解决不能打开wifi问题的更多相关文章

  1. Windows 8 关闭无线后无法打开WIFI的解决办法

    转:http://blog.sina.com.cn/s/blog_49d02ed101016b4n.html 在使用 Windows 8 的过程中,遇到过几次使用键盘上的功能键(笔者笔记本上的快捷键是 ...

  2. [双系统linux] ----安装完成后无法打开wifi

    在安装了linux 双系统以后发现无法打开wifi和蓝牙. rfkill list all 0:ideapad_wlan: Wireless LANSoft blocked: noHard block ...

  3. 解决stackoverflow打开慢不能注册登录

    http://blog.csdn.net/dream_an/article/details/50280977 解决stackoverflow打开慢不能注册登录 标签: stack overflowfi ...

  4. 解决每次打开office 2010显示正在配置的问题

    解决每次打开office 2010显示正在配置的问题 OFFICE 2010 MSDN版出来后,下载安装 ,启动后发现每次打开都会出现“正在配置”的进度,删除重装亦不成功,对SETUP.EXE改名也不 ...

  5. 解决pdm打开只显示表名不显示字段的步骤

    解决pdm打开只显示表名不显示字段的方法 选中PDM 依次点击 工具-->显示参数选择-->content 下面的table ,右边勾选上columns 点击OK 选择 all symbo ...

  6. Android打开WIFI或者移动网络的代码实现

    MainActivity如下: package wy.testnetwork; import java.lang.reflect.Field; import java.lang.reflect.Inv ...

  7. WordPress使用360CDN替换google服务,解决WordPress打开速度变慢问题

    由于wordpress新版本中默认使用了一些google服务及google字体,由于google在天朝中的一些你懂的原因,造成wordpress在打开时被拖慢,这时可以用360推出的公共库CDN服务替 ...

  8. wind10系统 Atheros AR9271 Wireless Network Adapter USBwifi无线网卡的驱动安装解决无法搜索wifi信号,连接wifi信号无法上网的问题

    一.解决无法搜索wifi信号的问题 卸载掉之前的驱动,上网下载其他的驱动程序安装. http://drivers.mydrivers.com/drivers/463_185289.htm 二.安装完后 ...

  9. 解决 Excel 打开 UTF-8 编码 CSV 文件乱码的 BUG

    解决 Excel 打开 UTF-8 编码 CSV 文件乱码的 BUG zoerywzhou@163.com http://www.cnblogs.com/swje/ 作者:Zhouwan 2017-6 ...

随机推荐

  1. FZU 2193 So Hard

    #include<cstdio> #include<cstring> #include<cmath> #include<algorithm> using ...

  2. GreenPlum学习之(Share-nothing)架构

    当今世界是一个信息化的世界,我们的生活中无论是生活.工作.学习都离不开信息系统的支撑.而信息系统的背后用于保存和处理最终结果的地方就是数据库.因此数据库系统就变得尤为重要,这意味着如果数据库如果面临问 ...

  3. html中的a标签的target属性的四个值的区别?

    target属性规定了在何处打开超链接的文档. 如果在一个 <a> 标签内包含一个 target 属性,浏览器将会载入和显示用这个标签的 href 属性命名的.名称与这个目标吻合的框架或者 ...

  4. asp.net CROSS-PAGE POSTING

    有两个页面page1和page2.page1中有两个按钮 <asp:Button ID="Button1" runat="server" Text=&qu ...

  5. POJ 3070 矩阵快速幂解决fib问题

    矩阵快速幂:http://www.cnblogs.com/atmacmer/p/5184736.html 题目链接 #include<iostream> #include<cstdi ...

  6. Java Object 对象拷贝答疑

    Java Object 对象拷贝答疑 @author ixenos 摘要:在对象的clone过程需要注意的几点.关于关键字this.super 关于clone[对象拷贝] 在实际编程过程,有时候我们会 ...

  7. Twitter Storm源代码分析之Nimbus/Supervisor本地目录结构

    storm集群里面工作机器分为两种一种是nimbus, 一种是supervisor, 他们通过zookeeper来进行交互,nimbus通过zookeeper来发布一些指令,supervisor去读z ...

  8. 转Rollback后undo到底做了些什么?

    转自:http://biancheng.dnbcw.info/oracle/309191.html Rollback后undo到底做了些什么? 从概念上讲,undo正好与redo相对.当你对数据执行修 ...

  9. css样式的部分拓展, NuMber对象、 BoM、 DoM对象的模型的间述,ing...

    css部分代码 <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> < ...

  10. mysql灵活分页存储过程

    ), -- 表名 ), -- 排序字段(必须!支持多字段不用加order by) IN _PageIndex int, -- 指定当前为第几页 IN _PageSize int, -- 每页多少条记录 ...