WiFi错误:“无法连接到网络” -- wi-fi 领域 和 samsung-galaxy-nexus 领域 和 4.1-jelly-bean 领域 和 troubleshooting 领域 android 相关 的问题

WiFi Error: “Failed to connect to network”


8
vote

问题

中文

间歇性地,当我尝试连接到WiFi网络时,我将以下错误消息作为Toa​​st消息:

无法连接到网络

在尝试连接时立即弹出消息,因此显然它没有尝试和失败。我没有找到日志中的任何错误。受影响的网络是我以前连接的那些没有变化的设置。

如何弄清楚问题是什么?

我有一个rooted galaxy nexus运行Android 4.1.1和Stock Rom。这个问题与我发布的另一个问题,但这更像如何找到如何找到的来源特定的错误消息,因此其焦点是不同的。

其他详细信息

此处是根据评论的更多详细信息:

  • 我在我的家庭和工作网络上观察到这一点。一个被识别为WPA2 PSK,另一个被识别为WPA / WPA2 PSK。

  • 我没有按照故障排除指南

  • 忘记网络并重新添加它没有效果。事实上,如果我忘记了网络,我无法再加入它。

  • 无线密码没有改变。

  • 在我上无线时没有配置代理。但是,当我在数据连接时,我运行Onavo延伸。禁用它没有效果。

  • 我已从DHCP切换到静态IP地址。这样做降低了问题的频率,似乎已经消除了我之前的问题,其中WiFi将随机丢弃。

  • wifi睡眠设置为"仅在插入时" 。我不认为这是相关的,因为我的问题首先建立连接(例如当我在家或在工作时到达时),而不是维持一个。

请注意,尽管所有这些故障排除步骤,我的初始目标是找到一个实际的错误消息或日志条目,其提供有关问题的有用信息。

英文原文

Intermittently, when I try to connect to a WiFi network, I get the following error message as a toast message:

Failed to connect to network

The message pops up immediately upon attempting to connect, so clearly it isn't trying and failing. I haven't found any mention of an error in the logs. The affected networks are ones that I've previously connected to with no change in settings.

How can I figure out what the problem is?

I've got a rooted Galaxy Nexus running Android 4.1.1 and the stock ROM. This question is related to another question that I posted earlier, but this one is more about how to find the source of a particular error message, so its focus is different.

Additional Details

Here are some more details based on the comments:

  • I've observed this on my home and work networks. One is identified as WPA2 PSK and the other is identified as WPA/WPA2 PSK.

  • I haven't powered off the phone as described in the troubleshooting guide mentioned in the comments. However, I have rebooted to no avail (using the reboot command that's available on rooted phones).

  • Forgetting the network and re-adding it has no effect. In fact, if I forget the network I can no longer successfully re-add it.

  • The wireless password hasn't changed.

  • There's no proxy configured when I'm on wireless. However, I run Onavo Extend when I'm on a data connection. Disabling it has no effect.

  • I've switched from DHCP to static IP addresses. Doing so reduced the frequency of problems and seems to have eliminated my earlier issue where wifi would be randomly dropped.

  • Wifi sleep is set to "Only when plugged in." I don't think it's relevant because my issue is establishing a connection in the first place (such as when I arrive at home or at work), not maintaining one.

Note that despite all these troubleshooting steps,my initial goal is to find an actual error message or log entry that gives useful information about the problem.

           
         
         

回答列表

3
 
vote

您是否安装了自定义恢复?我在Galaxy S2上有两次问题,每次运行来自恢复模式的权限修复了我的问题。

如果这不起作用,请尝试删除您的WiFi配置文件。不确定它在nexus上是什么,但我猜这将是 /data/misc/wifi/wpa_supplicant.conf /data/misc/wifi/wpa.conf 的东西。显然,在删除任何内容之前,您应该备份。请注意,如果您这样做,您将丢失所有WiFi设置。

 

Do you have custom recovery installed? I have had this problem twice on a Galaxy S2, and what fixed it for me every time was running a permissions fix from recovery mode.

If that doesn't work, try deleting your WiFi config file. Not sure what it is on the Nexus, but I'm guessing it'll be something along the lines of /data/misc/wifi/wpa_supplicant.conf or /data/misc/wifi/wpa.conf. Obviously you should make backups before deleting anything. Note that you'll lose all your WiFi settings if you do this.

 
 
         
         
1
 
vote

我认为这部分问题是关键:

我已从DHCP切换到静态IP地址。这样做降低了问题的频率,似乎已经消除了我之前的问题,其中WiFi将随机丢弃。

IP寻址问题肯定会导致您这样的烦恼。静态寻址只是治疗症状,不治疗疾病。假设您连接的APS尚未更改其DHCP设置,请侧重于调查手机如何充当DHCP客户端。我找到了一个错误报告其中,其中几个用户报告了相同的你有麻烦(作者实际引用您以前的问题之一)。其中一个评论者找到了与DHCP相关的日志条目 ;您在评论中提到您没有找到任何相关日志条目,但您是否看到任何类似于此评论员的?

