Wifi cards txpower, Linux, mac80211 and regulations
kang, June 5th, 2010

So you just got a new 500mW wifi card, like this mighty Alfa Networks AWUS036H.
However, you cannot use the most recent Linux driver with it, because your power is limited to 20db (100mW).
You just get a nasty:
Error for wireless request "Set Tx Power" (8B26) :
SET failed on device blah0; Invalid argument.
You must use an old kernel, or revert to pretty old drivers which aren’t really stable. Setting the regulatory domain to your country does not seems to work, somehow, the device tells your kernel that your maximum transmit power just cannot exceed 20db. How annoying isn’t it?
And kind of dumb, when you live in a country where higher power is allowed, or you’ve got a license, or you’ve got a license and use the chipset in raw packet mode for non-wifi activities (oh, guess why I’m saying that!).
Anyway, make sure that using a higher power is legal for you, and if you are, as I could not find any direction how to do this, well, here’s how to override the protection. Note that while you’re doing this AT YOUR OWN RISK and there is NO WARRANTY this will work, or kill your card or is legal for you, I pretty much hate when they decide to block features by software.
Pretty much against what I would call the free software spirit, but hey, let’s not discuss that.
Code modifications after the jump.
Control RC aircrafts from your computer.. even if you use Windows
kang, March 19th, 2010
If you’ve read my previous article about controlling your little planes and helis via your computer for, basically free, well, here’s a quick Windows port of the program.
You can get the initial version here: Audio PPM 0.1.
The source code is here (it’s not really cleaned up, but it’s there!) Audio PPM src 0.1.
You’ll also need the SlimDX libraries.
This version does not currently interleave stereo audio channels, but can still spit out 192 steps on HD audio. Seems plenty enough to control your stuff and have fun !
In fact, even on good old AC’97 and 96 steps it seems to be very decent.
Please note that no other sound should be coming out of your speakers when you use this program.. quite logical anyway. Read the included README (and LICENSE(s) while you’re at it) for more information.
Please also note that this application has been made using Visual Studio Express 2010 beta, and this might possible cause troubles for the runtime. I’ll download and rebuild it using Visual Studio Express 2008 in the next version.
The few things I encountered while coding this application:
- WaveOut buffer and timing management sucks, but it works when you sort it out
- DirectSound latency is horrible
-XAudio2 is almost decent.. well.. I’m using it.
- ASIO drivers have an annoying license and annoying to adapt the interface.. thus they’re not used!
-No idea if you can use the XACT audio support without the XNA stuff.
-DirectInput, sharp opposite of DirectSound is a little piece of Win.
Control RC aircrafts from your computer.. for 0$
kang, March 9th, 2010
I got interested recently into some USB to PPM devices and related devices, that let you generate PPM signal from your computer. What’s PPM (Pulse Position Modulation) you say? That’s a more or less standard signal many RC Radios output for “buddy boxing” for example.
This means one RC Radio controls the other one. Chances are that you also use it, when you plug your RC Radio on your computer to fly your simulator.
These devices are expensive. However, a PPM signal can travel very well over an audio channel at high rate and high precision.
I first proposed this solution on a well known RC forum, where I got a usual warm reception “it can’t work”. Somehow, as a weak human I decided they know better and left it out.
Few weeks later, I got myself one of these USB2PPM cable for $1 as part as a cheap developer program. However this cable cannot yet work on my Spektrum DX7 due to a different PPM signal. I notified the author so this might be fixed.
However, it was a good occasion for my PPM over audio idea to re-surface. You know, this kind of: “but of course it’s going to work, what was I thinking?!”. I thus bring to you a small open source PPM generator, that should work with most RC Radios and computers and will cost you nothing.
