BPowell3
Posts: 9
Joined: Wed Sep 13, 2017 10:50 pm

Pi 3 on board WiFi help

Wed Sep 13, 2017 11:31 pm

Hi guys. Please help. I've been searching for days and this is driving me insane. I have two SD cards; one with Ubuntu MATE and one with raspbian lite. I've installed MATE and wicd and their dependencies along with the usual updates but THAT'S IT so far as I'm trying to troubleshoot this issue. The WiFi works flawlessly in Ubuntu, but in lite I can't get it to work and the thing is driving me nuts. Eth0 works just fine. The only info I have is every solution I've tried hasn't worked, the OS seems to completely ignore the interface configs I made in /etc/network interfaces while I was troubleshooting, wlan0 reads on ifconfig as an ethernet device, scanning works but running ifdown yields an invalid interface error. Trying to power off the adapter with systemctl resulted in an invalid device error, and it's nothing recognised on lsusb HOWEVER an unknown device is. Dmesg also returns a string of errors which you can see below.

Code: Select all

[  559.660619] brcmfmac: brcmf_proto_bcdc_query_dcmd: brcmf_proto_bcdc_msg failed w/status -5
[  559.660631] brcmfmac: brcmf_cfg80211_get_tx_power: error (-5)
[  559.660717] brcmfmac: brcmf_fil_cmd_data: bus is down. we have nothing to do.
[  559.660723] brcmfmac: brcmf_link_down: WLC_DISASSOC failed (-5)
[  560.180578] brcmfmac: brcmf_fil_cmd_data: bus is down. we have nothing to do.
[  560.181935] brcmfmac: brcmf_fil_cmd_data: bus is down. we have nothing to do.
[  560.184861] brcmfmac: brcmf_fil_cmd_data: bus is down. we have nothing to do.
[  560.184879] brcmfmac: brcmf_cfg80211_get_channel: chanspec failed (-5)
[  560.265461] brcmfmac: brcmf_fil_cmd_data: bus is down. we have nothing to do.
[  560.265477] brcmfmac: brcmf_cfg80211_reg_notifier: Country code iovar returned err = -5
Many thanks for any help.

SurferTim
Posts: 1017
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Pi 3 on board WiFi help

Thu Sep 14, 2017 1:22 am

You shouldn't make any changes to /etc/network/interfaces. The only addition you should make is to
/etc/wpa_supplicant/wpa_supplicant.conf

Code: Select all

network={
  ssid="myssid"
  psk="mypassphrase"
}

BPowell3
Posts: 9
Joined: Wed Sep 13, 2017 10:50 pm

Re: Pi 3 on board WiFi help

Thu Sep 14, 2017 10:13 am

I changed /etc/network/interfaces while troubleshooting as it was suggested by another solution. I backed the original up as /etc/network/interfaces.old anyway so it can be easily restored to factory default, however the WiFi didn't work before and still doesn't. When adding an ssid and psk to wpa_supplicant.conf, the interface wlan0 is still recognised by ifconfig as ethernet. However, running ifup or ifdown wlan0 returns an unknown interface error.

SurferTim
Posts: 1017
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Pi 3 on board WiFi help

Thu Sep 14, 2017 11:02 am

If you are using Stretch, then ifup and ifdown no longer work, but this does:

Code: Select all

sudo ip link set wlan0 up
sudo ip link set wlan0 down

BPowell3
Posts: 9
Joined: Wed Sep 13, 2017 10:50 pm

Re: Pi 3 on board WiFi help

Thu Sep 14, 2017 11:19 am

Update:

I can get the WiFi to work from the command line when I don't have wicd or network-manager-gnome installed (not at the same time, for clarification) but it's recognised as an ethernet connection:

Code: Select all

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.5  netmask 255.255.255.0  broadcast 192.168.0.255
        ether b8:27:eb:42:03:13  txqueuelen 1000  (Ethernet)
        RX packets 14  bytes 2679 (2.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 23  bytes 3350 (3.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
If this is any indication of an issue, how can I fix it? And is there a way to get it to work graphically? Thanks.

SurferTim
Posts: 1017
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Pi 3 on board WiFi help

Thu Sep 14, 2017 11:43 am

My wlan0 shows ethernet also. It is working fine.

What do you mean "graphically"? Maybe the full version would work better for you. Is there a reason you are using the lite version?

Edit: Use iwconfig to check the wifi status.

BPowell3
Posts: 9
Joined: Wed Sep 13, 2017 10:50 pm

Re: Pi 3 on board WiFi help

Thu Sep 14, 2017 12:08 pm

I use the lite version because I don't like the full version's GUI and I find the version as a whole has a lot of bugs and problems. Thus I like to put my own software packages on, which also allows me to taylor the OS to my needs.

This is the only issue I'm having so far with lite and MATE. But it's a big issue as I often turn to wifi when I need the LAN cable for other devices or when I'm out on business presentations which I use my pi for as it's lightning-fast boot and load times make it ideal.

SurferTim
Posts: 1017
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Pi 3 on board WiFi help

Thu Sep 14, 2017 12:13 pm

I have Lite set as an AP. I'm using the full version now with two wifi interfaces, one as an AP, and the other as a backup internet connection (station). Both the ethernet and the client wifi will hotplug.

I've done this with Jessie and Stretch. Which are you having problems with?

BPowell3
Posts: 9
Joined: Wed Sep 13, 2017 10:50 pm

Re: Pi 3 on board WiFi help

Thu Sep 14, 2017 1:05 pm

As previously stated, I'm using the latest image with the latest updates and kernel. So it'll be stretch.

SurferTim
Posts: 1017
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Pi 3 on board WiFi help

Thu Sep 14, 2017 1:10 pm

The only file you need to modify to connect to a wifi AP as a client is /etc/wpa_supplicant/wpa_supplicant.conf. You should NOT modify anything in /etc/network/interfaces.

Code: Select all

network={
  ssid="myssid"
  psk="mypassphrase"
}
Then reboot and use iwconfig to check if the wifi connected.

Just to be sure, insure you have run these:

Code: Select all

sudo apt-get update
sudo apt-get upgrade
sudo rpi-update
Also insure you have set everything in rpi-config, including your wifi location.

BPowell3
Posts: 9
Joined: Wed Sep 13, 2017 10:50 pm

Re: Pi 3 on board WiFi help

Thu Sep 14, 2017 1:30 pm

Maybe you didn't understand the post I made an hour ago.

I edited the interfaces file because I was troubleshooting and it was suggested by an online solution. It was restored to its original backup when the solution didn't work.

I can now (after running rpi-update again) connect from the CLI but the GUI won't pick up the adaptor and I can't connect when wicd or network-manager-gnome is installed, even from the terminal.

SurferTim
Posts: 1017
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Pi 3 on board WiFi help

Thu Sep 14, 2017 1:33 pm

Raspbian Stretch Lite does not have a GUI.

BPowell3
Posts: 9
Joined: Wed Sep 13, 2017 10:50 pm

Re: Pi 3 on board WiFi help

Thu Sep 14, 2017 1:42 pm

Hence why I've installed MATE. As explained in my original post.

SurferTim
Posts: 1017
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Pi 3 on board WiFi help

Thu Sep 14, 2017 1:44 pm

Stick with one or the other. I gave you the setup with Raspbian. I don't use Mate. Maybe somebody else can help you with that.

SurferTim
Posts: 1017
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Pi 3 on board WiFi help

Thu Sep 14, 2017 11:08 pm

I couldn't resist. I loaded a spare SD with Ubuntu Mate. Had problems with the wifi UNTIL I opened
Applications -> System Tools -> Mate Terminal
and ran

Code: Select all

sudo apt-get update
Then rebooted. Then when you select the UpArrow/DownArrow icon on the upper right of the screen, all local wifi networks show up.

User avatar
davidcoton
Posts: 2386
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Pi 3 on board WiFi help

Thu Sep 14, 2017 11:17 pm

SurferTim wrote:
Thu Sep 14, 2017 11:08 pm
I couldn't resist. I loaded a spare SD with Ubuntu Mate. Had problems with the wifi UNTIL I opened
Applications -> System Tools -> Mate Terminal
and ran

Code: Select all

sudo apt-get update
Then rebooted. Then when you select the UpArrow/DownArrow icon on the upper right of the screen, all local wifi networks show up.
:?:
"update" only updates the catalogues, so that shouldn't change anything. The normal procedure to ensure up-to-date software is:

Code: Select all

sudo apt update
sudo apt upgrade
(Note the shorter "apt" command -- hope that works in Mate! "apt-get" should still work, too.)
"If it ain't broke, fix it until it is."
“Raspberry Pi is a trademark of the Raspberry Pi Foundation”
The Pink Unicorn is a symbol of commitment to sensible discussion of future versions of the Raspberry Pi ™

SurferTim
Posts: 1017
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Pi 3 on board WiFi help

Thu Sep 14, 2017 11:20 pm

davidcoton wrote:
SurferTim wrote:
Thu Sep 14, 2017 11:08 pm
I couldn't resist. I loaded a spare SD with Ubuntu Mate. Had problems with the wifi UNTIL I opened
Applications -> System Tools -> Mate Terminal
and ran

Code: Select all

sudo apt-get update
Then rebooted. Then when you select the UpArrow/DownArrow icon on the upper right of the screen, all local wifi networks show up.
:?:
"update" only updates the catalogues, so that shouldn't change anything. The normal procedure to ensure up-to-date software is:

Code: Select all

sudo apt update
sudo apt upgrade
(Note the shorter "apt" command -- hope that works in Mate! "apt-get" should still work, too.)
It certainly changed things here. I'll give your suggestion a try.

Edit: My version didn't like the apt at all. I had to reboot. The apt-get versions seem to be working ok. I'm doing the upgrade right now.

Edit2: Big problem. The upgrade partially worked. The new version of Firefox included with the upgrade crashes like the Hindenburg. And no sound.

User avatar
HawaiianPi
Posts: 1282
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Pi 3 on board WiFi help

Fri Sep 15, 2017 8:18 am

Here is what you need to do to connect to your WiFi with either the Desktop or Lite version of Raspbian at first boot.

Download one of the Raspbian images (desktop or lite) and use Etcher to write it to an SD card. There is no need to format the card or extract the image prior to using Etcher. Etcher can write the image directly from the archive, and the file system is contained in the image.

If you have trouble writing the image, verify the download with the published SHA-256 checksum from the download page. There is a nice little Windows shell extension called HashCheck that adds a checksums tab to file properties which you can use to check the downloaded file.

When Etcher has successfully written and verified the card it will safely eject it. Unplug the card or card reader and plug it back in so your computer will see the small FAT32 formatted boot partition.

If you want to enable SSH create an empty file named "ssh" or "ssh.txt" on the small FAT32 boot partition of the SD card.

To connect to a wireless router create another file called "wpa_supplicant.conf" which contains the following info.

Code: Select all

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

network={
	ssid="Your network SSID"
	psk="Your WPA/WPA2 security key"
	key_mgmt=WPA-PSK
}
Edit the country code, SSID and the WPA/WPA2 key with the info you need to connect to your network.

Note to SurferTim: The minimal wpa_supplicant.conf you're recommending that used to work with Jessie does not work with Stretch.

If you are using an ethernet cable to connect to your router you can skip that second file.

Safely eject the card from your computer and use it to boot the Raspberry Pi. When Raspbian finds the "ssh" file it will enable SSH and delete the file. When Raspbian finds the wpa_supplicant.conf file it will move it to the correct location and connect to your router.
My password is the last 8 digits of Pi.

SurferTim
Posts: 1017
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Pi 3 on board WiFi help

Fri Sep 15, 2017 10:44 am

Note to HawaiianPi: If I wasn't clear, that was to be added to the default content, not replacing it.

win_it92
Posts: 2
Joined: Wed Sep 13, 2017 3:32 pm

Re: Pi 3 on board WiFi help

Fri Sep 15, 2017 2:04 pm

Hi
I recently installed the latest raspbian Stretch version. I am having issues running the in-built Wifi. I edited the wpa_supplicant.conf file by adding my network (ssid, psk, key_mgmt) and updating the country to US.

The ifconfig does not show wlan0 interface running. It shows eth0(as I had ethernet cable attached) and lo interface.

When I tried :
sudo iwlist wlan0 scan
I get:
wlan0 Interface doesn’t support scanning

Hence, iwconfig does not show wlan0.

And,
sudo ifconfig wlan0 up
shows
wlan0: ERROR while getting interface flags: No such device

And when I do :
sudo wpa_cli
last line says:
Could not connect to wpa_supplicant: (null)- re-trying.

I have not edited the /etc/network/interfaces file or /etc/dhcpcd.conf file.

Please let me know what I am missing.

Thanks

Return to “Troubleshooting”

Who is online

Users browsing this forum: No registered users and 51 guests