4月1日05:26:12未知守护进程.Info dnsmasq-dhcp [522]:DhcpRequest(BR0)192.168.200.225 A0:0B:BA:83:65:32

4月1日05:26:12未知守护进程.info dnsmasq-dhcp [522]:Dhcpnak(BR0)192.168.200.225 A0:0B:BA:83:65:32错误地址

另外,一个后来的评论者发现了DHCP客户端服务 dhcpcd 在他的设备上未运行。他解释说:

我开始研究一下,使用旧的Linux控制台和"PS" 命令。我注意到:

  • 每次无法连接,DHCPCD都没有运行。
  • 至少有几次,Kingsoft Office进程在出现问题时运行。

所以,我所做的是:

  • 卸载的金匠办公室,
  • 在我经常使用的所有网络上切换到静态IP(家庭,工作,朋友,家庭)。我还禁用了WiFi电源管理(阅读 在某个地方可以提供帮助)。

之后,问题消失了。它是 现在已经过了2个星期了!

他发现DHCP客户服务的缺失与他的一个应用程序相关联。重新配置您的设备以使用DHCP,尝试连接到一个问题的AP,然后使用终端仿真器(或类似)通过键入命令 ps | grep dhcp 来运行他做的同一调查。输出应该如下所示:

dhcp 4858 1 924 552 ffffffff 00000000 S /system/bin/dhcpcd

这意味着 dhcpcd 进程正在运行。如果 dhcpcd 未运行,则只需返回任何内容。如果是这样的话,再次键入 ps 以获取所有当前进程的列表。您是否介绍了已安装的应用程序之间的任何相关性以及您拥有的问题?作为临时的工作,尝试通过键入 sudo dhcpcd 再次尝试开始服务,然后重试连接。

 

I think this part of your question is key:

I've switched from DHCP to static IP addresses. Doing so reduced the frequency of problems and seems to have eliminated my earlier issue where wifi would be randomly dropped.

IP addressing issues could certainly cause you troubles like this. Static addressing is only treating the symptoms, though, not curing the disease. Assuming the APs you're connecting to haven't had their DHCP settings changed, focus on investigating how your phone is acting as a DHCP client. I found a bug report in which several users report the same trouble you're having (the author actually references one of your previous questions). One of the commenters found log entries related to DHCP; you mentioned in a comment that you didn't find any relevant log entries but did you see any that look like this commenter's?

Apr 1 05:26:12 unknown daemon.info dnsmasq-dhcp[522]: DHCPREQUEST(br0) 192.168.200.225 a0:0b:ba:83:65:32

Apr 1 05:26:12 unknown daemon.info dnsmasq-dhcp[522]: DHCPNAK(br0) 192.168.200.225 a0:0b:ba:83:65:32 wrong address

Additionally, a later commenter found that the DHCP client service dhcpcd was not running on his device. He explains:

I started researching a bit, using good old Linux console and "ps" command. I noticed that:

  • every time I could not connect, dhcpcd was not running.
  • at least several times, Kingsoft Office process was running when the problem appeared.

So, what I did was:

  • uninstalled Kingsoft Office,
  • switch to static IP on all networks I use often (home, work, friends, family). I also disabled WiFi power management (read somewhere that it could help).

After these, problem disappeared. It's been gone for 2 weeks now!

He found that the DHCP client service's absence was correlated with one of his apps. Reconfigure your device to use DHCP, try to connect to one of the problem APs, then use Terminal Emulator (or similar) to run the same investigation he did by typing the command ps | grep dhcp. The output should look something like the following:

dhcp 4858 1 924 552 ffffffff 00000000 S /system/bin/dhcpcd

This means that the dhcpcd process is running. If dhcpcd is not running, you'll simply be returned nothing. If that's the case, type ps again to get a list of all current processes. Do you notice any correlations between an app you've installed and the problems you're having? As a temporary work-around, trying starting the service again by typing sudo dhcpcd, then try again to connect.

 
 
0
 
vote

我设法循环,如果没有解决,手头的问题。

简而言之,我安装了 wifi ruler - free ,它覆盖库存WiFi连接经理。

这允许我单击并连接到我遇到的任何AP,没有问题。

它确实是其他东西的负载,最后我可以阻止我的手机连接到我的邻居令人难以置信的强大的WiFi。

希望这有帮助。

 

I managed to work round, if not resolve, the issue at hand.

In short I installed Wifi Ruler - Free, which overrides the stock wifi connection manager.

This allows me to click and connect to any AP that I come across with no issue.

It does loads of other stuff, finally I can prevent my phone from connecting to my neighbours incredibly strong open wifi.

