How To Use Atheros Eeprom Tool

Sat 05 December 2015

How to setup a wifi software access-point, using wpasupplicant and hostapd.

We create two virtual interfaces on top of one physical device.One will act as a client, the other as an access-point.

. The use of a variety of manufacturing and testing tools, such as the Qualcomm Atheros Radio Test (ART) tool. Calibration to optimize for a specific need. Manipulation of receiver sensitivity to achieve noise immunity. How to override EEPROM settings for performance tuning. We use an atheros-powered wifi dongle, but you can use any wifi chip, as long as it can handle virtual interfaces. There's a list of hardware with their capabilities on linux-wireless. At first, we have to check if the firmware for our wifi chip is installed. C Tools for Linux. The i2c-tools package contains a heterogeneous set of I 2 C tools for Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers, EEPROM decoding scripts, EEPROM programming tools, and a python module for SMBus access. All versions of Linux are supported, as long as I 2 C support is included in the kernel.

Most of the credit for this tutorial goes to theArchlinux Software Access Point Wiki.

Introduction

We use an atheros-powered wifi dongle, but you can use any wifi chip,as long as it can handle virtual interfaces. There's a list of hardwarewith their capabilities on linux-wireless.

Installation

At first, we have to check if the firmware for our wifi chip is installed.You may not know that, but most (maybe every) wifi chip needs a firmware to operate,and this firmware is loaded dynamically when the chip is powered.Hence the firmware files must be installed. Plenty of firmwares are not free,and they're not included by default in Debian.

Type dmesg -w in your console, then plug the wifi dongle.

See the line failed to load htc_9271.fw?The firmware requested is not installed.Let's check what firmwares are installed.On a fresh Debian install, there should be only the free firmwares.

Ok, so we can probably find our firmware in the non-free Debian repository.We must enable it, then find the package containing our firmware files.The name of the package is common sense, in our case it's firmware-atheros. Let's go.

Now, plug the wifi dongle again. This time, the output of dmesg is different:

Virtual interfaces

Install the tools needed to configure wireless devices.

Have a look at the wireless devices present on the machine.

Then show capabilities for the device.

These lines shows that we can have only two virtual interfaces (total <= 2),and that the combination managed (aka station) and AP (aka access-point) is valid.That's what we want. #channels <= 1 means that both interfaces will have to operateon the same channel. That's a common limitation for most (maybe every) hardware.

Alright, let's create our virtual interfaces:

If you look at them with ifconfig -a, you notice that the interfaces have the same MAC address.This needs to be changed, every interface must have a unique MAC. You can put almost whatheveryou want (check MAC address on Wikipedia,the most significant octet is NOT everything you want).I personnally just tune the original address a little bit.

Configure the station (wpasupplicant)

How

Credit: http://linuxcommando.blogspot.fr/2013/10/how-to-connect-to-wpawpa2-wifi-network.html

If you want your station to connect to a WPA-secured access-point,you will need WPA Supplicant.

Alright, let's have a look at the access-points around.

Here, I assume you want to connect to the access-point named MYHAPPYAP.The security protocol in use is RSN, which is another name for WPA2.Alright, to create the configuration file needed to connect to this access-point,there's nothing easier:

Now you can look at the configuration file generated if you're curious,with something like cat /etc/wpa_supplicant/wlan0_sta.conf.

OK, we're almost there. Ensure that wlan0_sta is not connected(just to show you one more command I learnt a few seconds ago :)

Alright, let's launch wpasupplicant.

In another shell, get to know more:

The only thing left to do is to obtain an IP adress:

Configure the access-point (hostapd, dhcpd)

Credit: https://wireless.wiki.kernel.org/en/users/Documentation/hostapd

To make an access-point, you definitely need to install Hostapd:

A basic configuration file:

Eeprom

Let's launch it:

If you see something like this, everything is alright.If you scan for wireless access-points on another machine, you can see that the test access-point exists.Now, the next step is to install and configure a DHCP server.Since we're gonna play with it a little bit, it's better to disable the service,and start/stop it manually.

Create the configuration file for your DHCP server(this is just a quick example, change the IP adress according to your needs):

Set the interface up and launch the DHCP server:

Alright, from this point you should be able to connect to your AP from another device.

The channel issue

There is one thing that you should not underastimate: both virtual devices must operate on the same channel.The implication of that is simple. If your station is connected to a remote AP with auto-channel enabled, youwill be in trouble pretty quickly. Because as soon as the remote AP will change channel, your stationwon't be able to re-connect on a different channel, since you already have your own local AP up and runnning.

How To Use Atheros Eeprom Tool Windows 10

To handle that, you need to bring both interfaces down, then bring them up. And of course,you must bring up the station first, because it's the one who decides which channel to use.

How To Use Atheros Eeprom Tool Software

If you write a script that's supposed to maintain the wifi up all the time, you will have a little bitof work to handle that properly.

The other solution, if you can, is to disable auto-channel on the remote AP, so that you KNOW for surethat your wifi operates on a given channel and never changes.

References

How To Use Atheros Eeprom Tools

This was a long post, wasn't it? I wouldn't have made it without help: