rddisco
Posts: 6
Joined: Sun May 31, 2015 12:59 am
Location: London, UK

I can't configure my WiFi

Sun May 31, 2015 2:34 pm

Hello,

I am having some problems installing a Wifi dongle to my Pi2 B running FC21. When I query the system via nmcli I get:

Code: Select all

[root@dstar01 ~]# nmcli g
STATE      CONNECTIVITY  WIFI-HW  WIFI     WWAN-HW  WWAN
connected  full          enabled  enabled  enabled  enabled
[root@dstar01 ~]# nmcli n
enabled
[root@dstar01 ~]# nmcli r
WIFI-HW  WIFI     WWAN-HW  WWAN
enabled  enabled  enabled  enabled
[root@dstar01 ~]# nmcli c
NAME   UUID                                  TYPE             DEVICE
eth0   671cfeb2-bef6-44a8-b9f4-e03e92d390e9  802-3-ethernet   eth0
wlan0  2396f7bd-4ad5-41de-8b0b-9adfed9942ac  802-11-wireless  --
[root@dstar01 ~]# nmcli d
DEVICE  TYPE      STATE      CONNECTION
eth0    ethernet  connected  eth0
lo      loopback  unmanaged  --
wlan0   wifi      unmanaged  --
[root@dstar01 ~]#
I believe the problem is that somehow the dongle is not linked to wlan0. How can I fix this? Also, when I run ifconfig and iwconfig I get:

Code: Select all