Hope this helps.

 
 
0
 
vote

检查是否有设置移动数据限制。我知道我的三星谷歌Nexus maguro的奇怪我删除了极限,wifi返回正常。

但是,我在Nexus 7 Gouper上发出了同样的问题,我尝试了网上的各种应用和技巧。但最后我不得不刷新氰基od以获得WiFi的工作。
 

Check to see if you have set mobile data limit. I know it's weird on my samsung Google nexus maguro I removed the limit and wifi returned back to normal.

However I had the same issue on Nexus 7 grouper, I tried various apps and tricks on the net. But finally I had to reflash the Cyanogenmod to get wifi working on it.

 
 
-1
 
vote

我之前给了这个答案到了一个断开的查询,但这里有一些谐振。

我想我可以猜出正在发生的事情。当我第一次开始使用免费热点时,我没有问题,并且通常他们将有一个登录屏幕来插入区域设置密码。然而,有些地方,如酒店似乎在没有登录的情况下免费访问有限的时间或首次使用,然后他们将希望您注册。

当我第二次返回这些地方时,我发现手机找到网络并要求连接,但每次使用都会返回网络错误或似乎连接并被切断。事实上,我正在重新排队到他们的登录页面,只有它似乎常常在姜饼的背景中打开,所以你不知道它正在发生。

摆弄后,您有时可以获得登录页面来显示,然后注册。通常我只能通过尝试谷歌搜索来执行此操作。谷歌以某种方式似乎知道通过登录页面路线,而其他应用程序播放无知。"

 

I gave this answer to a disconnection query earlier but there is some resonance here.

I think I can guess what is happening. When I first started using free hotspots I was connecting with no problem and often they will have a logon screen to insert the locale password. Some places however like hotels seem to give free access for a limited time or for first use without logging in and then later they will expect you to register.

When I have returned to these places a second time I find that the phone finds the network and claims to be connected but every use returns a network error or appears to connect and get cut off. In fact I am getting rerouted to their logon page, only it seems to often only open in background in gingerbread so you don't know it is happening.

After fiddling around you can sometimes get the logon page to show and then register. Often I can only do this by attempting a google search. Google somehow seems to know to route via the logon pages whereas other apps play ignorant."

 
 
 
 
-2
 
vote

尝试重新启动手机,重新启动后会再次找到它。

 

Try to reboot your phone, you will find it again after rebooting.

 
 
 
 
-2
 
vote

我有同样的问题。我发现它必须使用我的简单电池保护程序。搞乱了设置,它立即连接。

 

I had the same issue. I found it had to to with my Easy Battery Saver app. Messed around with the settings and it immediately connected.

 
 
 
 

相关问题

0  如何将红乐射击在飞机模式中?  ( How to put the kindle fire in airplane mode ) 
我使用Amazon Kindle Fire (Android 2.3.4)型号: D01400 FCCID:ZEV-1229 。我在开发Android应用程序中使用此设备。 在我的设备中,WiFi可用,以及用于安全目的的Cyber​​oam。我想测试设备连接或未与WiFi连接。 我知道如果您想检查网络连接,并且您有...

0  通过WiFi播放来自另一个Android设备的视频  ( Play videos from another android device over wifi ) 
有没有办法通过WiFi连接(系束/直接)播放视频?我正在使用缺少SD卡插槽的Nexus 9。因此,我想从我的Android手机中播放有足够空间的视频。因为我需要它的假期,它应该是一个离线解决方案。我发现的解决方案仅提供将文件从一个设备复制到另一个设备(Airdroid,Xender,Wifi上的机器人)。是否有任何流...

0  当附近WiFi热点时,手机停止使用3G  ( Phone stops using 3g when wifi hotspot nearby ) 
我对最新的合法固件有HTC愿望。我有wifi和3g,它通常很好;在家里它连接到我的(WPA2受保护的)路由器,当我走出时切换到3G。但有时,当我通过其他WiFi热点时,它会使用3G停止,所以我丢失了数据。我禁用了"告诉我开放WiFi" 选项。我不确定这些wifi热点是否是打开或加密的,但真的我只想使用我输入的WiFi...

0  连接到WiFi时使用蜂窝  ( Use cellular when connected to wifi ) 
是否有可能强制连接到WiFi时使用蜂窝数据使用蜂窝数据。对于ios我发现了这个 https://苹果.stackexchange.com /问题/ 173894 / can-i-connect-to-wifi-hand-start-meast-cellular 问候, nils ...

2  WiFi连接有时然后断开连接,然后从未连接  ( Wifi connects for sometimes then disconnects and then never connects ) 
当我第一次买它时,他们是我手机中的WiFi的一个大问题... 我的手机是一个 spice stellar mi-439,Android Kitkat V4.4.2,1Ghz处理器,512RAM,4GB内部,目前16GB可扩展。 问题是WiFi连接在我打开WiFi并输入WiFi网络但在浏览的某个时间后断开连接,即使也...

