PDA

View Full Version : Having problems with Pi 3B+ wifi



diode84
2019-09-03, 08:43
Hello
I am running pCP LMS on Pi 3B+. All works on lan but wifi is causing problems. I can scan and find wifi networks but no wifi IP.
Main thing is it doesn't connect without lan.
Any ideas.
Thanks
diode84

paul-
2019-09-03, 08:59
Keep your lan cable plugged in until you get the wifi working.

How are you configuring your wifi? 2.4g or 5g. Is your country code correct? Can you post your scan results? Also with your wifi configured, what is in your pcp_boot.log?

diode84
2019-09-03, 10:03
Keep your lan cable plugged in until you get the wifi working.

How are you configuring your wifi? 2.4g or 5g. Is your country code correct? Can you post your scan results? Also with your wifi configured, what is in your pcp_boot.log?

Don't usually have problems with wifi setup on many pcs, country code is set to GB, capitals. Scan gives only two networks, both mine on the two frequencies the router works at. I think one high band and one low. I have never used high as walls too thick.
How can I access pcp_boot.log
For scan wifi mac I get Wifi IP: is missing - [Reboot] or [Save] to connect.

Think this is it
Starting piCorePlayer setup...
Loading pCP function files and pCP configuration file...Done.
Checking for boot codes on mmcblk0p1...
Trying to mount /dev/mmcblk0p1.
Checking for ssh...found, ssh will start.
Checking for netusb... newpcp.cfg not found on mmcblk0p1.
Setting piCorePlayer repository...Done.
Generating drop-down list...Done.
Starting wifi...
Starting WiFi on wlan0...
Done.
Loading configuration file...Done.
Loading pcp-lms-functions...Done.
Waiting for soundcard USB to populate. Done (1).
Waiting for network. Done (1).
Starting ALSA configuration...Done.
Starting Openssh server...Done.
Mounting USB Drives...
Disk a51e040e-dd4e-4836-9fbf-c73d5d73429b Not Found, Please insert drive and Reboot.
Done.
Mounting Network Drive...
Done.
Starting LMS, this can take some time...[70-01-01 00:00:18.4677] main::init (387) Starting Logitech Media Server (v7.9.2, 1558382969, Tue May 21 06:27:23 CEST 2019) perl 5.028000 - arm-linux-gnueabihf-thread-multi-64int

Slimserver Running pid:5418
Done.
Waiting for LMS to initiate..... Done (5).
Starting Squeezelite and/or Shairport-sync...
[ INFO ] Starting Squeezelite player: Squeezelite...
Done.
Starting httpd web server...Done.
Starting auto start FAV...Done.
Setting cpu scaling governor...ondemand Done.
Starting Jivelite...Done.
Loading Keytables...Done.

paul-
2019-09-03, 13:58
Hmm, that all looks perfectly normal, Is that the whole boot log?

diode84
2019-09-04, 01:05
That is the whole boot.log. It seems to say it has started the wifi. Any ideas?

JeffHart
2019-09-04, 07:19
Can you provide the output of sudo ifconfig and the contents of /etc/dhcpcd.conf?

It's ok to obfuscate the ip addresses, primarily need to know if they exist in either and match for both.

diode84
2019-09-04, 08:10
[QUOTE=JeffHart;949634]Can you provide the output of sudo ifconfig and the contents of /etc/dhcpcd.conf?.[QUOTE]

Tell me how to do this and I will give you the information.

