Cannot play files over WiFi on Pi3

Moderator: flatmax

Post Reply
moggyd
Posts: 22
Joined: Wed Jul 05, 2017 5:09 pm

Cannot play files over WiFi on Pi3

Post by moggyd » Wed Jul 05, 2017 5:55 pm

Hi,

Have set up the audio-injector using the script and all working properly. I can record from line in and play local files just fine on a fresh install of Raspbian PIXEL.

I cannot however use the audioinjector to play any sort of audio accessed via WiFi. This includes any audio located over the network (e.g. streams or files on remote disks via SMB or NFS). Very simple to test using the following:

Code: Select all

wget https://ogg.jamendo.com/download/track/206407/ogg1/ -O - | mplayer -
or:

Code: Select all

mplayer http://media-the.musicradio.com:80/ChillMP3
In all cases the file/stream will start to play but after a short time it will stop. It may resume after some time, then stop again. Any attempt to use the network for other uses while this is happening will be affected also, which could mean intermittent dropping out or a complete hang of the network.

All works fine if using Ethernet and with a USB Wifi dongle I borrowed.
Any ideas?

Thanks,
Dom

flatmax
Posts: 609
Joined: Sat Jul 23, 2016 11:39 pm

Re: Cannot play files over WiFi on Pi3

Post by flatmax » Wed Jul 05, 2017 8:09 pm

Hi there,

I am listening to this as I write - using WIFI :

Code: Select all

wget "https://mp3l.jamendo.com/?trackid=206413&format=mp31&from=app-97dab294" -O - | mplayer -
I notice that the stream is being downloaded roughly 10 times faster then it is playing back here ... is that what you see ? For example wget reports 30% when mplayer is on 3%.

do you notice any problems with bandwidth ?

Matt
Check out our audiophile quality crossovers : https://bit.ly/2kb1nzZ
Please review the Zero sound card on Amazon USA : https://www.amazon.com/dp/B075V1VNDD
---
Check out our new forum on github : https://github.com/Audio-Injector

moggyd
Posts: 22
Joined: Wed Jul 05, 2017 5:09 pm

Re: Cannot play files over WiFi on Pi3

Post by moggyd » Wed Jul 05, 2017 9:43 pm

OK tried with external dongle and file plays to the end.

Tried with internal Wifi and I get this

Code: Select all

pi@raspberrypi:~ $ wget "https://mp3l.jamendo.com/?trackid=206413&format=mp31&from=app-97dab294" -O - | mplayer -
--2017-07-05 11:05:27--  https://mp3l.jamendo.com/?trackid=206413&format=mp31&from=app-97dab294
Resolving mp3l.jamendo.com (mp3l.jamendo.com)... 51.254.68.231
Connecting to mp3l.jamendo.com (mp3l.jamendo.com)|51.254.68.231|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2367731 (2.3M) [audio/mpeg]
Saving to: ‘STDOUT’

-                     0%[                      ]       0  --.-KB/s             MPlayer2 2.0-728-g2c378c7-4+b1 (C) 2000-2012 MPlayer Team
Cannot open file '/home/pi/.mplayer/input.conf': No such file or directory
Failed to open /home/pi/.mplayer/input.conf.
Cannot open file '/etc/mplayer/input.conf': No such file or directory
Failed to open /etc/mplayer/input.conf.

Playing -.
Reading from stdin...
Detected file format: MP2/3 (MPEG audio layer 2/3) (libavformat)
Cannot seek backward in linear streams!
Seek failed
-                     3%[                      ]  71.74K  71.3KB/s             [mp3 @ 0x75ba15b8]max_analyze_duration 5000000 reached
[mp3 @ 0x75ba15b8]Estimating duration from bitrate, this may be inaccurate
[lavf] stream 0: audio (mp3), -aid 0
Load subtitles in .
Selected audio codec: MPEG 1.0/2.0/2.5 layers I, II, III [mpg123]
AUDIO: 44100 Hz, 2 ch, s16le, 96.0 kbit/6.80% (ratio: 12000->176400)
AO: [pulse] Init failed: Connection refused
AO: [alsa] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
-                             6%[=>                                           ] 143.74K  22.5KB/s   eta 96s   A
-                             7%[==>                                          ] 175.74K  19.6KB/s   eta 1m 49sA
-                             8%[===>                                         ] 207.74K  17.7KB/s   eta 1m 59sA
-                            10%[===>                                         ] 239.74K  16.5KB/s   eta 2m 6s A
-                            11%[====>                                        ] 271.74K  15.9KB/s   eta 2m 8s A
-                            13%[====>                                        ] 303.74K  15.3KB/s   eta 2m 12sA
-                            14%[=====>                                       ] 335.74K  14.8KB/s   eta 2m 14sA
-                            15%[======>                                      ] 367.74K  14.6KB/s   eta 2m 14sA
^C  29.4 (29.3) of 0.0 (00.0)  2.7% 


