Manual wireless setting on Fedora 12

This post was written by eli on January 27, 2017
Posted Under: emergency,Internet,Linux,Notes to self

What’s this?

This is a note for myself, in case I need a quick replacement for my ADSL connection on the desktop computer (Fedora 12, and oldie). It may seem paradoxical that I’ll read this in order to access the internet (…), but this is probably where I would look first. With my cellphone, which is also the temporary access point, that is.

In short, there’s a lot of stuff here particular to my own computer.

I’m using the small TP-LINK dongle (TL-WN725N), which is usually doing nothing in particular.

Notes to self

  • This post is also on your local blog (copy-paste commands…)
  • wlan1 is the Access Point dongle (maybe use it instead…?)
  • Put the phone in the corner next to the door (that’s where I get a 4G connection) once the connection is established…
  • … but not before that, so you won’t run back and forth

Setting up the interface

# service ADSL off
# /etc/sysconfig/network-scripts/firewall-wlan0
# ifconfig wlan0 up
# wpa_supplicant -B -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
ioctl[SIOCSIWAP]: Operation not permitted
# iwlist wlan0 scan
wlan0     Scan completed :
          Cell 01 - Address: 00:34:DA:3D:F8:F5
                    ESSID:"MYPHONE"
                    Protocol:IEEE 802.11bgn
                    Mode:Master
                    Frequency:2.462 GHz (Channel 11)
                    Encryption key:on
                    Bit Rates:108 Mb/s
                    Extra:rsn_ie =30140100000fac040100000fac040100000fac020c00
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    IE: Unknown: DD5C0050F204104A0001101044000102103B00010310470010A7FED45DE0455F5DB64A55553EB96669102100012010230001201024000120104200012010540008000000000000000010110001201008000221481049000600372A000120
                    Quality:0  Signal level:0  Noise level:0

# iwconfig wlan0 essid MYPHONE
# dhclient wlan0 &

Note that wpa_supplicant complained, and it was still fine. Use the -d or -dd flags for some debugging info.

It seems like the iwconfig is redundant, as wpa_supplicant handles this, thanks to the “scan_ssid=1″ attribute in the config entry (?). The DHCP client isn’t redundant, because the routing table isn’t set correctly without it (making wlan0 the default gateway)

Shutting down

  • Kill wpa_supplicant (it was run as a daemon)
  • Kill DHCP client:
    # dhclient -r
  • Restart networking
    # service network restart
    # service firewall restart
    # service ADSL start

WPA supplicant config file

The WPA supplicant scans wlan0 and finds matching SSIDs. If such is found, it sends the password. Looks like it handles the association.

/etc/wpa_supplicant/wpa_supplicant.conf should read:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

network={
  ssid="MYPHONE"
  scan_ssid=1
  key_mgmt=WPA-PSK
  psk="MYPASSWORD"
}

(it’s already this way)

Add a Comment

required, use real name
required, will not be published
optional, your blog address