You are here

Feed aggregator

Ralink-based wifi access point in Linux - frequent dropouts on Windows clients

AZ Loco - Mon, 2014, Jul21 - 17:17

Some specifics of the system:
Distribution: Debian 7.1 (wheezy) (with minor modifications)
Kernel used: 3.2.46

lsusb identifies the stick in use as "ID 0846:9041 NetGear, Inc. WNA1000M 802.11bgn [Realtek RTL8188CUS]"

When using the wireless stick in access point mode, Windows systems would frequently drop the wireless connection. What exactly happened was never clear to me, but hostapd seemed to indicate that the windows system was requesting a re-key.

After some investigation I became aware that the used kernel builds a driver for the RAlink chip. The source for this driver is found in the linux source under
drivers/net/wireless/rtl* (there are a few folders, and I don't know exactly which ones contain the code for the exact chip in my stick). This is the driver that will be used by default, and that is the one that gave me problems.

On RaLink's web site is a different driver. The one I downloaded is in a zip file with the name of RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911.zip.
That's the one that worked for me.

In order to replace the first driver with the second, follow these steps:

1. compile the new driver.
For this you must
* unzip the file RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911.zip,
* cd into folder RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911/driver/
* untar the file rtl8188C_8192C_usb_linux_v4.0.2_9000.20130911.tar.gz
* cd into folder rtl8188C_8192C_usb_linux_v4.0.2_9000.20130911
* edit the Makefile and add a target for your specific system (see the patch for the change that I made further below).
* once the Makefile is ready, run make as follows: "make CONFIG_PLATFORM_mymodule=y modules"
* this will result in a file "8192cu.ko" being produced. This is your new driver.

________________________
difference that shows the changes to the Makefile for the driver

diff --git a/Makefile b/Makefile
index c399011..46dd9cf 100755
--- a/Makefile
+++ b/Makefile
@@ -38,7 +38,8 @@ CONFIG_RTL8192CU_REDEFINE_1X1 = n
CONFIG_INTEL_WIDI = n
CONFIG_WAKE_ON_WLAN = n
-CONFIG_PLATFORM_I386_PC = y
+CONFIG_PLATFORM_mymodule = y
+CONFIG_PLATFORM_I386_PC = n
CONFIG_PLATFORM_TI_AM3517 = n
CONFIG_PLATFORM_ANDROID_X86 = n
CONFIG_PLATFORM_JB_X86 = n
@@ -236,6 +237,17 @@ ifeq ($(CONFIG_INTEL_WIDI), y)
EXTRA_CFLAGS += -DCONFIG_INTEL_WIDI
endif
+ifeq ($(CONFIG_PLATFORM_mymodule), y)
+EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
+SUBARCH := i386
+ARCH ?= $(SUBARCH)
+CROSS_COMPILE ?=
+KVER := 3.2.46-rt67 (modify this to match your kernel version)
+KSRC := /export/berm2/dev/staging/lib/modules/$(KVER)/build
+MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
+INSTALL_PREFIX :=
+endif
+
ifeq ($(CONFIG_PLATFORM_I386_PC), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/)

__________________ end of diff ______________________

2. install the driver into your target. blacklist the old driver
* take the file "8192cu.ko" and put it into the following folder on your target: /lib/modules//kernel/drivers/net/wireless
* edit (or create if needed) the file /etc/modprobe.d/blacklist.conf and add the following line:
blacklist rtl8192cu

3. compile a replacement for the executable hostapd and place into target
* on the system that you unzipped the Ralink driver source, cd back into the folder RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911/wpa_supplicant_hostapd
* untar the file wpa_supplicant_hostapd-0.8_rtw_r7475.20130812.tar.gz, and cd into the folder wpa_supplicant_hostapd-0.8_rtw_r7475.20130812
* run make.
* copy the file found in hostapd/hostapd to your target, replacing the existing hostapd file (for me it was in /usr/sbin).

4. update the file /etc/hostapd/hostapd.conf.
* I took the file "rtl_hostapd_2G.conf" in folder RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911/wpa_supplicant_hostapd as the basis. Make sure to replace the identifying features like ssid, password, etc, and use this new file to replace the existing /etc/hostapd/hostapd.conf in your target system.

Tags: Arizona Team
Categories: Sponsor News Feeds

Great Scott! It's Version 13!

LinuxJournal - Mon, 2014, Jul21 - 09:22

No matter how much I love Plex, there's still nothing that comes close to XBMC for usability when it comes to watching your network media on a television. I've probably written a dozen articles on Plex during the last few years, so you know that's tough for me to admit. more>>

Adminer—Better Than Awesome!

LinuxJournal - Thu, 2014, Jul17 - 14:11

I've always loved PHPMyAdmin for managing MySQL databases. It's Web-based, fairly robust and as powerful as I've ever needed. Basically, it's awesome. Today, however, I discovered something better than awesome: Adminer. Although it is conceptually identical to PHPMyAdmin, it is far simpler and far more powerful. How can it be both? more>>

It Actually Is Rocket Science

LinuxJournal - Wed, 2014, Jul16 - 09:19

I've never once made a model rocket. I've always wanted to, but apart from "tube with explodey rocket part", I really didn't know where to start with designing. I recently found an open-source application that should help me with my lack of rocket science know-how: OpenRocket. more>>

Android Candy: Repix, Not Just Another Photo App

LinuxJournal - Mon, 2014, Jul14 - 11:52

Apps like Instagram have made photo filters commonplace. I actually don't mind the vintage look for quick cell-phone snapshots, but a filter can do only so much. At first glance, Repix is another one of those "make your photo cool" apps that does little more than add a border and change saturation levels. more>>

Wanted: Your Embedded Linux Projects

LinuxJournal - Thu, 2014, Jul10 - 11:38

Our "Embedded Linux" issue of Linux Journal is just around the corner, and we want YOUR project to be in it! Whether you're embedding a Beagle Bone Black into a dish so you can automatically feed your black Beagle a bone, or you're developing an Arduino-based butler to answer your front door -- we want to hear about it! more>>

Linux Kernel Testing and Debugging

LinuxJournal - Thu, 2014, Jul10 - 09:00
Linux Kernel Testing Philosophy

Testing is an integral and important part of any software development cycle, open or closed, and Linux kernel is no exception to that. more>>

Tails above the Rest, Part III

LinuxJournal - Tue, 2014, Jul08 - 09:57

In my first two columns in this series, I gave an overview of Tails, including how to get the distribution securely, and once you have it, how to use some of the basic tools. more>>

Dolphins in the NSA Dragnet

LinuxJournal - Mon, 2014, Jul07 - 09:26

There's an old quote from Jamie Zawinkski that goes: "Some people, when confronted with a problem, think ‘I know, I'll use regular expressions.’ Now they have two problems." Even people like me who like regular expressions laugh at the truth in that quote, because we've seen the consequences when someone doesn't think through the implications of a poorly written pattern. When some people write a bad pattern, they end up with extra lines in a log file. When the NSA does it, they capture and retain Internet traffic on untold numbers of innocent people. more>>

Are you an extremist?

LinuxJournal - Fri, 2014, Jul04 - 13:15

Since the news broke yesterday that we are an extremist publication according to the NSA, we at Linux Journal have thought a lot about what that might mean t more>>

Tails above the Rest, Part II

LinuxJournal - Thu, 2014, Jul03 - 14:37

Now that you have Tails installed, let's start using it. more>>

Tails above the Rest: the Installation

LinuxJournal - Thu, 2014, Jul03 - 14:18

A few columns ago, I started a series aimed at helping everyone improve their privacy and security on the Internet. The first column in this series was an updated version of a Tor column I wrote a few years ago. more>>

Job Night @ Stammtisch on 2014Jul15

LuftHans - Thu, 2014, Jul03 - 12:17

ANNOUNCEMENT: Job Night @ Stammtisch! The Free Software Stammtisch is hosting a job fair at this coming east valley event on Tuesday, 2014Jul15. The goal is to bring in engineers and managers from groups that are hiring as well as job seekers and recruiters. For technical positions it's much better to talk directly to the team that is hiring.

read more

Job Night @ Stammtisch on 2014Jul15

PLUG Chairman Blog - Thu, 2014, Jul03 - 12:17

ANNOUNCEMENT: Job Night @ Stammtisch! The Free Software Stammtisch is hosting a job fair at this coming east valley event on Tuesday, 2014Jul15. The goal is to bring in engineers and managers from groups that are hiring as well as job seekers and recruiters. For technical positions it's much better to talk directly to the team that is hiring.

read more

Categories: Sponsor News Feeds

A Bundle of Tor

LinuxJournal - Thu, 2014, Jul03 - 11:15

I don't know how many readers know this, but my very first Linux Journal column ("Browse the Web without a Trace", January 2008) was about how to set up and use Tor. Anonymity and privacy on the Internet certainly take on a different meaning in the modern era of privacy-invading software and general Internet surveillance. more>>

NSA: Linux Journal is an "extremist forum" and its readers get flagged for extra surveillance

LinuxJournal - Thu, 2014, Jul03 - 09:51

A new story published on the German site Tagesschau and followed up by BoingBoing and DasErste.de has uncovered some shocking details about who more>>

A Pain in the Person

LinuxJournal - Wed, 2014, Jul02 - 10:28

At what point will we say "enough"? more>>

July 2014 Issue of Linux Journal: Mobile

LinuxJournal - Tue, 2014, Jul01 - 10:57
Is That a Penguin in Your Pocket?

We're getting to the point in technological evolution that "mobile technology" no longer will be a term. more>>

How YARN Changed Hadoop Job Scheduling

LinuxJournal - Fri, 2014, Jun27 - 13:59

Scheduling means different things depending on the audience. To many in the business world, scheduling is synonymous with workflow management. Workflow management is the coordinated execution of a collection of scripts or programs for a business workflow with monitoring, logging and execution guarantees built in to a WYSIWYG editor. more>>

diff -u: What's New in Kernel Development

LinuxJournal - Thu, 2014, Jun26 - 09:20

David Herrmann wanted to disable the virtual terminal subsystem in order to save space on a kernel that didn't need a VT. But, he still wanted to see kernel oops output for debugging purposes. The problem was that only the VT subsystem would display oops output—and he'd just disabled it. more>>

Pages

Subscribe to ABLEconf aggregator