Wlan0 shown down Rasperry pi 3b+

Hello,

I am new to nethserver and I tried to install nethserver 7.9.2009 on Raperry pi 3b+, on board LAN connected to Internet and wlan0 for LAN.

The wlan0 shown down and I dot found the SSID in my laptop… I tried by reading the forum and configured the wpa_supplicant accordingly.

[root@mygw01 ~]# iwconfig
wlan0     IEEE 802.11  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:on
          
eth0      no wireless extensions.

lo        no wireless extensions.
[root@mygw01 ~]# cat /etc/sysconfig/wpa_supplicant
# Use the flag "-i" before each of your interfaces, like so:
#  INTERFACES="-ieth1 -iwlan0"
INTERFACES="-iwlan0"

# Use the flag "-D" before each driver, like so:
#  DRIVERS="-Dwext"
DRIVERS=""

# Other arguments
#   -u   Enable the D-Bus interface (required for use with NetworkManager)
#   -f   Log to /var/log/wpa_supplicant.log
#   -P   Write pid file to /var/run/wpa_supplicant.pid 
#        required to return proper codes by init scripts (e.g. double "start" action)
#        -B to daemonize that has to be used together with -P is already in wpa_supplicant.init.d
OTHER_ARGS="-P /var/run/wpa_supplicant.pid"
[root@mygw01 ~]# cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

network={
        ssid="myhome"
        scan_ssid=1
        key_mgmt=WPA-PSK
        psk="12345678"
}
[root@mygw01 ~]# wpa_cli status
Selected interface 'p2p-dev-wlan0'
wpa_state=DISCONNECTED
p2p_device_address=7a:31:a5:41:de:e7
address=7a:31:a5:41:de:e7
uuid=14a71821-f1fd-5dcd-bebf-659cbd7b5105
[root@mygw01 ~]# wpa_cli -iwlan0
wpa_cli v2.6
Copyright (c) 2004-2016, Jouni Malinen <j@w1.fi> and contributors

This software may be distributed under the terms of the BSD license.
See README for more details.



Interactive mode

<3>CTRL-EVENT-SCAN-FAILED ret=-110 retry=1
<3>CTRL-EVENT-SCAN-FAILED ret=-110 retry=1
<3>CTRL-EVENT-SCAN-FAILED ret=-110 retry=1
<3>CTRL-EVENT-SCAN-FAILED ret=-110 retry=1
> [root@mygw01 ~]# 

Please help to bring up the wlan0 to access the ssid which i configured

The interface status

first check the firmware supports it

please post the results of

lsmod | grep brcmfmac

and

uname -a

also try

ifconfig wlan0 up

Also assuming the drivers are installed and firmware was updated
try this

first remove the changes to your supplicant.conf file and correct it with this

cat > /etc/wpa_supplicant/wpa_supplicant.conf <<EOF
country=<your country code>
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
update_config=1

EOF

then add your ssid details

wpa_passphrase "YOUR-SSID" YOUR-PASSWD >> /etc/wpa_supplicant/wpa_supplicant.conf

then

add the driver variable in /etc/sysconfig/wpa_supplicant

(i.e., replace)

[truncated]
#  DRIVERS="-Dwext"
DRIVERS=""

with

[truncated]
#  DRIVERS="-Dwext"
DRIVERS="-Dbrcmfmac"

then run
wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf

to make sure /var/run/wpa_supplicant is there

then run

wpa_cli reconfigure

*please note you will have difficulties if your password has $ in it as it will ignore it and anything that comes after it also I’ve found using wifi on the Raspberry Pi can cause ssh to drop after a few seconds there is a work around but I can’t find it in my notes

Shane,

[root@mygw01 ~]# lsmod | grep brcmfmac
brcmfmac 319488 0
brcmutil 20480 1 brcmfmac
cfg80211 675840 1 brcmfmac
[root@mygw01 ~]# uname -a
Linux mygw01.mylab.lab 5.4.225-v7l.1.el7 #1 SMP Mon Jan 2 16:00:09 UTC 2023 armv7l armv7l armv7l GNU/Linux
[root@mygw01 ~]# ifconfig wlan0 up
[root@mygw01 ~]#

[root@mygw01 ~]# cat /etc/sysconfig/wpa_supplicant | grep Dbr
DRIVERS=“Dbrcmfmac”
[root@mygw01 ~]# wpa_cli reconfigure
Selected interface ‘p2p-dev-wlan0’
OK
[root@mygw01 ~]#

[root@mygw01 ~]# cat /etc/wpa_supplicant/wpa_supplicant.conf
country=
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
update_config=1

network={
ssid=“myhome”
#psk=“12345678”
psk=785088262e620dec0e7a6b50d16ae19e49159d173828d33900bc698322b87545
}
[root@mygw01 ~]#

[root@mygw01 ~]# wpa_cli status
Selected interface ‘p2p-dev-wlan0’
wpa_state=DISCONNECTED
p2p_device_address=ce:7d:70:9f:b7:81
address=ce:7d:70:9f:b7:81
uuid=14a71821-f1fd-5dcd-bebf-659cbd7b5105
[root@mygw01 ~]#

[root@mygw01 ~]# wpa_cli -iwlan0
wpa_cli v2.6
Copyright (c) 2004-2016, Jouni Malinen j@w1.fi and contributors

This software may be distributed under the terms of the BSD license.
See README for more details.

Interactive mode

scan
OK
<3>CTRL-EVENT-SCAN-STARTED

scan_results
bssid / frequency / signal level / flags / ssid
00:14:6c:ff:70:e2 2462 -27 [WPA2-PSK-CCMP-preauth][ESS] NG1
7c:cb:e2:de:e1:71 2412 -46 [WPA2-PSK-CCMP][WPS][ESS] MHS1

NOW THE WLAN0 UP. but i do not found the ssid (myhome) found on the local machine. I want to turn the Pi as wireless AP, is that correct way to do it? or I missing something

[root@mygw01 ~]# cat /etc/wpa_supplicant/wpa_supplicant.conf
country=
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
update_config=1

network={
ssid=“myhome”
#psk=“12345678”
psk=785088262e620dec0e7a6b50d16ae19e49159d173828d33900bc698322b87545
}
[root@mygw01 ~]#

In your network config you need to specify the gateway and if your using it as a wifi ap there is some more configuration to do as this will just connect to the wifi not become an access point are you connecting to the network with Ethernet and wanting to then have clients connect to the Raspberry Pi wifi ?

1 Like

Yes, Want to turn the raspi to AP

You could try the steps listed here just substitute apt-get for yum