soydepr
Posts: 155
Joined: Mon Mar 24, 2014 10:51 am

wlan0 (reinstalled)

Thu Mar 30, 2017 1:06 am

trying to set up static ip now brought my wifi down.

trying to restore dynamic and during boot i see "a job starting for all interfaces ......

my wlan0 seems not to be associated regardless of my wpa_supplicant.conf file looking good


i have in wpa_supplicant.conf

ctrl_interface ..... etc

network ={
ssid= "foo"
psk="foo"
key_msmg=WPA-PSK
}

and my wifi is still down
Last edited by soydepr on Sun Apr 02, 2017 9:45 pm, edited 1 time in total.

knute
Posts: 477
Joined: Thu Oct 23, 2014 12:14 am
Location: Texas
Contact: Website

Re: wlan0

Thu Mar 30, 2017 6:15 pm

key_mgmt=WPA-PSK?

MrEngman
Posts: 3859
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: wlan0

Thu Mar 30, 2017 6:55 pm

soydepr wrote:trying to set up static ip now brought my wifi down.

trying to restore dynamic and during boot i see "a job starting for all interfaces ......

my wlan0 seems not to be associated regardless of my wpa_supplicant.conf file looking good


i have in wpa_supplicant.conf

ctrl_interface ..... etc

network ={
ssid= "foo"
psk="foo"
key_msmg=WPA-PSK
}

and my wifi is still down
In file wpa_supplicant.conf remove the spaces around the equal signs. eg network={ and ssid="foo"



MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

soydepr
Posts: 155
Joined: Mon Mar 24, 2014 10:51 am

Re: wlan0

Fri Mar 31, 2017 2:21 pm

there is none

here is my file and same configuration works on my other pi

update_config=1
country=US

network={
ssid="COQUI"
psk="7777"
key_mgmt=WPA-PSK



wlan0 Link encap:Ethernet HWaddr b8:27:eb:15:37:71
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)


in the gui it says no wireless interface found


ifup wlan0 generates this

run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
Failed to bring up wlan0.


dmesg shows this
7.252653] brcmfmac: brcmf_add_if: ERROR: netdev:wlan0 already exists
[ 7.262338] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

soydepr
Posts: 155
Joined: Mon Mar 24, 2014 10:51 am

Re: wlan0

Sat Apr 01, 2017 2:37 pm

last day before i just reinstall

here is my iwlist scan
wlan0 Scan completed :
Cell 01 - Address: 48:EE:0C:5D:F5:8C
Channel:11
Frequency:2.462 GHz (Channel 11)
Quality=70/70 Signal level=-29 dBm
Encryption key:on
ESSID:"Coqui"
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s
Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s
Mode:Master


trying ifup wlan0
ifup: failed to open lockfile /run/network/.ifstate.lock: No such file or director

[ 7.596008] brcmfmac: brcmf_add_if: ERROR: netdev:wlan0 already exists
[ 7.600593] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

clearly wlan0 is not associated

wlan0 Link encap:Ethernet HWaddr b8:27:eb:15:37:71
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:71 errors:0 dropped:71 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:26372 (25.7 KiB) TX bytes:0 (0.0 B)


may some good soul be able to help me :?

MrEngman
Posts: 3859
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: wlan0

Sat Apr 01, 2017 4:13 pm

soydepr wrote:there is none

here is my file and same configuration works on my other pi

update_config=1
country=US

network={
ssid="COQUI"
psk="7777"
key_mgmt=WPA-PSK



wlan0 Link encap:Ethernet HWaddr b8:27:eb:15:37:71
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)


in the gui it says no wireless interface found


ifup wlan0 generates this

run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
Failed to bring up wlan0.


dmesg shows this
7.252653] brcmfmac: brcmf_add_if: ERROR: netdev:wlan0 already exists
[ 7.262338] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
I would expect wpa_supplicant.conf to look more like this

Code: Select all

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

network={
        ssid="network-name"
        psk="network-password"
        key_mgmt=WPA-PSK
}
You show no line "ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev" and no"}" at the end of the file or is this just another typo.

Would also be helpful if you post file details in code brackets.

I use the above format without the line "key_mgmt=WPA-PSK" on all my different Pi's using a variety of different wifi modules without problems.

And my /etc/network/interfaces file is the default

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-conf /etc/wpa_supplicant/wpa_supplicant.conf

allow-hotplug wlan1
iface wlan1 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Don't try editing anything in this file.

As you get a message about wlan0 already existing do you have a file /etc/udev/rules.d/95-ralink.rules. If you do delete it.



MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

soydepr
Posts: 155
Joined: Mon Mar 24, 2014 10:51 am

Re: wlan0

Sat Apr 01, 2017 9:30 pm

well first thanks for your help .

i removed the rules and that fsck my bluetooth keyboard -not a biggy i can fix that the was not the ralinx one

here are the files request
# 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-conf /etc/wpa_supplicant/wpa_supplicant.conf

allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US

network={
ssid="Coqui"
psk="Grove"
key_mgmt=WPA-PSK

MrEngman
Posts: 3859
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: wlan0

Sat Apr 01, 2017 9:53 pm

soydepr wrote:well first thanks for your help .

i removed the rules and that fsck my bluetooth keyboard -not a biggy i can fix that the was not the ralinx one

here are the files request
# 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-conf /etc/wpa_supplicant/wpa_supplicant.conf

allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US

network={
ssid="Coqui"
psk="Grove"
key_mgmt=WPA-PSK
There is no "}" at the end of the network={...} section or is that just another typo.



MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

soydepr
Posts: 155
Joined: Mon Mar 24, 2014 10:51 am

Re: wlan0

Sat Apr 01, 2017 10:04 pm

there was none but i added and still same errors during boot and ifup as well

Code: Select all

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

network={
	ssid="Coqui"
        psk="Grove"
	key_mgmt=WPA-PSK  
}/code]

MrEngman
Posts: 3859
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: wlan0

Sat Apr 01, 2017 11:27 pm

I've checked out the version of wpa_supplicant.conf on my Pi by adding the line "key_mgmt=WPA-PSK" and it boots and the wifi works as it usually does. My /etc/network/interfaces file is the default

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-conf /etc/wpa_supplicant/wpa_supplicant.conf

allow-hotplug wlan1
iface wlan1 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
and the /etc/wpasupplicant/wpa_supplicant.conf file is set up like yours and is now

Code: Select all

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

network={
        ssid="network-name"
        psk="network-password"
        key_mgmt=WPA-PSK
}
So looks like your /etc/network/interfaces and /etc/wpa_supplicant/wpa_supplicant.conf files should probably be OK.

If you got the problems when trying to set up a static address, presumably by editing file /etc/dhcpcd.conf, maybe there's an issue with that file.

Wifi connectivity can be a bit strange at times. When I've had problems connecting sometimes shutting down the Pi and turning off the power supply and then turning it back on again has helped fix it.

Also when trying to use sudo ifup wlan0 you really should use command sudo ifdown wlan0 first then sudo ifup wlan0

If you are using a wifi adapter plugged into the USB it can also help while the Pi is running to unplug the wifi adapter, wait a short time, then plug it back in again.

Not sure what else to suggest at the moment.



MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

soydepr
Posts: 155
Joined: Mon Mar 24, 2014 10:51 am

Re: wlan0

Sun Apr 02, 2017 12:03 am

well thanks a lot. your time is much appretiated

i had two strange lines in /etc/dhcpcd.conf - now removed still same issue

what confuses me is why ifup and ifdown looking in /var/run/network - when i am trying to use dhcpcd

$ sudo ifup wlan0 down
ifup: failed to open lockfile /run/network/.ifstate.lock: No such file or directory


also what is this kernel module failing to load



dmesg |grep -i fai
[ 2.251845] systemd[1]: Cannot add dependency job for unit regenerate_ssh_host_keys.service, ignoring: Unit regenerate_ssh_host_keys.service failed to load: No such file or directory.
[ 3.391858] systemd[1]: systemd-modules-load.service: main process exited, code=exited, status=1/FAILURE
[ 3.421113] systemd[1]: Failed to start Load Kernel Modules.
[ 3.430400] systemd[1]: Unit systemd-modules-load.service entered failed stat


i went back and reverse some commands i had ran trying to switch to static

sudo systemctl disable networking
sudo systemctl enable dhcpcd
sudo systemctl daemon-reload

sudo reboot

still no luck

MrEngman
Posts: 3859
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: wlan0

Sun Apr 02, 2017 12:48 am

Not sure what those errors are.

Why you need to run the commands you have to help get a static address I don't know. Surely it should just be necessary to add the static address section to the end of the /etc/dhcpcd.conf file and then reboot. Just don't edit file /etc/network/interfaces.

I don't bother setting static IPs and just use DHCP as my router always sets the same address for each of the network connections dependent on the wifi dongle used on a Pi. I guess its setting addresses dependent on the MAC address of the interface, eth or wifi.



MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

soydepr
Posts: 155
Joined: Mon Mar 24, 2014 10:51 am

Re: wlan0

Sun Apr 02, 2017 1:55 am

i think the main cause is the wlan0 is not associated to my wifi...

ill give it a short try tomorrow if not i will reinstall.

many thanks

soydepr
Posts: 155
Joined: Mon Mar 24, 2014 10:51 am

Re: wlan0

Sun Apr 02, 2017 2:47 am

for a moment i got wifi with root but when rebooted i cant replicate

i did iwconfig essid foo ap foo; ifup wlan0 up

also

this is interesting but don't know what it means

non working pi /etc/init.d/dhcpcd status

Code: Select all

dhcpcd.service - dhcpcd on all interfaces
   Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled)
   Active: active (running) since Sat 2017-04-01 22:32:38 EDT; 32s ago
  Process: 1764 ExecStop=/sbin/dhcpcd -x (code=exited, status=0/SUCCESS)
  Process: 1770 ExecStart=/sbin/dhcpcd -q -b (code=exited, status=0/SUCCESS)
 Main PID: 1772 (dhcpcd)
   CGroup: /system.slice/dhcpcd.service
           └─1772 /sbin/dhcpcd -q -b

Apr 01 22:32:38 spycam dhcpcd[1770]: version 6.7.1 starting
Apr 01 22:32:38 spycam dhcpcd[1770]: dev: loaded udev
Apr 01 22:32:38 spycam dhcpcd[1770]: wlan0: adding address fe80::7a37:f5a0:def7:1d81 <<<< no good 
Apr 01 22:32:38 spycam systemd[1]: Started dhcpcd on all interfaces.
Apr 01 22:32:38 spycam dhcpcd[1772]: eth0: waiting for carrier
Apr 01 22:32:38 spycam dhcpcd[1772]: wlan0: waiting for carrier



on a working pi

[email protected]:/home/soydepr# /etc/init.d/dhcpcd status
● dhcpcd.service - dhcpcd on all interfaces
Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled)
Active: active (running) since Sat 2017-04-01 22:17:04 EDT; 26min ago
Process: 494 ExecStart=/sbin/dhcpcd -q -b (code=exited, status=0/SUCCESS)
Main PID: 496 (dhcpcd)
CGroup: /system.slice/dhcpcd.service
└─496 /sbin/dhcpcd -q -b

Apr 01 22:17:05 coqui dhcpcd[496]: wlan0: waiting for carrier
Apr 01 22:17:05 coqui dhcpcd[496]: wlan0: carrier acquired
Apr 01 22:17:05 coqui dhcpcd[496]: DUID 00:01:00:01:1f:cb:3b:ab:b8:27:eb:d3...b5
Apr 01 22:17:05 coqui dhcpcd[496]: wlan0: IAID eb:d3:cd:b5
Apr 01 22:17:05 coqui dhcpcd[496]: wlan0: rebinding lease of 192.168.1.4
Apr 01 22:17:06 coqui dhcpcd[496]: wlan0: soliciting an IPv6 router
Apr 01 22:17:11 coqui dhcpcd[496]: wlan0: leased 192.168.1.4 for 3600 seconds
Apr 01 22:17:11 coqui dhcpcd[496]: wlan0: adding route to 192.168.1.0/24
Apr 01 22:17:11 coqui dhcpcd[496]: wlan0: adding default route via 192.168.1.1
Apr 01 22:17:18 coqui dhcpcd[496]: wlan0: no IPv6 Routers available
Hint: Some lines were ellipsized, use -l to show in full.

soydepr
Posts: 155
Joined: Mon Mar 24, 2014 10:51 am

Re: wlan0

Sun Apr 02, 2017 2:09 pm

After reinstalling i have same issue, i do see now supplicant error failed to start Shit still no wifi even though
Noobs found the wifi


I think the root of my problem is this

Main different of this pi from the other is bgn is attached to the driver 802.11bgn

http://raspberrypi.stackexchange.com/qu ... alfunction

soydepr
Posts: 155
Joined: Mon Mar 24, 2014 10:51 am

Re: wlan0 (reinstalled)

Sun Apr 02, 2017 9:46 pm

After 2 reinstalled i am back to normal

Return to “General discussion”