MPlayer interrupted by signal 2 in module: decode_audio
A:  30.1 (30.0) of 0.0 (00.0) 1955.0% 

Exiting... (Quit)

Last part is me hitting Ctrl-C after the player stopping and the network dying. After I hit Ctrl-C, the Wifi recovers in a couple of minutes.

Below is /var/log/syslog output from when the player started (easily spotted by the I2S message)

Code: Select all

Jul  5 11:01:49 raspberrypi dhcpcd[460]: wlan0: no IPv6 Routers available
Jul  5 11:01:50 raspberrypi kernel: [   21.426262] random: crng init done
Jul  5 11:04:52 raspberrypi systemd[1]: Time has been changed
Jul  5 11:04:52 raspberrypi systemd[688]: Time has been changed
Jul  5 11:05:29 raspberrypi kernel: [   61.485974] bcm2835-i2s 3f203000.i2s: I2S SYNC error!
Jul  5 11:06:43 raspberrypi kernel: [  135.047289] brcmfmac: brcmf_do_escan: error (-110)
Jul  5 11:06:43 raspberrypi kernel: [  135.047367] brcmfmac: brcmf_cfg80211_scan: scan error (-110)
Jul  5 11:07:43 raspberrypi kernel: [  195.048225] brcmfmac: brcmf_do_escan: error (-110)
Jul  5 11:07:43 raspberrypi kernel: [  195.048237] brcmfmac: brcmf_cfg80211_scan: scan error (-110)
Jul  5 11:08:39 raspberrypi dhcpcd[460]: wlan0: carrier lost
Jul  5 11:08:39 raspberrypi wpa_supplicant[569]: wlan0: CTRL-EVENT-DISCONNECTED bssid=00:26:44:ed:cb:39 reason=0 locally_generated=1
Jul  5 11:08:39 raspberrypi wpa_supplicant[569]: wlan0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
Jul  5 11:08:40 raspberrypi dhcpcd[460]: wlan0: deleting address fe80::657:bb22:479b:2c4d
Jul  5 11:08:42 raspberrypi avahi-daemon[444]: Withdrawing address record for fe80::657:bb22:479b:2c4d on wlan0.
Jul  5 11:08:42 raspberrypi avahi-daemon[444]: Leaving mDNS multicast group on interface wlan0.IPv6 with address fe80::657:bb22:479b:2c4d.
Jul  5 11:08:42 raspberrypi kernel: [  254.409002] brcmfmac: brcmf_proto_bcdc_query_dcmd: brcmf_proto_bcdc_msg failed w/status -110
Jul  5 11:08:42 raspberrypi kernel: [  254.409015] brcmfmac: brcmf_cfg80211_reg_notifier: Country code iovar returned err = -110
Jul  5 11:08:42 raspberrypi dhcpcd[460]: wlan0: deleting route to 192.168.1.0/24
Jul  5 11:08:42 raspberrypi ntpd[590]: ./../lib/isc/unix/ifiter_ioctl.c:617: unexpected error:
Jul  5 11:08:42 raspberrypi ntpd[590]: wlan0: getting broadcast address: Cannot assign requested address
Jul  5 11:08:42 raspberrypi dhcpcd[460]: wlan0: deleting default route via 192.168.1.254
Jul  5 11:08:42 raspberrypi ntpd[590]: Deleting interface #5 wlan0, 192.168.1.74#123, interface stats: received=32, sent=44, dropped=0, active_time=240 secs
Jul  5 11:08:42 raspberrypi ntpd[590]: 213.251.53.217 interface 192.168.1.74 -> (none)
Jul  5 11:08:42 raspberrypi ntpd[590]: 95.215.175.2 interface 192.168.1.74 -> (none)
Jul  5 11:08:42 raspberrypi ntpd[590]: 46.163.88.228 interface 192.168.1.74 -> (none)
Jul  5 11:08:42 raspberrypi ntpd[590]: 82.70.138.66 interface 192.168.1.74 -> (none)
Jul  5 11:08:42 raspberrypi ntpd[590]: Deleting interface #4 wlan0, fe80::657:bb22:479b:2c4d#123, interface stats: received=0, sent=0, dropped=0, active_time=244 secs
Jul  5 11:08:42 raspberrypi ntpd[590]: peers refreshed
Jul  5 11:08:42 raspberrypi avahi-daemon[444]: Interface wlan0.IPv6 no longer relevant for mDNS.
Jul  5 11:08:42 raspberrypi wpa_supplicant[569]: wlan0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=GB
Jul  5 11:08:42 raspberrypi avahi-daemon[444]: Withdrawing address record for 192.168.1.74 on wlan0.
Jul  5 11:08:42 raspberrypi avahi-daemon[444]: Leaving mDNS multicast group on interface wlan0.IPv4 with address 192.168.1.74.
Jul  5 11:08:42 raspberrypi avahi-daemon[444]: Interface wlan0.IPv4 no longer relevant for mDNS.
Jul  5 11:08:43 raspberrypi wpa_supplicant[569]: wlan0: Trying to associate with 00:26:44:ed:cb:39 (SSID='O2wirelessEDCB39' freq=2452 MHz)
Jul  5 11:08:43 raspberrypi wpa_supplicant[569]: wlan0: CTRL-EVENT-ASSOC-REJECT status_code=16
Jul  5 11:08:44 raspberrypi wpa_supplicant[569]: wlan0: Trying to associate with 00:26:44:ed:cb:39 (SSID='O2wirelessEDCB39' freq=2452 MHz)
Jul  5 11:08:45 raspberrypi wpa_supplicant[569]: wlan0: CTRL-EVENT-ASSOC-REJECT status_code=16
Jul  5 11:08:46 raspberrypi wpa_supplicant[569]: wlan0: Trying to associate with 00:26:44:ed:cb:39 (SSID='O2wirelessEDCB39' freq=2452 MHz)
Jul  5 11:08:47 raspberrypi wpa_supplicant[569]: wlan0: CTRL-EVENT-ASSOC-REJECT status_code=16
Jul  5 11:08:47 raspberrypi wpa_supplicant[569]: wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="O2wirelessEDCB39" auth_failures=1 duration=10 reason=CONN_FAILED
Connection failures like those above continue until I hit Ctrl-C then it recovers:

Code: Select all

Jul  5 11:17:12 raspberrypi wpa_supplicant[569]: wlan0: CTRL-EVENT-SSID-REENABLED id=0 ssid="O2wirelessEDCB39"
Jul  5 11:17:12 raspberrypi wpa_supplicant[569]: wlan0: Trying to associate with 00:26:44:ed:cb:39 (SSID='O2wirelessEDCB39' freq=2452 MHz)
Jul  5 11:17:12 raspberrypi wpa_supplicant[569]: wlan0: Associated with 00:26:44:ed:cb:39
Jul  5 11:17:12 raspberrypi wpa_supplicant[569]: wlan0: WPA: Key negotiation completed with 00:26:44:ed:cb:39 [PTK=CCMP GTK=CCMP]
Jul  5 11:17:12 raspberrypi wpa_supplicant[569]: wlan0: CTRL-EVENT-CONNECTED - Connection to 00:26:44:ed:cb:39 completed [id=0 id_str=]
Jul  5 11:17:12 raspberrypi dhcpcd[460]: wlan0: carrier acquired
Jul  5 11:17:12 raspberrypi dhcpcd[460]: wlan0: adding address fe80::92bd:c8ec:5812:19b6
Jul  5 11:17:12 raspberrypi dhcpcd[460]: wlan0: IAID eb:d2:4d:91
Jul  5 11:17:13 raspberrypi dhcpcd[460]: wlan0: rebinding lease of 192.168.1.74
Jul  5 11:17:13 raspberrypi dhcpcd[460]: wlan0: soliciting an IPv6 router
I also tried using a better 2.5amp power supply and have tried disabling Bluetooth, but neither of these had any effect.

Anyone ideas how to debug more effectively what is going on here?

Thanks

moggyd
Posts: 22
Joined: Wed Jul 05, 2017 5:09 pm

Re: Cannot play files over WiFi on Pi3

Post by moggyd » Thu Jul 06, 2017 12:12 am

OK it looks like HiFiBerry had simliar problems with their DAC+ Pro boards.

https://github.com/raspberrypi/linux/issues/1588

So I thought I'd try setting my Wifi channel to 10 as suggested somewhere in the thread and for reasons I do not fully understand it now works!! Something to do with the clocks interfering with the Wifi bands.

Maybe you could consider some hardware mods at some point but for the moment I'm happy.

Thanks

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests