<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Stefano Rivera (Posts about wireless)</title><link>https://stefanorivera.com/</link><description></description><atom:link href="https://stefanorivera.com/categories/wireless.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2026 &lt;a href="mailto:stefano@rivera.za.net"&gt;Stefano Rivera&lt;/a&gt; 
&lt;a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/"&gt;
&lt;img alt="Creative Commons License BY-SA"
     class="cc-license-button"
     src="/assets/img/cc-by-sa-4.0.svg"&gt;&lt;/a&gt;</copyright><lastBuildDate>Fri, 01 May 2026 14:29:42 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Madwifi regdomain issues</title><link>https://stefanorivera.com/posts/2008/02/12/madwifi-regdomain-issues/</link><dc:creator>Stefano Rivera</dc:creator><description>&lt;p&gt;The &lt;a href="https://www.cs.uct.ac.za/"&gt;CS Department&lt;/a&gt; at &lt;a href="https://www.uct.ac.za/"&gt;UCT&lt;/a&gt; has some Wireless APs on &lt;a href="https://en.wikipedia.org/wiki/List_of_WLAN_channels"&gt;Channel 13&lt;/a&gt;. This is quite cool (for geeky reasons), but my MacBook (purchased in the US) did not agree. As far as it is concerned, the only 802.11g channels in existence are 1-11.&lt;/p&gt;
&lt;p&gt;The reason for this is that my &lt;a href="http://www.atheros.com/"&gt;Atheros&lt;/a&gt; (&lt;a href="http://madwifi.org/"&gt;madwifi&lt;/a&gt;) network card is a &lt;a href="https://en.wikipedia.org/wiki/Software-defined_radio"&gt;software-defined radio&lt;/a&gt;. Atheros interprets the FCC regulations to mean that it cannot provide an Open Source driver for this card, allowing it broadcast on any random channel. Thus the madwifi driver contains a binary HAL, produced by Atheros, which is responsible for regulating frequencies and power levels. (This HAL has been &lt;a href="http://madwifi.org/wiki/About/ath5k"&gt;reverse-engineered&lt;/a&gt; by the OpenBSD people, but not for my card, unfortunately).&lt;/p&gt;
&lt;p&gt;The card has two values stored in it's EEPROM, a "countrycode", and a "regdomain". The &lt;a href="http://madwifi.org/wiki/UserDocs/CountryCode"&gt;countrycode&lt;/a&gt; is overrideable in software (you &lt;code&gt;modprobe ath_pci countrycode=710&lt;/code&gt;), but only if the countrycode you specify is valid for the card's regdomain. Some cards have a 0x00 or 0xFF regdomain (wildcard values), but mine had 0x64. This meant that whenever I tried to specify a country code, I'd get an error, and the madwifi module would refuse to load:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="n"&gt;Feb&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mh"&gt;11&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mh"&gt;11&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mh"&gt;34&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mh"&gt;11&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;beethoven&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;kernel:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;2047.669023&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;MadWifi:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;ath_getchannels:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Unable&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;collect&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;channel&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;list&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;HAL&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;regdomain&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;likely&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mh"&gt;100&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;country&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mh"&gt;710&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;There has been some success with changing the regdomain in the EEPROM, using the hard-to-find &lt;code&gt;ar5k&lt;/code&gt; utility (or possible the &lt;code&gt;ath_info&lt;/code&gt; utility?). However, &lt;em&gt;again&lt;/em&gt; this didn't work with my model. But I found &lt;a href="https://lists.ath5k.org/pipermail/ath5k-devel/2007-December/000371.html"&gt;an e-mail&lt;/a&gt; from somebody who'd been playing with similar stuff. I mailed Salvatore, and he replied almost instantly, pointing me to a &lt;a href="http://www.tamos.com/products/commwifi/faq.php#q75"&gt;public Windows utility&lt;/a&gt; for changing regdomains. It depends on a special driver, available in the demo of "&lt;a href="http://www.tamos.com/products/commwifi/"&gt;CommView for Wireless&lt;/a&gt;".&lt;/p&gt;
&lt;p&gt;I installed Windows in my swap partition (it's not an operating system I normally have around). (Naturally, I forgot to have an Ubuntu CD handy, to rebuild my grub, but that was easily remedied.). After a few blue screens of death (install all necessary drivers first), I got my regdomain changed to 0x37, which is the regdomain for South Africa &amp;amp; Europe.&lt;/p&gt;
&lt;p&gt;Now, I'm writing this from a couch in the CS department, using a channel 13 AP. Success.&lt;/p&gt;</description><category>countrycode</category><category>fcc</category><category>linux</category><category>macbook</category><category>madwifi</category><category>regdomain</category><category>technical</category><category>uct</category><category>wireless</category><guid>http://tumbleweed.org.za/2008/02/11/madwifi-regdomain-issues</guid><pubDate>Mon, 11 Feb 2008 22:39:49 GMT</pubDate></item></channel></rss>