Not sure I know what :( It's ok to obfuscate the ip addresses, primarily need to know if they exist in either and match for both.) means.

JeffHart
2019-09-04, 08:35
I'll be honest, I'm not familiar with PiCore so there may be an easier way.

If you can get to a command prompt, type "sudo ifconfig", you should see something like:

eth0 Link encap:Ethernet HWaddr 09:00:12:90:e3:e5
inet addr:192.168.1.29 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe70:e3f5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:54071 errors:1 dropped:0 overruns:0 frame:0
TX packets:48515 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:22009423 (20.9 MiB) TX bytes:25690847 (24.5 MiB)
Interrupt:10 Base address:0xd020
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:83 errors:0 dropped:0 overruns:0 frame:0
TX packets:83 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7766 (7.5 KiB) TX bytes:7766 (7.5 KiB)
wlan0 Link encap:Ethernet HWaddr 58:a2:c2:93:27:36
inet addr:192.168.1.64 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::6aa3:c4ff:fe93:4746/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:436968 errors:0 dropped:0 overruns:0 frame:0
TX packets:364103 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:115886055 (110.5 MiB) TX bytes:83286188 (79.4 MiB)

The relevant info is under wlan0, specifically the inet addr - which should be the WiFi IP address.

For the contents of /etc/dhcpcd.conf, type "sudo cat /etc/dhcpcd.conf" and it should display the contents - again looking for anything specific to wlan0.

re: Obfuscation - I'm a bit paranoid; in this reference obfuscation just means use fake info; so in the example above, instead of using 192.168.1.64, you might type 190.160.0.99. Just keep track of the actual IP address used to determine if it's referenced in the dhcpcd.conf file

diode84
2019-09-04, 12:46
Is it possible to get a command prompt in pCP.
Thanks

kidstypike
2019-09-04, 13:17
Is it possible to get a command prompt in pCP.
Thanks

Use something like putty, login username = tc - password = piCore

28106

diode84
2019-09-05, 05:18
Not sure what to run putty on. Is it included in pCP. Being a beginner I need a little bit more information.

Paul Webster
2019-09-05, 05:34
You run putty on your Windows machine - to get a terminal session open on the pCP machine - or you can plug a keyboard and screen into your pCP system.
But if you do it with putty then it will be easy to copy/paste into this forum.

kidstypike
2019-09-05, 05:36
You run putty on your Windows machine - to get a terminal session open on the pCP machine - or you can plug a keyboard and screen into your pCP system.
But if you do it with putty then it will be easy to copy/paste into this forum.

Thanks Paul

Putty for Windows: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

diode84
2019-09-05, 10:50
I have loaded Raspbian onto the Pi and it had no problems at all connecting the wifi. So it's not a fault on the Pi.
I haven't a windows system at the moment so putty not an option.
Could it be caused by the two bands that the router is working at.
Anyone any ideas.

chill
2019-09-05, 11:04
I haven't a windows system at the moment so putty not an option.


Mac? If so, use Terminal, and type 'ssh tc@<pCP IP address>'

paul-
2019-09-05, 11:20
I have loaded Raspbian onto the Pi and it had no problems at all connecting the wifi. So it's not a fault on the Pi.
I haven't a windows system at the moment so putty not an option.
Could it be caused by the two bands that the router is working at.
Anyone any ideas.

Do both bands have the same SSID? Then yes that will probably cause the problem.

diode84
2019-09-05, 12:28
Do both bands have the same SSID? Then yes that will probably cause the problem.
Yes both bands do have the same SSID, I can scan and get two bands 2.4 and 5.1GHZ and both have the same name SSID.
BTW I can access pCP with xenialpups terminal.

paul-
2019-09-05, 13:11
Yes both bands do have the same SSID, I can scan and get two bands 2.4 and 5.1GHZ and both have the same name SSID.
BTW I can access pCP with xenialpups terminal.

Create an SSID dedicated to either 2.4 or 5 and then try it.

diode84
2019-09-06, 01:19
Create an SSID dedicated to either 2.4 or 5 and then try it.

Both SSIDs have different names now but still not having any luck connecting without LAN.
Any ideas.

diode84
2019-09-08, 10:06
Create an SSID dedicated to either 2.4 or 5 and then try it.
Both SSIDs have different names now.
I reinstalled a fresh pCP and connected to SSID 5GHZ. It does connect but streams with a lot of buffering. The 2.4 will not connect wifi at all even though it detects both SSIDS.

paul-
2019-09-08, 12:24
Both SSIDs have different names now.
I reinstalled a fresh pCP and connected to SSID 5GHZ. It does connect but streams with a lot of buffering. The 2.4 will not connect wifi at all even though it detects both SSIDS.

How far from the router are you, and also how is your pi mounted. RPi devices don't have the best antennas

Try removing the pi from any case, and move to within clear site of your wifi router. Start there, see how it connects, then put it in a case, recheck, then move farther away.

diode84
2019-09-09, 01:21
How far from the router are you, and also how is your pi mounted. RPi devices don't have the best antennas

Try removing the pi from any case, and move to within clear site of your wifi router. Start there, see how it connects, then put it in a case, recheck, then move farther away.

It is 1M from the router. It does work out of the case so antenna probably at fault.
I will try a USB wifi card, any tips?

JeffHart
2019-09-09, 05:59
If its only 1M from the router, I'd suggest switching to an Ethernet cable from the LMS Pi to the router, if you have an open port on the router. Taking that extra WiFi hop out of the picture can do wonders to improve streaming to the players.

diode84
2019-09-09, 17:49
Its only 1M from the router for testing, normally it will be anywhere in the house. Seemed a good idea to use an external wifi adapter or even an extra antenna. Is there an external connection to wifi?

paul-
2019-09-09, 20:22
not Without soldering and modifying the board

JeffHart
2019-09-12, 14:31
Its only 1M from the router for testing, normally it will be anywhere in the house.

Rather than invest in an external WiFi component; I'd hardwire the LMS server and pick up another Pi for the player(s). YMMV

diode84
2019-09-15, 00:20
Rather than invest in an external WiFi component; I'd hardwire the LMS server and pick up another Pi for the player(s). YMMV

Thanks Jeff

I have found an old external WiFi dongle that does work near to the router but not upstairs at all so still have a problem, it will work in sight of router but upstairs no. Everything else works, laptops and an old streamer on WiFi.. I did have to use a powered usb hub as the Pi did not have enough power to run it. The player is to be used in a position that has no LAN.
Any ideas?
diode84

Paul Webster
2019-09-15, 02:55
If you are using 5GHz try switching to 2.4GHz as it is better at going through obstructions.
If going through floor/ceiling ... try different orientation and remove obstructions (like a thick dense shelf between the device and the floor below).

diode84
2019-09-15, 06:28
If you are using 5GHz try switching to 2.4GHz as it is better at going through obstructions.
If going through floor/ceiling ... try different orientation and remove obstructions (like a thick dense shelf between the device and the floor below).
Thanks Paul
I have tried all those combinations, its a 2.4ghz dongle so 5ghz not in the equation.
Thing is same dongle works perfectly on Daphile running on a thin client PC in the same position, it uses LMS and Jivelite but the only problem is there are no skins available in Daphile as its closed source. The display is far too small to read whereas pCP I can adjust everything, brilliant.
I need to get WiFi running well on pCP.

paul-
2019-09-15, 07:24
I scanned back through the thread, I don't see a discussion about country code......are you setting your country code properly? And is your router set to a proper channel for your country?

Man in a van
2019-09-15, 08:40
@diode84

If you have a spare card, why not try this approach.

Make a fresh image of piCorePlayer v5.0 using Etcher

https://repo.picoreplayer.org/insitu/piCorePlayer5.0.0/piCorePlayer5.0.0.zip

Remove and re-attatch the card to your computer (I'm talking Windows OS, it's the same procedure for any other OS).

Open the boot partition and you will find a folder called wpa_supplicant.conf.sample.txt.

(I'm not sure if that is correct, but you get what I mean)

Open the file with Windows WordPad or Notepad++.

Read down the text and fill in the details, Country, SSid,password.

Save the file and exit.

Back in the boot partion edit the file name to remove the extra text, so it is just


wpa_supplicant.conf

save.

Then just open the file again and check that the details are present and correct.

Put the card in the pi, with or without the wireless dongle.

Do not attatch the Ethernet cable, power the pi on and wait for two or three minutes.

Then check if it is on the network.

If you have an "official" pi power supply it should provide enough power for the dongle.

atb

ronnie

diode84
2019-09-15, 09:11
I scanned back through the thread, I don't see a discussion about country code......are you setting your country code properly? And is your router set to a proper channel for your country?

The country code is set to GB and the router was set up by the Quickline Internet engineer and everything else works ok.

paul-
2019-09-15, 09:17
That doesn't mean it's right. Not all devices properly conform to CRDA requirements. How is the router configured?

diode84
2019-09-15, 09:42
@diode84

If you have a spare card, why not try this approach.

Make a fresh image of piCorePlayer v5.0 using Etcher

https://repo.picoreplayer.org/insitu/piCorePlayer5.0.0/piCorePlayer5.0.0.zip

Remove and re-attatch the card to your computer (I'm talking Windows OS, it's the same procedure for any other OS).

Open the boot partition and you will find a folder called wpa_supplicant.conf.sample.txt.

(I'm not sure if that is correct, but you get what I mean)

Open the file with Windows WordPad or Notepad++.

Read down the text and fill in the details, Country, SSid,password.

Save the file and exit.

Back in the boot partion edit the file name to remove the extra text, so it is just


save.

Then just open the file again and check that the details are present and correct.

Put the card in the pi, with or without the wireless dongle.

Do not attatch the Ethernet cable, power the pi on and wait for two or three minutes.

Then check if it is on the network.

If you have an "official" pi power supply it should provide enough power for the dongle.

atb

ronnie
Not quite sure what you are proposing Ronnie but its not short of power at 5v as its fed from a powered hub fed from a 5v 2a psu.

diode84
2019-09-15, 09:48
That doesn't mean it's right. Not all devices properly conform to CRDA requirements. How is the router configured?
Not sure what you mean by router configuration but a number of laptops all work on it and Daphile on a thin client which is quite similar, linux, LMS and Jivelite.

paul-
2019-09-15, 16:54
What channel is your router set to operate? And what are the other wifi operating parameters.

diode84
2019-09-16, 04:59
What channel is your router set to operate? And what are the other wifi operating parameters.

2.4G is set to auto (channel 1,)
5G is set to channel 36.
Normal IP address and subnet mask. Do you want any other parameters.

paul-
2019-09-16, 05:18
Without knowing how crowded channel 1 is in your area, I would try to change it to see if there is any impact.

diode84
2019-09-16, 07:44
Without knowing how crowded channel 1 is in your area, I would try to change it to see if there is any impact.
I am about 1 mile from any other router and nothing has ever detected any other networks in range.

diode84
2019-09-16, 09:01
I think it is time to give up on WiFi so far away from the router. The Pi doesn't seem very powerful on WiFi so I will have to wire a LAN connection.
PiCorePlayer is brilliant and just what I needed so thank you to all involved and to all those giving help on the forum.
Thanks again, all the best.
diode84

Paul Webster
2019-09-16, 10:11
same dongle works perfectly on Daphile running on a thin client PC in the same position

Assuming you mean exactly the same dongle and not another dongle that has the same branding etc ... then that implies that there might be a setting or driver function that could be changed/enabled that would make it work better with a weak signal than the default in pCP.
The challenge would be to find what that is and then hope that it can be tweaked in the driver that pCP supplies (or find a different driver).

diode84
2019-09-17, 10:23
Assuming you mean exactly the same dongle and not another dongle that has the same branding etc ... then that implies that there might be a setting or driver function that could be changed/enabled that would make it work better with a weak signal than the default in pCP.
The challenge would be to find what that is and then hope that it can be tweaked in the driver that pCP supplies (or find a different driver).
Paul it's not going to be possible to go further with this as I had to use a powered usb hub and supplied it with 12v not 5v. The dongle is now dead and possibly my Pi as there was a small whiff of smoke from it.
Could be time to mourn it.

Man in a van
2019-09-18, 01:02
Paul it's not going to be possible to go further with this as I had to use a powered usb hub and supplied it with 12v not 5v. The dongle is now dead and possibly my Pi as there was a small whiff of smoke from it.
Could be time to mourn it.


I don't know why a usb hub is putting out 12v but if you are "lucky" the pi may have just Blown the polyfuse.

Put it on one side for a few days and see if it repairs itself.

A bit of a long shot :rolleyes:

ronnie

diode84
2019-09-18, 09:52
The hub put out 12v because I by mistake connected it to 12v. Hub knackered, current limit chip on Pis USB too also the WiFi dongle in at the time.