[root@dstar01 ~]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.88  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::ba27:ebff:fe31:dd42  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:31:dd:42  txqueuelen 1000  (Ethernet)
        RX packets 2856  bytes 242344 (236.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1278  bytes 171054 (167.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 8  bytes 800 (800.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 8  bytes 800 (800.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[root@dstar01 ~]# iwconfig
wlan0     IEEE 802.11bgn  ESSID:off/any
          Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off

lo        no wireless extensions.

eth0      no wireless extensions.

[root@dstar01 ~]#
From iwconfig I can see that the dongle seems to be visible in the system, I just can't get it to work and connect. I tried to configure /etc/wpa_supplicant/wpa_supplicant.conf to no avail.

Many thanks.
Running:

Two Pidora systems on Pi 1 B
One FC21 system on Pi 2 B

martyn
Posts: 8
Joined: Sat Dec 24, 2011 3:41 pm

Re: I can't configure my WiFi

Sun May 31, 2015 7:13 pm

Open a terminal or working in the command line.

Try:

Code: Select all

sudo wpa_passphrase [Network SSID] [networkpassword] >> /etc/wpa_supplicant/wpa_supplicant.conf
where [Network SSID] is your wireless connection and
[networkpassword] is the password for your wireless network.

then

Code: Select all

sudo nano /etc/network/interfaces
and ensure the following exists in there

Code: Select all

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Finally,

Code: Select all

sudo ifdown wlan0
sudo ifup wlan0
It should then find your network and connect you.

As an aside, the first line in this actually places the plain text password into the wpa_supplicant.conf file. I don't know if this is a good idea. I delete that line by using nano and CTRL+K on that line.

Best of luck.

Martyn.

rddisco
Posts: 6
Joined: Sun May 31, 2015 12:59 am
Location: London, UK

Re: I can't configure my WiFi

Sun May 31, 2015 7:51 pm

martyn wrote:
It should then find your network and connect you.

As an aside, the first line in this actually places the plain text password into the wpa_supplicant.conf file. I don't know if this is a good idea. I delete that line by using nano and CTRL+K on that line.

Best of luck.

Martyn.
Thanks Martyn.

I tried to follow all your instructions. I had no /etc/network directory in my system, so I proceeded creating it and then populating it with the interfaces file and the contents in your recommendation. When I got to the end I had:

Code: Select all

[root@dstar01 network]# ifdown wlan0
[root@dstar01 network]# ifup wlan0
Error: no device found for connection 'wlan0'

[root@dstar01 etc]# iwconfig
wlan0     IEEE 802.11bgn  ESSID:off/any
          Mode:Managed  Frequency:2.457 GHz  Access Point: Not-Associated
          Tx-Power=20 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off

lo        no wireless extensions.

eth0      no wireless extensions.

Thank you for your help.

Raul
Running:

Two Pidora systems on Pi 1 B
One FC21 system on Pi 2 B

martyn
Posts: 8
Joined: Sat Dec 24, 2011 3:41 pm

Re: I can't configure my WiFi

Sun May 31, 2015 8:42 pm

Aahhh sorry Raul,

Those instructions would only work for Rasbian - they are Debian based.

I am sorry, I don't have the knowledge to help with Pidora which is Fedora based.

EDIT TO ADD:

The following might help

https://fedoraproject.org/wiki/Networking/CLI

Martyn.

rddisco
Posts: 6
Joined: Sun May 31, 2015 12:59 am
Location: London, UK

Re: I can't configure my WiFi

Sun May 31, 2015 10:29 pm

I made some progress, but am still having problems. I am now able to obtain an IP address from the DHCP server but when I reboot the system the WiFi interface is unable to acquire the address automatically so I need to run 'dhclient -r' first and then 'dhclient wlan0' for it to re-acquire the address. Here's what I've done:

Step 1:

I created a basic file /etc/wpa_supplicant/wpa_supplicant.conf as follows:

Code: Select all

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
Edited /etc/sysconfig/wpa_supplicant

Code: Select all

# 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="Dwext"

# 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="-u -f /var/log/wpa_supplicant.log -P /var/run/wpa_supplicant.pid"
Then:

Code: Select all

/sbin/chkconfig wpa_supplicant on
/sbin/service wpa_supplicant start
If all this is correct, I set a link between the drivers and wlan0, and then enabled wpa_supplicant and set it to start when the system boots. Then I proceeded with editing /etc/sysconfig/network-scripts/ifcfg-wlan0 as follows:

Code: Select all

BOOTPROTO=dhcp
DEFROUTE=yes
DEVICE=wlan0
ESSID="My-WiFi-SSID"
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
KEY_MGMT=WPA-PSK
MODE=Managed
NAME=wlan0
NM_CONTROLLED=yes
ONBOOT=yes
PEERDNS=yes
PEERROUTES=yes
TYPE=Wireless
USERCTL=yes
UUID=2396f7bd-4ad5-41de-8b0b-9adfed9942ac
WPA_ALLOW_WPA=yes
WPA_ALLOW_WPA2=yes
ZONE=trusted
After this I generated the passphrase with (substitute SSID and passphrase as appropriate):

Code: Select all

wpa_passphrase SSID passphrase > /etc/wpa_supplicant/wpa_supplicant.conf
I then started the WPA process with

Code: Select all

wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
And then

Code: Select all

dhclient -r
dhclient wlan0
And here is where I am stuck: it works but I need to repeat these last two steps every time I reboot the Pi. Can anyone help me to resolve this issue? Basically I think I need to start dhclient when the system boots. Any ideas?

Many thanks.

Raul
Running:

Two Pidora systems on Pi 1 B
One FC21 system on Pi 2 B

PiAaargh2
Posts: 1
Joined: Thu Jun 04, 2015 8:14 pm

Re: I can't configure my WiFi

Sat Jun 06, 2015 11:14 pm

I'm absolutely new to Linux, Fedora and Raspberry Pi, but I decided to install Clivem's Minimal Fedora 21 image as my first toe in the water. I too have had Wifi problems, messing around for a couple of hours with the /etc/sysconfig/network-scripts, nmcli and wpa_supplicant with varying degrees of success. Finally gave up at the stage where I needed the Wifi connection to automatically seek a DHCP address and it stubbornly refused to do so.

So I reverted back to Clivem's original image, enlarged the root partition, ran the sc-cleanUpdate-pi, set a hostname and then yum installed NetworkManager-wifi (which brings down wpa_supplicant) and NetworkManager-tui.

Using nmtui was incredibly simple and worked first time. As an absolute noob, I'm not really in a position to hand out meaningful advice, but if you're stuck, this is what gave me a headless Pi with a working Wifi connection.

Good luck.

wilsonb
Posts: 9
Joined: Thu Sep 11, 2014 4:13 pm

Re: I can't configure my WiFi

Wed Nov 01, 2017 6:43 pm

Yes , I also like nmuti.. I had it installed a year ago and can't figure how to install it again.

Only thing I can find is Red Hat related.. Blaaa
can yum install it but don't know the repository to enable..

Anyone?

Return to “Pidora / Fedora”

Who is online

Users browsing this forum: No registered users and 1 guest