12  WiFi在睡眠期间断开连接  ( Wifi disconnects during sleep ) 
我最近注意到,当我睡觉后我会使用手机时,WiFi不会连接,它必须连接。我进入了高级WiFi设置,确保"睡眠期间保持Wi-Fi" 被设置为"始终" ,但问题仍然存在。任何想法? 我有一个htc一个和& t。 更新#1:通过三种不同的HTC Techs进行故障排除。最后一次努力是清除引导分区缓存和出厂重置手机。然...

0  设备不再连接到Wi-Fi网络  ( Device no longer connecting to wi fi network ) 
我有一个三星Galaxy核心2,过去两年。它正在工作正常,但突然间手机中的WiFi不起作用。相反,它显示"已保存和安全" 但未连接。我该怎么办? ...

0  Android Nougat 7.0 WiFi互联网之后〜10MB后  ( Android nougat 7 0 wifi internet drops after 10mb ) 
首先有一点背景 如下所示,与我裸露,应该是相关的。 我目前有一个htc 10,我的父亲也是如此。我的手机我从eBay购买,它带来了Nougat(7.0)更新已安装(让我们拨打电话1)。我的爸爸手机直接来自HTC,安装了棉花糖(电话2)。两种设备都是相同的工厂解锁emea版本的手机。 在"电话1" 上我没有Wi-Fi问...

8  只能自动连接到某些Wi-Fi网络  ( Only automatically connect to certain wi fi networks ) 
我对Android 2.2有HTC欲望。 我的问题是,可以在附近有开放的Wi-Fi网络,需要密码一旦连接,例如,在咖啡店的热点。我的手机连接到这些,从而阻止了3G连接。 我想做的是始终使用3g,除非我在范围内,并连接到某些Wi-Fi网络的列表。 ...

1  中兴刀片无法维护WiFi连接  ( Zte blade cant maintain a wifi connection ) 
我有一个带有Android 2.3.7(Cyanogenmod 7.1)的中兴刀片。最近,当我尝试连接到WiFi网络时(甚至在这个问题开始前工作)开始连接,尝试自闭断,然后断开连接。 这里的一部分logcat 12-03 00:18:23.370: DEBUG/WifiStateTracker(191): Re...

0  无法通过某些WiFi网络连接到互联网  ( Cannot connect to internet via certain wifi networks ) 
我的lg g3最近开始采取行动,因为它将无法通过我的家庭wifi访问互联网。我可以在其他WiFi网络上连接到互联网,因此我认为这不一定是手机的问题。但是,我可以将其他设备连接到我的家中WiFi并访问互联网而没有任何问题,这意味着网络没有任何问题。我的手机连接到WiFi网络,它无法进入互联网。 lg g3 Andr...

0  在同一终端上显示“adb status-window”和“adb logcat”  ( Showing both adb status window and adb logcat on the same terminal ) 
我试图获取 adb status-window 命令以显示任何有用的东西,但它似乎只是显示以下内容: Android调试桥 州:设备 起初,我认为它是因为资源正忙于现有操作 adb logcat ,但停止执行此问题。 这是用于在本地机器之外的设备,并且在亚栏中使用WiFi。 是否有可能立即使用这两个命令? ...

13  如何防止我的手机使用任何类型的互联网?  ( How can i prevent my phone from using any kind of internet ) 
我有一个奇怪的计划,我的手机本月越过它的带宽使用......主要只是与Gmail,Twitter等同步。所以现在,我的手机每5分钟告诉我它已经花了这里有40美分和30美分使用我的预付金钱。 我已经完成了以下操作: 关闭WiFi(我的手机现在没有看到任何WiFi斑点) 关闭了所有应用 关闭了数据的同步 然而,它仍在...

7  我的wifi疑难解答 - 无法获得IP地址  ( Troubleshooting my wifi cant get an ip address ) 
我正在使用三星Galaxy Gio(Android 2.3)。我无法获得WiFi连接。我的兄弟有一些电话,可以得到一个连接。 当我启用WiFi时,它会尝试连接到路由器。然后说它试图获得IP地址。但不能这样做并关闭连接。 进入 *#*#4636#*#* 以及它告诉我以下内容: WiFi state: On Netw...

2  使用平板电脑访问PC  ( Access pc using tablet ) 
我有平板电脑和正常的PC。我的普通电脑上有很多文件,我想复制到我的平板电脑。两个系统都连接到相同的WiFi网络。是否有任何方法可以使用此WiFi网络将文件从普通PC传输到平板电脑? ...




© 2021 it.wenda123.org All Rights Reserved. 问答之家 版权所有


Licensed under cc by-sa 3.0 with attribution required.