kbordzan
Posts: 23
Joined: Wed Mar 02, 2016 12:40 pm

Re: Smile or Cry?

Fri Mar 04, 2016 8:58 am

GTR2Fan wrote:
kbordzan wrote:Is it possible to restart SSH somehow?

Code: Select all

sudo service ssh restart
... I think.
I do not have SSH access via network.
I guess I need to connect by cable.

But any idea why via WiFi SSH is not working?

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4247
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: WiFi Issues ? Start here !

Fri Mar 04, 2016 9:36 am

I was using SSH over WiFi last night, having finally got channel 13 working.

Although now you mention it, I did have to reboot it an extra time before it worked. I put that down to the protocols getting in a mess.
One thing I might have done between failing and succeeding is to unplug the Ethernet cable.

Arakun
Posts: 3
Joined: Mon Aug 10, 2015 8:39 am

Re: WiFi Issues ? Start here !

Fri Mar 04, 2016 1:38 pm

TL;DR: My D-Link DWA-131 wifi dongle has stopped working and I'm starting to suspect it's broken but I want some feedback before taking it back to the store.

So, I got a D-Link DWA-131 wifi dongle for my Pi 2B last spring. I would use "wpa_gui" when connecting to new networks. It was a bit of a pain, but once I got it working it would tend to keep working fairly reliably. It continued working after I upgraded from Wheezy to Jessie and I didn't have to touch the new Wicd network manager. Then, a few weeks ago, I couldn't get on the internet any more.

I get a bunch of network related messages at startup and it sometimes takes minutes for the wlan0 interface to appear. When I try to connect to my router it'll sometimes tell me the password is wrong. Sometimes I get only an IP6 address. Even when I get both an IP4 and IP6 address I still can't access neither the internet nor my local network. Neither domain names nor IP addresses work.

I'm starting to suspect that the wifi dongle is simply broken. I tend to see the same weird behaviour and gradual degradation when a router dies. At first occasional hiccups, then specific functionality not working anymore while other parts keep chugging along just fine.

What do people in this thread think? I've skimmed through the entire thread looking for bits of informations that might help me solve this but no luck. I'll post my config files below in case someone manages to spot an obvious error.

/etc/network/interfaces:

Code: Select all

source-directory /etc/network/interfaces.d

auto lo

iface lo inet loopback
iface eth0 inet manual

allow-hotplug wlan0
auto wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

iface default inet manual
/etc/wpa_supplicant/wpa_supplicant.conf:

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
	ssid="xxxxx"
	psk="xxxxx"
	proto=RSN
	key_mgmt=WPA-PSK
	pairwise=TKIP
	auth_alg=OPEN
	group=TKIP WEP104 WEP40
}

network={
	ssid="xxxxx"
	psk="xxxxx"
	proto=RSN
	key_mgmt=WPA-PSK
	pairwise=CCMP
	auth_alg=OPEN
}

network={
	ssid="xxxxx"
	psk="xxxxx"
	proto=RSN
	key_mgmt=WPA-PSK
	pairwise=TKIP
	auth_alg=OPEN
}
Whatever this is:
Image

aloodb
Posts: 2
Joined: Fri Mar 04, 2016 1:46 pm

Re: WiFi Issues ? Start here !

Fri Mar 04, 2016 1:55 pm

