Showing posts with label WiFi Adapter. Show all posts
Showing posts with label WiFi Adapter. Show all posts

Sunday, November 25, 2018

How to configure wireless network interface using CLI in Fedora Server

I wanted to use my wireless network adapter on Fedora Server (version 29). Even though there are ways configure it graphically on Fedora Server, I wanted to configure it using only CLI with minimum steps.

When I plugged the adapter to my server, it was shown as wlp0s21f0u4,

ip a command output,

wlp0s21f0u4: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000

Therefore I chose wlp0s21f0u4 as my connection name.

Here are the steps I followed,

1. Create a network configuration file in /etc/sysconfig/network-scripts directory. File name: ifcfg-wlp0s21f0u4 (i.e. ifcfg-<connection name>)


Content of the file is,

[root@localhost network-scripts]# cat ifcfg-wlp0s21f0u4
TYPE=Wireless
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=no
NAME=wlp0s21f0u4
ONBOOT=yes
DEVICE=wlp0s21f0u4
ESSID=bla
KEY_MGMT=WPA-PSK
MODE=Managed

The highlighted configuration parameters are important to establish a wireless connection. As you can see the SSID of my wifi network is bla and it uses WPA-PSK security.

2. Create another file to store the wireless key in the same directory. File name: keys-wlp0s21f0u4 (i.e. keys-<connection name>)


Content of the key file is,

[root@localhost network-scripts]# cat keys-wlp0s21f0u4
WPA_PSK=abc123

 As you can see the password is abc123 and it's stored as plain text.

3. Restart NetworkManager,


systemctl restart NetworkManager

4. After a couple of seconds, the network interface should be up,


ip a command output,

wlp0s21f0u4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000

If you encounter issues, you can use journatctl for troubleshooting,

journalctl -xe -u NetworkManager

Saturday, October 7, 2017

Modify Atheros AR9271 USB WiFi Adapter to add heat sinks

Today I received  Atheros AR9271 USB WiFi Adapter which I ordered from AliExpress. I ordered it after a thorough google search about Linux friendly WiFi adapters. As I expected it started to work on my Fedora desktop machine out of the box.

However I noticed that the adapter heats a little when I touched it after a few minutes. I was curious to see what caused the heat. So I decided to dissemble it. Disassembling the plastic enclosure of the adapter was not difficult. Sliding a piece of thin plastic or metal between the two pieces of the enclosure would open it.

The adapter actually uses a WiFi module. The chip was covered with a small metal sheet to handle the heat. The metal sheet was covered by a sticker which has the information of the module. (See the photo below)

Atheros AR9271 USB WiFi Adapter
WiFi Module

Hmm Nothing special. Oh wait is that a LED in the module? It is. There is a LED and it lights up when the adapter is turned on. It blinks when there is a data transfer. The enclosure does not have any hole above it so the light is not visible unless you disassemble it.

At that moment I decided to modify the USB enclosure. A simple small hole drilled through the top piece of the plastic enclosure would do the job. Hmm.. Why shouldn't you hack it further to add a heat sink?  Yes, It was a perfect crazy idea to ruin the enclosure. Also it may be a overkill to add a heat-sink for that small USB gadget. but I was already bored and looking for a job something like that. So I decided to modify the top piece of the enclosure to mount a heat-sink.

I didn't have a heat sink which matches with the size of the metal sheet. Nothing stops doing crazy things, Fortunately I had 2 small heat sinks which could cover the metal sheet.

First I drilled the top piece of the enclosure for the LED. Then I drilled the top piece multiple times using a small bit so that it could help to remove a rectangle piece from the enclosure. I used a small hand file to smooth the edges after that.

After I verified the rectangle space is good enough for the heat-sinks, I assembled the plastic enclosure. Then I mounted the two heat sinks on the metal sheet through the rectangular space I cut on the top of the enclosure.

The end result? Yes, it looks funny, but I like it.

Atheros AR9271 USB WiFi Adapter
Modified USB WiFi Adapter

Atheros AR9271 USB WiFi Adapter
The Modified Adapter in use