Compliance Mode for Ubiquiti AirMax Radios

Sometime after “AirOS 5.3.3.9634.110726.1142” Ubiquiti took out what was called “Compliance Mode” that enabled frequencies outside of the Part 15 bands.  This was handy if you wanted to run these radios in Part 97 or Amateur or “Ham” Bands.   There was a simple way of doing this right after they took this out by just doing a …

 touch /etc/persistent/ct
 save
 reboot

Alas, this was taken out after a while.

After googling around and banging on this a bit, the “Country Code” for “Compliance Mode” that had an ID of 511 is now called “Licensed”.  You can find it in /var/etc/ccodes.inc.  The trick is to set the Atheros chipset on startup to the county code you want.   This would be done with a custom script that runs when the radio boots up.  You will need firmware that supports that that has “cs” in the file name.  Go to:

https://community.ui.com/questions/airOS-5-6-with-Custom-Script-Support-/4bd71c6b-7e9c-43ee-9d9d-666a7a9708fd#comment/e6d675ef-2e50-46f4-bf2a-7ef94dd12068

and find the firmware for your board (eg XM, XW or TI).  Upgrade the radio with this firmware.

After the upgrade and reboot, you can use this script that you should call “/etc/persistent/rc.poststart” with the following:

#!/bin/sh
# This is dependent on v6.3.0 of the firmware.  You may need 
# to point to the ubnt_spectral module someplace else if you
# have a different firmware version.
insmod /lib/modules/2.6.32.71/ubnt_spectral.ko
iwpriv wifi0 setCountry Ub
ifconfig ath0 down
ifconfig wifi0 down
sleep 5
rmmod /lib/modules/2.6.32.71/ubnt_spectral.ko
ifconfig ath0 up
ifconfig wifi0 up
echo "countrycode=511" > /var/etc/atheros.conf
# '840' is the Country Code for the US
sed -i 's/840/511/g' /tmp/system.cfg
echo "<option value="511">Compliance Test</option>" >> /var/etc/ccodes.inc

After creating this script, make sure you “chmod a+x /etc/persistent/rc.poststart” and the type “save” and “reboot”.

Once the radio has rebooted, you should be able to go to the “WIRELESS” tab and see that the Country Code is set for  Licensed.  If you select the “Frequency Scan List”, you should see a bunch of frequencies you can now select (see below).  Alas, the script does not survive the reboot, but that is fine as the change to “License” will survive reboots.  You can confirm this by ssh’ing into the radio and running the commands:

XM.v6.3.0# iwpriv wifi0 getCountry
wifi0     getCountry:UB 
XM.v6.3.0# iwpriv wifi0 getCountryID
wifi0     getCountryID:511 
XM.v6.3.0# 

I guess the Country “UB” is “Ubiquiti” 🙂

Fiber for SF – Part III

Christopher Mitchell wrote back with these comments:

      I don’t think WiFi is a good way for a city to encourage broadband. You note many of the problems, but I also just view it as uneconomical in the long term.
      However, I think there is value in WiFi in certain circumstances. The value of WiFi for a city that has substantial fiber assets is to provide coverage for muni functions and perhaps those who know what they will be getting. Building inspectors, social workers, many city employees can be more productive in the field with wireless broadband access but they need greater capacity than the cell networks currently offer and they can save substantial money when they can put nodes anywhere due to abundant backhaul afforded by the fiber network.
      I agree that indoor access should be handled by the building owner or occupant. WiFi doesn’t penetrate much and offers poor speeds anyway when multiple users are on it.

Christopher is being an activist for St. Paul, Minnesota. I hope he can get further in getting St. Paul to think about deploying broadband over fiber than we have gotten with San Francisco.

More on Fiber for SF…

I got a very nice email from Christopher Mitchell who is with the Institute for Local Self-Reliance (ILSR) which is a non-profit that “provides technical assistance and information to city and state governments, citizen organizations and industry”. The report give a great overview of the different technologies that are available for municipal broadband deployment and can be seen at:

http://www.newrules.org/info/munibb.html

I sent Mr. Mitchell back the comments below on this report:

Much like other reports in this area, it sees WiFi as a solution that I have always had grave doubts about. You can see my “report” concerning this at:

http://www.lns.com/papers/part15/Regulations_Affecting_802_11.pdf

It really comes down to the issue that these deployments on unlicensed bands (i.e. ISM bands) can’t guarantee an uptime for the service due to interference from other users on the bands. There is also the fact that 802.11 really has very poor interference handling.

The ILSR report says that wireless is needed for mobility. I really don’t think there is as much of a need for a municipality to address this. There area a number of other companies that are already addressing this and, as I see it, the real need for broadband is in the home and business. With that, mobility can be address a couple of different ways. First off cell phone providers do this pretty well for outdoor use. For indoor deployments, that really has be handled by the building owners or tenets. Penetrating walls at any frequency and especially at 2.4 and 5.8 GHz is very difficult.

I do strongly support fiber deployment and it being owned by the local government. The last mile is where 90% of the cost in broadband deployment is. Most of this is artificially high as there is only one or two carriers for the last mile in an area. If we can have a municipal deployment then any Mom-and-Pop through existing incumbent can be on equal footing for providing services to an area. We will see competition at that point.

As no one company can the justification of a city wide fiber deployment, it is up to the city to make this happen.

I have been involved in actively supporting this idea for some time with the city of San Francisco. As such I have provided comments and have worked with the city of SF that outlines a basic working and financial model for the city to deploy fiber.

At this point, I think most cities have a much better and more realistic view of how the technology works, we just need to bring more material to them to justify how municipal broadband will financially work for a city.

Fiber for SF…

It isn’t like there hasn’t been any screaming in the past about putting fiber in when San Francisco digs up the streets for the new sewer system, but Tim Redmond makes it seem so in this recent editorial in the SF Bay Guardian. San Francisco Board of Supervisor Tom Ammiano proposed this nearly 4 years ago. His proposal to study deploying fiber was stalled for more than three years by the Mayor’s initiative to deploy WiFi with Google and Earthlink. Once that deal died, when Earthlink couldn’t figure out how to make a buck off of this plan, then San Francisco started to study this again. I have to throw some of the blame at Mr. Amiano’s office as they didn’t try to push this study through during the three years it was stalled.

Mr Redmond does make a point. San Francisco will miss this opportunity to significantly reduce the cost of installing fiber for the city and the city residents if they have to go back and dig up the roads again. Just like they missed the opportunity to do this 10 years ago when there were nearly a dozen different fiber providers installing fiber in the ground and they city could have demanded that a portion of those strands be handed over to the city. Or the city could have pulled city owned fiber when other companies were pulling theirs.

The City did eventually come out with a fiber study that raves about the opportunities with city-wide fiber deployment. Lets hope that it has an impact with the city’s direction on municipal broadband.

It gets down to the last mile…

Internet access for all will be determined by the cost of access. The last barrier to access is the “last mile”.

And this brings up a story…

A year ago, the City of San Francisco had a problem. They wanted to deploy broadband access to one of the housing developments that the San Francisco Housing Authority runs. The Alice Griffith (aka Double Rock) housing development is located in the south east corner of the city. Many of San Francisco’s housing developments are down there such as Hunter’s View, Hunters’s Point West and Sunnydale.

In the extreme south/east corner of San Francisco where Alice Griffith is, there is only one broadband provider, Comcast. They really were not that interested in helping this project out as they already have a contract with the city to provide cable to the housing development as part of their franchise. The other San Francisco broadband provider is AT&T (aka, Pacific Telephone and Telegraph, Pacific Bell, SBC). AT&T did not install DSL in this area. With that, in order to get broadband to Alice Griffith, San Francisco was about to ink a deal with AT&T for two DS-1 connections that would give Alice Griffith 3Mb/s for $1,300 a month(1). You would think that since Pacific Bell’s original corporate office was located in San Francisco that AT&T would have some interest in helping out 3 Mb/s of broadband. Nope. They wanted the bucks.

Right now, wholesale broadband costs anywhere from $10 a month per megabit to say $100 a month. At my company we get it on the cheaper end of that range. With the assumption that AT&T needs to cover say $30 a month for the wholesale cost of 3 Mb/s, that leave a tidy profit of $1,270 per month.

Ok, we need to count in the cost of the copper to Alice Griffith. AT&T typically charges about $12 or so a month for each copper pair to DSL providers. Two DS1s will take either two pairs or four pairs depending on the technology AT&T is using to transport it (HDSL vs. standard DS1). Right now AT&T use 1 pair for DS1. So assuming that AT&T makes zero profit off of the $12 a month they are charging DSL providers (yeah, right), then the cost for the copper is $24 a month. Ok, $1,270 – $24 leaves around $1,246 net profit.

How can AT&T charge this? Simply there is no competition.

When we at TLGnet (San Francisco’s first ISP) first started out in 1990, we were paying $5,000 a month to UUnet for bandwidth via a DS1. Of course we had to pay for the DS1 to get it to us. That was about $500 a month. Since then, bandwidth is in the $20 a Mb/s per month range and DS1 costs are exactly the same. The last mile cost in 1990 was 9.1% of the total costs. Now it is about 87% of the total costs (assuming say $100 for the bandwidth and $650 for the DS1).

Wholesale bandwidth has plenty of competition from folks like AT&T, MFN, MCI, Savis, Level3, XO, Global Crossing, among other “tier one” providers and have dropped bandwidth prices to about 3% of what it cost us in 1990. Like San Francisco, last mile providers have no competition and have not changed their pricing at all. The various telecom acts to reform this has very little if any impact for the end user.

It was interesting that even Comcast didn’t try to make a buck here. They just said no. If you counted on at least two providers providing competition, you would be disappointed.

On the next rant, I am going to look back in San Francisco history for precedents to this issue.

(1) It so happens my ISP is 4 blocks away from Alice Griffith and we put in a 5.8GHz radio link to it. Now they have 50Mb/s of free access as opposed to the 3 Mb/s that they would have had to pay $1,300 a month for.

Freeing up the net…



Arriving at SEA/TAC to fly back to San Francisco from NANOG 40, we find that there are two commercial WiFi providers, AT&T and T-Mobile. As our flight was delayed an hour we had a couple of hours to kill so we were “Jones-ing” for a net connection. Fortunately, one of our group had an AT&T account and well all had MacBooks.

So, Pete (on the left) connected to AT&T, shared the connection to his ethernet port which was connected to my MacBook via the red cable and my MacBook was sharing it back out on my WiFi interface so Matt (on the right) could connect. We were all happy campers.

Now if there is a way to do this without paying AT&T…