Using your Raspberry Pi Zero’s USB wifi adapter as both Wifi client and access point

The Raspberry Pi Zero captivates with its small dimensions. This comes at a cost, however, with only one micro USB port available for peripherals of any kind. In this scenario you’ll probably think twice about what you connect to that port. “A USB hub” may sound like a natural choice but if you’re like me, you’ll want to carry the gadget around a bit and minimize the number of accessories.

Now there are solutions to stack a USB hub onto the Pi Zero, eg. Circuitbeard’s one or Richard Hawthorn’s one, but actually I don’t want to carry around a USB keyboard, especially if I have no HDMI-capable display around at all times. Instead I want to login onto the Pi via Wifi while still having Internet connectivity even when not at home. Thus I want the Pi to be an access point AND maintain a Wifi client connection at the same time. This is rather easy to do with two USB wifi adapters — but with the Pi Zero we’ll have to do with a single one! Continue reading “Using your Raspberry Pi Zero’s USB wifi adapter as both Wifi client and access point”

Market overview of USB Wifi adapters based on Atheros chipsets

When looking for Wifi adapters, there are reasons why you would not just go ahead and buy whatever your favorite $DEALER has in stock. If you have some experience with Wifi adapters and drivers, especially under Linux, you’ll know that in general Atheros chips are what you want. They have a long tradition of both feature set and decent drivers: the old MadWifi drivers were the first Wifi drivers to actually support virtual interfaces on Linux (yes, MadWifi ha issues of its own with its binary HAL explaining why it never got merged into the kernel).

Now say we’re looking for a small USB Wifi adapter, IEEE 802.11n, because there are no IEEE 802.11ac USB drivers in the mainline kernel yet. And small meaning it should have an internal antenna. If we look at Wikidevi’s Atheros chipset table, we’ll see that what we’re ideally looking for (IEEE 802.11n, USB) is an adapter based on either the AR7010 or the AR9271 chip.

Which brings us to the next problem: where do we get one? Many of the devices listed at Wikidevi are not available in Germany and some manufacturers change their chipsets between hardware revisions more often than some people their underwear:

Product 2,4 GHz / 5 GHz Antenna Chipset USB ID Driver
AVM
FRITZ!WLAN USB Stick N + / + Internal AR9001U-2NX (AR9170 (Otus) + AR9104) 1 057c:8401 carl9170 2
FRITZ!WLAN USB Stick N 2.4 + / – Internal AR9001U-2NG (AR9170 (Otus) + AR9102) 1 057c:8402 carl9170 2
FRITZ!WLAN USB Stick N v2 + / – Internal AR9271 057c:8403 ath9k_htc
FRITZ!WLAN USB Stick N v2 + / + Internal Ralink RT5572 057c:8501 rt2800usb
D-Link
DWA-126 + / – External AR9271 07d1:3a10 ath9k_htc
DWA-130 rev A1 + / – Internal Marvell 88W8362 + 88W8060 1 07d1:3b11 None
DWA-130 rev B1 + / – Internal Ralink RT2870 07d1:3c13 rt2800usb
DWA-130 rev C1 + / – Internal RealTek RTL8192U 2001:3301 None in mainline kernel
DWA-130 rev C2 + / – Internal RealTek RTL8191SU 07d1:3302 None in mainline kernel
DWA-130 rev D + / – Internal AR9001U-2NG (AR9170 (Otus) + AR9102) 1 07d1:3a0f carl9170 2
DWA-130 rev E1 + / – Internal RealTek RTL8191SU 07d1:3300 None in mainline kernel
DWA-160 rev A1 + / + Internal AR9001U-2NX (AR9170 (Otus) + AR9104) 1 07d1:3c10 carl9170 2
DWA-160 rev A2 + / + Internal AR9001U-2NX (AR9170 (Otus) + AR9104) 1 07d1:3a09 carl9170 2
DWA-160 rev B1 + / – Internal Ralink RT2870 07d1:3c11 rt2800usb
DWA-160 rev B2 + / + Internal Ralink RT5572 2001:3c1a rt2800usb
DWA-160 rev C1 + / + Internal Ralink RT5572 2001:3c21 rt2800usb
Netgear
WN111 v1 + / – Internal Marvell 88W8362 + 88W8060 1 0846:9000 None
WN111 v2 + / – Internal AR9001U-NG (AR9170 (Otus) + AR9101) 1 0846:9001 carl9170 2
WNA1100 3 + / – Internal AR9271 0846:9030 ath9k_htc
WNDA3100 v1 + / + Internal AR9001U-2NX (AR9170 (Otus) + AR9104) 1 0846:9010 carl9170 2
WNDA3100 v2 + / + Internal Broadcom BCM4323 0846:9011 None
WNDA3100 v3 + / + Internal MediaTek MT7632U 0846:9014 None
WNDA3200 + / + Internal AR9002U-2NX (AR7010 + AR9280) 0846:9018 ath9k_htc
TP-Link
TL-WN322G v3 + / – Internal AR9271 0fc3:1006 ath9k_htc
TL-WN422G v2 + / – External AR9271 0fc3:1006 ath9k_htc
TL-WN721N(C) + / – Internal AR9271 0fc3:9271 ath9k_htc
TL-WN722N + / – External AR9271 0fc3:9271 ath9k_htc
TL-WN821N v1 + / – Internal AR9001U-2NG (AR9170 (Otus) + AR9102) 1 0fc3:9170 carl9170 2
TL-WN821N v2 + / – Internal AR9001U-2NG (AR9170 (Otus) + AR9102) 1 0fc3:1002 carl9170 2
TL-WN821N v3 + / – Internal AR9002U-2NG (AR7010 + AR9287) 0fc3:7015 ath9k_htc
TL-WN821N v4 + / – Internal RealTek RTL8192CU 0bda:8178 rtl8192cu
TL-WN822N v1 + / – External AR9001U-2NG (AR9170 (Otus) + AR9102) 1 0fc3:1002 carl9170 2
TL-WN822N v2 + / – External AR9002U-2NG (AR7010 + AR9287) 0fc3:7015 ath9k_htc
TL-WN822N v3 + / – External Realtek RTL8192CU 0bda:8178 rtl8192cu

1: Draft N chip
2: Said to be unstable
3: Some dealers advertise a Netgear WNA1100M which is actually a RealTek-based WNA1000M!

Thus it appears that the only safe bet remaining is to get a TP-Link TL-WN722N, which, however, has an external antenna connected to it, which makes it rather unhandy if eg. you want to connect it to a Raspberry Pi Zero. You could of course also gamble and try to get the right hardware version of eg. the TL-WN721N. Or try to get A WNDA3200 on eBay.

tslib not recognizing ft6236 touchscreen due to missing ABS_PRESSURE capability

In my earlier post on Complete rotation support for the Adafruit PiTFT 2.8″ capacitive touchscreen display I described that support for the touchscreen has landed in the mainline kernel in form of the ft6236 driver. I also described that my test program would work correctly now. Continue reading “tslib not recognizing ft6236 touchscreen due to missing ABS_PRESSURE capability”

Complete rotation support for the Adafruit PiTFT 2.8″ capacitive touchscreen display

In my previous post, I introduced the PiTFT 2.8″ capacitive touchscreen display and showed some test code. If you played around with that, you might have noticed that with the default /boot/config.txt setting of rotate=90 the display is a landscape mode. Continue reading “Complete rotation support for the Adafruit PiTFT 2.8″ capacitive touchscreen display”

Getting started with the Raspberry Pi 2 and a Adafruit PiTFT 2.8″ capacitive touchscreen display

“We live in an age when unnecessary things are our only necessities” (Oscar Wilde, “The Picture of Dorian Gray”)

Like many others, I bought another Raspberry Pi 2 to play around with, together with an
Adafruit 2.8″ PiTFT capacitive touchscreen
(note that Adafruit has various variants of displays that differ only in details such as resistive or capacitive touchscreen and Raspberry Pi 2 compatibility). Naturally one will like to use the display in both landscape and portrait orientations. Continue reading “Getting started with the Raspberry Pi 2 and a Adafruit PiTFT 2.8″ capacitive touchscreen display”

Workaround for broken O2 Micro SD card reader support since Linux kernel version 4.1.8

On my Dell Latitude E7450 notebook I regularly update to current versions of the Linux kernel. Along with such a Kernel update my notebook’s SD card reader could no longer be initialized properly: Continue reading “Workaround for broken O2 Micro SD card reader support since Linux kernel version 4.1.8”

Fixing wireless regulatory support (crda, wireless-regdb) on openSUSE Tumbleweed

On recent SUSE-based distributions such as openSUSE Tumbleweed (and potentially also 13.2), executing iw reg get to check your WiFi device’s regulatory setup will likely get you an output such as this:


global
country 00: DFS-UNSET
(2402 - 2472 @ 40), (N/A, 20), (N/A)
(2457 - 2482 @ 40), (N/A, 20), (N/A), NO-IR
(2474 - 2494 @ 20), (N/A, 20), (N/A), NO-OFDM, NO-IR
(5170 - 5250 @ 80), (N/A, 20), (N/A), AUTO-BW, NO-IR
(5250 - 5330 @ 80), (N/A, 20), (0 ms), DFS, AUTO-BW, NO-IR
(5490 - 5730 @ 160), (N/A, 20), (0 ms), DFS, NO-IR
(5735 - 5835 @ 80), (N/A, 20), (N/A), NO-IR
(57240 - 63720 @ 2160), (N/A, 0), (N/A)

Continue reading “Fixing wireless regulatory support (crda, wireless-regdb) on openSUSE Tumbleweed”

Correcting the soundcard order with onboard sound and HDMI output

Like many current devices with HDMI output, my Latitude E7450 offers multiple sound cards but configures the HDMI output as sound card 0 (the default). And xfce’s default sound mixer doesn’t offer switching the default output…

To correct the soundcard order, add this to your /etc/modprobe.d/50-sound.conf (valid for openSUSE 13.2, probably other distros as well):


options snd-hda-intel id=PCH index=0
options snd-hda-intel id=HDMI index=1

Dell Wireless 5809e support in openSUSE 13.2

This post is about getting the LTE card to work that gets built into current Dell Notebooks such as the Latitude E5450/E7450:
Continue reading “Dell Wireless 5809e support in openSUSE 13.2”