Arghh!!! channel 12 refuses to work on my PI3. I have tried all the fixes I can find ....

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo rpi-update
reboot
sudo branch=next rpi-update ( this did nothing other than say I'm already on the latest version 4.1.8)
reboot
iw reg set GB
updated /ete/wpa_supplicant/wpa_supplicant.conf to have COUNTRY=GB

still only have channels 1-11 ....

anyone got any more suggestions of what I can try ?

Thanks Steve

DirkS
Posts: 8821
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: WiFi Issues ? Start here !

Fri Mar 04, 2016 2:39 pm

aloodb wrote:sudo branch=next rpi-update ( this did nothing other than say I'm already on the latest version 4.1.8)
BRANCH=next should get you to 4.4.x
Not sure if that is fully Pi3 compatible yet (there were one or two fixes applied yesterday / today to the 4.1.x firmware)
anyone got any more suggestions of what I can try ?
Check /etc/wpa_supplicant/wpa_supplicant.conf for 'country=GB'

raspi-config changed mine to:

Code: Select all

country=GB
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
(just first 3 lines shown)

mattgemmell
Posts: 3
Joined: Fri Mar 04, 2016 3:06 pm
Location: Edinburgh, Scotland
Contact: Website

Re: WiFi Issues ? Start here !

Fri Mar 04, 2016 3:54 pm

Hi,

I was having wi-fi issues with a new Raspberry Pi 3 (with latest Raspbian, just downloaded yesterday). It'd be fine initially, but after a few minutes sitting idle, the Pi often wasn't reachable from other machines on the local network (for ping, ssh, vnc, etc). It seems that the wi-fi module has quite aggressive power-saving enabled.

I looked around on the web and found a series of steps that fixed the issue for me. It might be that some of these are redundant, but they worked here, and should only take a couple of minutes (just once). You're welcome to try them.

You'll need to be logged into the Pi on the command line to proceed, either directly or via ssh from another machine. (You can get into your Pi via ssh on your local network by doing ssh [email protected] and entering the usual password.)

Also, I use the nano editor in these steps. Feel free to substitute whatever you prefer.

Assumption: your wi-fi interface is wlan0. Check first by doing

Code: Select all

iwconfig
Have a look to see which interface is your wi-fi. If it's not wlan0, substitute the correct one throughout all the following steps.

As a temporary fix while you're following these steps, do this:

Code: Select all

sudo iwconfig wlan0 power off
Now we'll make it permanent. Three things to do.


Step 1

Do:

Code: Select all

sudo nano /etc/modprobe.d/8192cu.conf
Put this in the file:

Code: Select all

options 8192cu rtw_power_mgnt=0 rtw_enusbss=0 rtw_ips_mode=1
and save the file.


Step 2

Do:

Code: Select all

sudo nano /etc/rc.local
Put these lines just before (obviously) the exit 0 line at the end, and save the file.

Code: Select all

sleep 10
iwconfig wlan0 power off
Step 3

Do:

Code: Select all

sudo nano /etc/systemd/system/root-resume.service
Put the following contents in it:

Code: Select all

[Unit]
Description=Turn of wlan power management
After=suspend.target

[Service]
Type=simple
ExecStartPre= /bin/sleep 10
ExecStart= /sbin/iwconfig wlan0 power off

[Install]
WantedBy=suspend.target
Save the file. Then do:

Code: Select all

sudo systemctl enable root-resume
Much of this is via the info here, by the way.

Finally, reboot the Pi (sudo reboot). That's it.


Check that it worked

To check it worked, once you've rebooted, do:

Code: Select all

iwconfig
Make sure it says "Power Management:off" in the portion concerning your wi-fi interface.

Hope that helps.

-M
--
Matt Gemmell
http://mattgemmell.com/
http://twitter.com/mattgemmell

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4247
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: WiFi Issues ? Start here !

Fri Mar 04, 2016 4:07 pm

aloodb wrote:sudo branch=next rpi-update
Just to reiterate what was said above, in case you missed the import:
BRANCH must be in upper-case letters.

Code: Select all

sudo BRANCH=next rpi-update
As we've said elsewhere, unless you need to have channel 12 & 13, don't do this; you're putting unproven firmware onto your Pi and it could have other issues.

aloodb
Posts: 2
Joined: Fri Mar 04, 2016 1:46 pm

Re: WiFi Issues ? Start here !

Fri Mar 04, 2016 5:09 pm

BRANCH must be in uppercase :-) that was the problem was in lowercase in all the appends I found. Now have a 4.4.4 kernel and working Wifi on channel 12 ...... many thanks

stubright
Posts: 108
Joined: Sat Dec 24, 2011 11:12 pm

Re: WiFi Issues ? Start here !

Fri Mar 04, 2016 10:30 pm

Hi,
I'm having issues with wifi on my shiny new pi3. I'm getting a lot of errors in dmesg, eg

Code: Select all

[ 5056.502602] brcmfmac: brcmf_sdio_hdparse: seq 74: sequence number error, expect 70
[ 5056.502705] brcmfmac: brcmf_sdio_hdparse: seq 70: sequence number error, expect 75
[ 5056.504321] brcmfmac: brcmf_sdio_hdparse: seq 79: sequence number error, expect 75
I have dozens and dozens of these, they occur when I'm trying to copy large files (>400MB approx) from my Pi Nas or from the internet to my Pi3. If I'm copying from my nas, the file will fail with a timeout. If it's from the internet, it works with errors in dmesg. It appears the faster the transfer the more chance of failure. The wifi shouldn't be going to sleep as I don't leave the file just to copy, I continue using the Pi (watching for errors, checking dmesg).
I'm running a fresh Raspbian, fully updated on a brand new 16GB Sandisk SD card, using a cpc official pi3 2.5A power supply. Ubuntu Mate has the same issue.
If I use a PiHut wifi dongle (while disabling the onboard wifi), I don't have any PiHut wifi related errors or timeouts.

Stu

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4247
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: WiFi Issues ? Start here !

Fri Mar 04, 2016 11:35 pm

Switch off power management. No it doesn't make sense, but it will probably work even so.

It's easy enough to try, just:

Code: Select all

sudo iwconfig wlan0 power off
If it does then there's instructions for making it permanent a few posts above.

stubright
Posts: 108
Joined: Sat Dec 24, 2011 11:12 pm

Re: WiFi Issues ? Start here !

Sat Mar 05, 2016 12:05 am

rurwin wrote:Switch off power management. No it doesn't make sense, but it will probably work even so.
It's easy enough to try, just:

Code: Select all

sudo iwconfig wlan0 power off
If it does then there's instructions for making it permanent a few posts above.
Thanks Rurwin
That sort of worked a little bit. I still get several (six for one file, they come in groups of three) 'sequence number errors' but a 1.4GB file copied without timing out. Whether it is usable after copying is another matter.
Any other options would be greatly appreciated.
Stu

overskilling
Posts: 1
Joined: Sat Mar 05, 2016 12:45 pm

Re: WiFi Issues ? Start here !

Sat Mar 05, 2016 12:50 pm

Just the command

iwconfig wlan0 power off

was sufficient without the update on a new Pi3. This fixed the hanging (sleeping) and PING times improved dramatically.

Thanks for the help.

mkarliner
Posts: 2
Joined: Fri May 17, 2013 3:27 am

Re: WiFi Issues ? Start here !

Sat Mar 05, 2016 2:12 pm

Yep, same here. Pi drops an ssh that doesn't have activity after a minute or
so. I'll try to work out how to disable power management and report back.

a few minutes later....
I've added iwconfig wlan0 power off to /etc/rc.local
that seems to have fixed it.

Mike
Joshimuz wrote:I've have similar issues with the Pi3 wifi as manawyrm.

But I also have a problem whereby if the wireless connection is not being used for ~1 minute, it drops completely and I can no longer connect/ping the Pi at all, yet it still shows on my router's connection list.

I found that opening a SSH connection and using the top command is a good way to keep it connected, but obviously this isn't an ideal solution. There might be a better way but I'm not very familiar with Linux.

DirkS
Posts: 8821
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: WiFi Issues ? Start here !

Sat Mar 05, 2016 2:29 pm

mkarliner wrote:Yep, same here. Pi drops an ssh that doesn't have activity after a minute or so
I'm a bit surprised. As a test I left an SSH session over wlan open all night and this morning it was still alive.
I did not make any changes to the configuration...

kbordzan
Posts: 23
Joined: Wed Mar 02, 2016 12:40 pm

Re: WiFi Issues ? Start here !

Sun Mar 06, 2016 8:18 am

rurwin wrote:I was using SSH over WiFi last night, having finally got channel 13 working.

Although now you mention it, I did have to reboot it an extra time before it worked. I put that down to the protocols getting in a mess.
One thing I might have done between failing and succeeding is to unplug the Ethernet cable.
Are you saying that problem can be used channel for WiFi, that SSH is not working?

AndyQua
Posts: 7
Joined: Sat Feb 14, 2015 11:47 am

Re: WiFi Issues ? Start here !

Sun Mar 06, 2016 11:43 am

I have a slightly more challenging issue.

On boot, I can ping my PI 3 from my mac and ssh into it fine.

After about a minute, the mac can no longer ping the PI, or establish a new ssh session HOWEVER the original ssh session continues to work fine and the PI is working fine on the network for about 5 more minutes of no activity and then that dies and the PI needs a reboot.

If though I ping the mac's IP address from the PI, this takes a second or so to work but once that ping has returned, the mac can once again ping the PI and new ssh sessions can be established again. Then again, after another minute or so the cycle repeats.

Power Management on the PI's wifi is turned off (iwconfig shows Power Management:off).

I've tried both setting the PI's IP Address both from dhcp and a static ip but that makes no difference.

Note - both machines are connecting over WiFi.

Any thing else I should be doing or not doing?

Koldur
Posts: 6
Joined: Tue Mar 01, 2016 12:36 pm

Re: WiFi Issues ? Start here !

Sun Mar 06, 2016 12:55 pm

The only thing you can do now is wait until they fix the Wi-Fi driver. It is clear there are some issues, but that was to be expected if you ask me. I am sure in a month or so these issues will be ironed out.

johnthemayor
Posts: 1
Joined: Sun Mar 06, 2016 4:39 pm

Re: WiFi Issues ? Start here !

Sun Mar 06, 2016 4:42 pm

EDIT: Upgrading from firmware 4.1.18 to 4.1.19 fixed the issue. Now my wifi is up and running perfectly, with Raspbian and OpenELEC. It's running on channel 11 and it was on channel 11 as well when it was not working.

Using Raspbian with Raspberry Pi 3 wlan0 shows up in ifconfig:

Code: Select all

wlan0     Link encap:Ethernet  HWaddr b8:27:eb:70:84:01
          inet addr:169.254.92.44  Bcast:169.254.255.255  Mask:255.255.0.0
          inet6 addr: fe80::ba27:ebff:fe70:8401/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:11 errors:0 dropped:11 overruns:0 frame:0
          TX packets:5800 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4548 (4.4 KiB)  TX bytes:1603408 (1.5 MiB)
However it refuses to connect to my wifi, yet other devices connect to it just fine, e.g. my Oneplus 2. How do I debug the wifi connection?
Last edited by johnthemayor on Sun Mar 06, 2016 5:19 pm, edited 2 times in total.

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4247
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: WiFi Issues ? Start here !

Sun Mar 06, 2016 5:17 pm

The most likely reason is that your router has chosen channel 12 or 13. To check this log into your router or install the app "WiFi Analyser" on your Android phone.

The best and most foolproof solution at the moment is to change the channel your router is using.

User avatar
max2play
Posts: 11
Joined: Wed May 27, 2015 12:12 pm
Location: Leipzig, Germany
Contact: Website

Re: WiFi Issues ? Start here !

Mon Mar 07, 2016 1:32 pm

Hi,

I am not successful in setting up a wi-fi connection on the Raspberry Pi 3 with the inbuild Wi-Fi module with WPS (Wi-Fi Protected Setup) on the latest Raspbian (Debian Jessie Lite). While normal connection with SSID and Passphrase with wpa_supplicant and wpa_cli work without problems, the connection with wpa_cli wps_pbc gives the following error:

Code: Select all

> wps_pbc
OK
<3>CTRL-EVENT-SCAN-RESULTS 
<3>WPS-AP-AVAILABLE-PBC 
<3>Trying to associate with xx:xx:xx:xx:xx:xx (SSID='Max2Play' freq=2412 MHz)
<3>Association request to the driver failed
<3>Authentication with xx:xx:xx:xx:xx:xx timed out.
<3>CTRL-EVENT-DISCONNECTED bssid=xx:xx:xx:xx:xx:xx reason=3 locally_generated=1
<3>CTRL-EVENT-SCAN-RESULTS 
<3>WPS-AP-AVAILABLE-PBC 
<3>CTRL-EVENT-SCAN-RESULTS 
<3>WPS-AP-AVAILABLE-PBC 
<3>Trying to associate with xx:xx:xx:xx:xx:xx (SSID='Max2play' freq=2412 MHz)
<3>Association request to the driver failed
<3>Authentication with xx:xx:xx:xx:xx:xx timed out.
<3>CTRL-EVENT-DISCONNECTED bssid=xx:xx:xx:xx:xx:xx reason=3 locally_generated=1
With a USB-Wi-Fi-Dongle connected it works fine. I assume there might be some kind of problem with the driver for the BCM43438? Maybe it just doesn't support WPS? Am I missing something?

The (successful) output with a Wi-Fi dongle (not using the inbuild Wi-Fi of the RPi-3) is the following:

Code: Select all

> wps_pbc
OK
<3>CTRL-EVENT-DISCONNECTED bssid=xx:xx:xx:xx:xx:xx reason=3 locally_generated=1
<3>CTRL-EVENT-SCAN-RESULTS 
<3>WPS-AP-AVAILABLE-PBC 
<3>Trying to associate with xx:xx:xx:xx:xx:xx (SSID='Max2Play' freq=2412 MHz)
<3>Association request to the driver failed
<3>Associated with xx:xx:xx:xx:xx:xx
<3>CTRL-EVENT-EAP-STARTED EAP authentication started
<3>CTRL-EVENT-EAP-STATUS status='started' parameter=''
<3>CTRL-EVENT-EAP-PROPOSED-METHOD vendor=14122 method=1
<3>CTRL-EVENT-EAP-STATUS status='accept proposed method' parameter='WSC'
<3>CTRL-EVENT-EAP-METHOD EAP vendor 14122 method 1 (WSC) selected
<3>WPS-CRED-RECEIVED 
<3>WPS-SUCCESS 
This is what I am hoping to achieve with the Build-In Wi-Fi module of the RPi-3...
OS Developer Account
Visit Max2Play at www.max2play.com

Appesteijn
Posts: 1
Joined: Tue Mar 08, 2016 5:44 pm

Re: WiFi Issues ? Start here !

Tue Mar 08, 2016 5:50 pm

RaspberryPi v3 here.

Did a clean install of Raspbian Jessie Lite.
Set the powermgmt of the wlan0 off and connected to my SSID.

Once I reboot without a LAN cable attached, WiFi is buggy. Can't connect through SSH over WiFi or get a 'broken pipe' after a few seconds.

If I insert the LAN cable, I can connect through SSH over wifi and the connecting is stable.

***Update: Disabling the powermgmt worked. Now my Pi3 connects to Wifi even when no LAN cable is attached
Last edited by Appesteijn on Wed Mar 09, 2016 6:41 am, edited 1 time in total.

pingpong2012
Posts: 28
Joined: Mon Mar 30, 2015 1:09 am

Re: WiFi Issues ? Start here !

Wed Mar 09, 2016 4:23 am

My pi 3 wifi is incredibly slow. During first updates it was running about 40kBps. Sometimes it jumps as high as 150-170kBps. Sometimes as low as around 10.

vollmeise
Posts: 5
Joined: Wed Mar 09, 2016 12:08 pm

Re: WiFi Issues ? Start here !

Wed Mar 09, 2016 12:35 pm

Hi,

I have some very strange phenomena using the Raspberry Pi 3's onboard wifi.

The Pi3 runs with a freshly installed Raspbian Jessie and is up to date (apt-get upgrade etc.). My access point is a 802.11g Netgear DG834GB router, working flawlessly with other raspi's or a notebook.
If the Pi3 is connected over wired Ethernet (eth0) or using an USB Wifi dongle (Edimax) from an other Pi, everything works as expected.
If I use the onboard wifi interface of the Pi3 I have observed three problems:

1. Slow speed and high latency - solved
That problem was solved with the iwconfig command as already described in this thread. I made this permanent in the

Code: Select all

/etc/network/interfaces
configuration file:

Code: Select all

allow-hotplug wlan0                                                                                                                                                         
iface wlan0 inet manual                                                                                                                                                     
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf                                                                                                                        
    # deaktiviere power save modus fuer Raspberry Pi 3 on board wifi                                                                                                        
    post-up iwconfig wlan0 power off                                                                                                                                        
2. Traceroute with UDP not working from other stations to the Pi3 (192.168.1.220)

Code: Select all

atom:~# traceroute -I 192.168.1.220                                                                                                                                         
traceroute to 192.168.1.220 (192.168.1.220), 30 hops max, 60 byte packets                                                                                                   
 1  raspberry.local (192.168.1.220)  8.431 ms  8.717 ms  9.044 ms                                                                                                           
atom:~# traceroute -T 192.168.1.220                                                                                                                                         
traceroute to 192.168.1.220 (192.168.1.220), 30 hops max, 60 byte packets                                                                                                   
 1  raspberry.local (192.168.1.220)  7.371 ms  7.769 ms  7.756 ms                                                                                                           
atom:~# traceroute -U 192.168.1.220                                                                                                                                         
traceroute to 192.168.1.220 (192.168.1.220), 30 hops max, 60 byte packets                                                                                                   
 1  * * *                                                                                                                                                                   
 2  * * *                                                                                                                                                                   
 3  * * *                                                                                                                                                                   
 4  * * *                                                                                                                                                                   
 5  * * *                                                                                                                                                                   
 6  * * *                                                                                                                                                                   
 7  * * * 
Traceroute from the Pi 3 to other stations works as expected.

3. SSH from or to the Pi3 hangs after succesful authentication :?
Using ssh -v shows clearly that the authentication was succesful, but I don't get a prompt. The tcp connection is established.
It doesn't look like a configuration in sshd since everything works perfectly using wired ethernet or an USB wifi dongle.

Everything else (shellinabox, Apache2 etc.) just works over the Pi3's onboard wifi.

Bye

vollmeise
Posts: 5
Joined: Wed Mar 09, 2016 12:08 pm

Re: WiFi Issues ? Start here !

Wed Mar 09, 2016 4:46 pm

An update to my previous post...

Connecting the Pi3 and onboard wifi to a different access point (AVM FritzBox 7390) shows none of the described problems with traceroute and ssh! :roll:
So it is the combination of the Pi 3's onboard wifi and the Netgear access point which is making the trouble.
While good to know, it doesn't solve the problem for me (ssh not working in my wlan).
Could this be fixed by a driver update on the Pi 3?

Bye

harnessg
Posts: 2
Joined: Fri Dec 25, 2015 8:22 pm

Re: WiFi Issues ? Start here !

Fri Mar 11, 2016 4:34 am

Got my Rpi3 a few days ago, and I'm having the same problem with it that I was with the Rpi2 as far as wi-fi goes. I'm running a Trendnet TEW-452BRP in access point mode (on channel 6). I also have an AT&T wireless access point from 2WIRE. I got the wi-fi dongle with the Rpi2 from MCM. With wheezy on the Rpi2, it connected to the Trendnet just fine (and also to the 2WIRE router as well). When I upgraded to jesse, it would no longer connect to either. I figured it was a driver issue, but didn't really persue it.

So then the 3 arrives. I figured that the wi-fi would work out of the box. Nope. I've updated, upgraded, sudoed till I'm blue in the face and it just won't connect to my wi-fi.

I've tried some of the suggestions here and when I saw that it might be the channel, that got my hopes up. But I confirmed that the Trendnet is on channel 6 and the 2WIRE is on channel 11.

Anyone have any ideas?

Return to “Troubleshooting”

Who is online

Users browsing this forum: Bing [Bot], Douglas6 and 47 guests