Thank you for your donation


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Constant loss of connection
1st Apr, 2017, 08:22 PM
Post: #1
Constant loss of connection
Software
XBian version: 1.0 (knockout) updated to today.
XBMC/Kodi version: 17.1
Overclock settings: none

Hardware
Device type and model (e.g. Raspberry Pi Model A/B 256/512 MB, CuBox-i i4Pro, ...): Raspberry Pi 3 Model B
Power supply rating: 2.5 A, original
SD card size and make/type: 2GB
Network (Ethernet or wireless): Wireless
Connected devices (TV, USB, network storage, ...): TV via HDMI

Log files
Link to logfile(s): not provided

Problem description:
Since about one or two weeks ago, after a period of time that i'm don't know (maybe 3 hours?) I can't connect to my raspberry/xbian by ssh. If I have tranmission running I can't connect to it neither, the same happen to kodi. The only things that I have running in background are a script to update my ip for freedns.afraid.org and this script https://github.com/niqdev/packtpub-crawler.

The problem happens at the same network and I have the raspberry connected by wifi.

Any ideas? maybe a driver problem? hardware problem?

How to reproduce:
Restart the raspberry and wait.
Find all posts by this user
Quote this message in a reply
2nd Apr, 2017, 04:30 AM (This post was last modified: 2nd Apr, 2017 04:31 AM by Nachteule.)
Post: #2
RE: Constant loss of connection
I suppose you're using the onboard wlan?

Unfortunately this broadcom wlan is absolutely crap, having similar issues here:

Sometimes wlan is working well for weeks w/o any issues, and from one day to another having same issue you described. No idea how to solve it, already used different firmwares with no success.

In my case after a while wlan is back, maybe you just have to wait. Strange thing is, my server can connect to rpi3 mostly, my notebook can't.

Which kernel do you use. If you're running 4.9.x, you could revert to 4.4 to see if there is any difference
Find all posts by this user
Quote this message in a reply
4th Apr, 2017, 04:35 AM
Post: #3
RE: Constant loss of connection
Yes, it's its onboard wlan.

Kernel: 4.9.17+

I'll will try with 4.4 to see.

Thanks
Find all posts by this user
Quote this message in a reply
7th Apr, 2017, 04:05 AM
Post: #4
RE: Constant loss of connection
Well, since i wrote the post everything works well. When the problem returns I'll try with the older kernel.
Find all posts by this user
Quote this message in a reply
7th Apr, 2017, 05:13 AM
Post: #5
RE: Constant loss of connection
(7th Apr, 2017 04:05 AM)naox Wrote:  Well, since i wrote the post everything works well. When the problem returns I'll try with the older kernel.

Seems you have same issue like me. Sometimes it works for weeks Smile Maybe that broadcom device is very sensitive against noisy air - who knows Huh
Find all posts by this user
Quote this message in a reply
7th Apr, 2017, 08:28 AM
Post: #6
RE: Constant loss of connection
(7th Apr, 2017 05:13 AM)Nachteule Wrote:  
(7th Apr, 2017 04:05 AM)naox Wrote:  Well, since i wrote the post everything works well. When the problem returns I'll try with the older kernel.

Seems you have same issue like me. Sometimes it works for weeks Smile Maybe that broadcom device is very sensitive against noisy air - who knows Huh

Am sure you checked power saver settings for wifi already ?
As this was an issue with allot of the adapters falling asleep.
What does below one give you ?

