planteg
Posts: 13
Joined: Tue Apr 26, 2016 10:04 pm

Raspberry Pi 3, can't connect to my Router

Sat Apr 30, 2016 11:54 pm

Hi all,

brand new to Raspberry world, not so proficient with Linux, but may years in IT, under Windows.

My router does not broadcast the SSID, so I need, as far as I can see, to manually configure my connection. I googled a lot, tried a few procedures, but none worked :oops: .

My router is setup this way:

Security mode: WPA2-Personal
Channel width: auto
Channel: auto
Network: Mixed
Frequency: 2.4G and 5G

Here is my actual configuration:

interfaces

Code: Select all

# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

iface eth0 inet manual

#allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
wpa_replicant.conf

Code: Select all

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

network={
	ssid="ingp"
	psk="GP4490CSP3059"
}
iwconfig responds this

Code: Select all

wlan0     IEEE 802.11bgn  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=1496 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
ifcong responds this

Code: Select all

wlan0     Link encap:Ethernet  HWaddr b8:27:eb:ad:3b:fa  
          inet adr:169.254.9.133  Bcast:169.254.255.255  Masque:255.255.0.0
          adr inet6: fe80::ba27:ebff:fead:3bfa/64 Scope:Lien
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:242 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000 
          RX bytes:0 (0.0 B)  TX bytes:83758 (81.7 KiB)
sudo ifdown wlan0 answers this:

Code: Select all

ifdown: interface wlan0 not configured
Not configured :?: If I hover over the network icon on the top bar, I het "wlan0 configured 169.xxx.xxx.xxx". Now if I "sudo iwlist wlan0 scan", I get a list of the nearby networks. Just what am I doing wrong ???

If i connect with a cable on eth0, I get connoted instantly - I write that post using my raspberry !

Why is that so complicated !

Thanks a lot

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

Re: Raspberry Pi 3, can't connect to my Router

Sun May 01, 2016 12:18 am

First of all get /etc/network/interfaces back to its original state.
In most cases no changes are needed.

Code: Select all

# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual

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

allow-hotplug wlan1
iface wlan1 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Then change the 'network' block in /etc/wpa_supplicant/wpa_supplicant.conf as described in viewtopic.php?f=91&t=143814&p=950573#p949957

User avatar
DougieLawson
Posts: 39602
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Raspberry Pi 3, can't connect to my Router

Sun May 01, 2016 8:28 am

If you un-hide the SSID things will be a million times easier. You can use the GUI widget to connect to a visible network. To do it with the SSID hidden is a pain in the tail. Hiding the SSID doesn't add anything to security, it simply adds a layer of inconvenience.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

planteg
Posts: 13
Joined: Tue Apr 26, 2016 10:04 pm

Re: Raspberry Pi 3, can't connect to my Router

Sun May 01, 2016 9:49 pm

Hi DirkS and DougieLawson,

Thanks for your posts.

I tried to bring back to original content both interfaces and wpa_supplicant.conf and modifying network block, but that didn't work.

So first I booted again, hold Shift and re-installed Raspbian. Second I enabled SSID broadcasting, my SSID was discovered so I typed the password, and voilà I was connected. Third, I disabled the SSID broadcast, rebooted the Raspberry, and after a few seconds it connected back to my router :) .

I then had a look at wpa_supplicant.conf, it looked this way:

Code: Select all

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

network={
	ssid="my_SSID"
	psk="my_password"
	key_mgmt=WPA-PSK
}
country=CA was changed by Rasbian preferences, the network block was added by the Raspbian WiFi app.

So my advise to those who have a router that do not broadcast the SSID: have it broadcast for the time needed to connect your Raspberry and then turn off broadcasting.

I wonder if editing wpa_supplicant.conf is fully documented somewhere on Internet I googled but found only partial information here and there.

Happy Raspberry to all !

User avatar
DougieLawson
Posts: 39602
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Raspberry Pi 3, can't connect to my Router

Sun May 01, 2016 9:56 pm

planteg wrote: So my advise [sic] to those who have a router that do not broadcast the SSID: have it always broadcast for the time needed to connect your Raspberry and then turn off leave it broadcasting.
FTFY, you're welcome.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

Return to “Raspberry Pi OS”