Sunday, September 25, 2016

CentOS - configure wireless from command line

1. Make sure about wpa_supplicant package
# rpm -qa | grep wpa_supplicant
On my laptop, I found wpa_supplicant-2.0-17.el7_1.x86_64

2. Get wifi interface name
# nmcli d
On my laptop, it showed
enp7s0         ethernet   unavailable     --
lo                 loopback unmanaged      --
wlp5s0         wifi         unmanaged      --

3. Add configuration to /etc/wpa_supplicant/wpa_supplicant.conf

ssid="Your SSID"
psk="Your password"

4. Configure dhcp client in /etc/sysconfig/network
GATEWAY=<Your gateway>

5. Start wpa_supplicant daemon with option -i wlp5s0
For me, I start wpa_supplicant daemon by using systemd. I have to modify ExecStart in /lib/systemd/system/wpa_supplicant.service as follows:
ExecStart=/usr/sbin/wpa_supplicant -i wlp5s0 -u -f /var/log/wpa_supplicant.log -c /etc/wpa_supplicant/wpa_supplicant.conf

And then,
# systemctl start wpa_supplicant

Check log
# tail -f /var/log/wpa_supplicant.log


Prabakaran .K said...

Hello sir first of all thanks post on to emulate Aladdin hasp srm dongle.i did your previous method unable emulate dongle

Sai Tex said...

unable find password used hasphl2010 to find password aladdin hasp srm key am used win xp