Code:
grep '' /sys/module/$(readlink /sys/class/net/wlan0/device/driver/module | xargs -n 1 basename)/parameters/*

EDIT: I just noticed one of my Pi's got power saver enabled so had to do:

Code:
echo 'options r8188eu rtw_power_mgnt=0 rtw_enusbss=0' | sudo tee /etc/modprobe.d/r8188eu.conf

There are only 10 types of people in the world: those who understand binary, and those who don't
Find all posts by this user
Quote this message in a reply
7th Apr, 2017, 09:29 AM
Post: #7
RE: Constant loss of connection
@deHakkelaar

In my case, power saving is disabled since months (did that at the day the strange issue begun)
Find all posts by this user
Quote this message in a reply
7th Apr, 2017, 09:41 AM
Post: #8
RE: Constant loss of connection
(7th Apr, 2017 09:29 AM)Nachteule Wrote:  @deHakkelaar

In my case, power saving is disabled since months (did that at the day the strange issue begun)

Just out of interest, what does below output on a Pi 3 ?

Code:
grep '' /sys/module/$(readlink /sys/class/net/wlan0/device/driver/module | xargs -n 1 basename)/parameters/*

There are only 10 types of people in the world: those who understand binary, and those who don't
Find all posts by this user
Quote this message in a reply
7th Apr, 2017, 09:50 AM
Post: #9
RE: Constant loss of connection
Will give an answer tomorrow, because my pi3 is currently out of order due to this issue
Find all posts by this user
Quote this message in a reply
7th Apr, 2017, 10:04 AM
Post: #10
RE: Constant loss of connection
I see you keeping them busy.
Dont worry, I am not in a rush to know Smile

There are only 10 types of people in the world: those who understand binary, and those who don't
Find all posts by this user
Quote this message in a reply
7th Apr, 2017, 10:08 AM
Post: #11
RE: Constant loss of connection
Terminal

root@kmxbilr2 ~ # grep '' /sys/module/$(readlink /sys/class/net/wlan0/device/driver/module | xargs -n 1 basename)/parameters/*
/sys/module/brcmfmac/parameters/debug:0
/sys/module/brcmfmac/parameters/roamoff:1
root@kmxbilr2 ~ # iwconfig
wlan0 IEEE 802.11 ESSID:"BigBellN"
Mode:Managed Frequency:2.412 GHz Access Point: 64:70:02:23:80:78
Bit Rate=72.2 Mb/s Tx-Power=31 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=59/70 Signal level=-51 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

Find all posts by this user
Quote this message in a reply
8th Apr, 2017, 11:07 AM
Post: #12
RE: Constant loss of connection
Next question, how do you disable power saving for on board WiFi on a Pi3 if its not in the parameters ?
Is this done in "interfaces" with the "wireless-power off" directive ?
Makes me wonder if its working at all.
For diagnosing, one could leave a ping running (keep alive) so the adapter doesnt fall asleep for sure eg:

Terminal
$ ping -i 30 -q $(sudo route -n | grep 'UG[ \t]' | awk '{print $2}') &
[1] 28888
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.
$

Terminal
$ jobs
[1]+ Running ping -i 30 -q $(sudo route -n | grep 'UG[ \t]' | awk '{print $2}') &
$

Terminal
$ fg 1
ping -i 30 -q $(sudo route -n | grep 'UG[ \t]' | awk '{print $2}')
^C
--- 10.0.0.1 ping statistics ---
16 packets transmitted, 16 received, 0% packet loss, time 75056ms
rtt min/avg/max/mdev = 5.699/24.601/64.604/25.050 ms
$

There are only 10 types of people in the world: those who understand binary, and those who don't
Find all posts by this user
Quote this message in a reply
8th Apr, 2017, 11:25 AM
Post: #13
RE: Constant loss of connection
Yes, in interfaces

Code:
iface wlan0 inet static
       wpa-ssid SSID
       wpa-psk SECRET
       address 192.168.1.24
       netmask 255.255.255.0
       network 192.168.1.0
       broadcast 192.168.1.255
       gateway 192.168.1.10
       wireless-power off

iw telling me this setting works Shy
Find all posts by this user
Quote this message in a reply
8th Apr, 2017, 11:52 AM
Post: #14
RE: Constant loss of connection
Could be a false flag.
I would try ping as a last desperate attempt just to be sure Wink

There are only 10 types of people in the world: those who understand binary, and those who don't
Find all posts by this user
Quote this message in a reply
9th Apr, 2017, 03:23 AM
Post: #15
RE: Constant loss of connection
(8th Apr, 2017 11:52 AM)deHakkelaar Wrote:  Could be a false flag.
I would try ping as a last desperate attempt just to be sure Wink

Ah, already did that since years. Forgot to mention Smile

Having script in background which pings server in 7s intervals. and if ping fails, wlan is completely reloaded (rmmod ..., modprobe ... ifup ...)
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: