Geeks are people too...sort of.

More Fun With BeagleBone Black

October 20, 2013

I've discovered that owning a BeagleBone Black (or, in my case, two) is kind of like owning one of those really, really nice
cars that you buy but you can almost never drive because it spends so much time in the shop. It's a lovely piece of hardware, it
really is, but the people who created it seem to have gone to great lengths to make sure that all you can do is sit back and admire
it, because you certainly won't be able to do anything useful with it.

My next foray into BBB craziness was attempting to get a wifi dongle to work with it, so I don't have to constantly hook it up
to my wireless adapter. Should be easy, right? Of course not, this is the BeagleBone Black we're talking about. Nothing is easy.

I bought the Edimax EW-7811-UN, which is recommended for BeagleBones,
Raspberry Pi's, and the BBB. Unfortunately, what I didn't realize is that, while it used to work with the BBB, some OS changes were
made to it so that it takes a lot of wrangling to get it to work, if you can get it to work at all (I couldn't).

First of all, it seems that, at some point, the drivers weren't really available, so you would have to build them yourselves. I think
the drivers are available now, but I went ahead and compiled the drivers per these instructions.
The next hurdle was getting it to work with connman, the connection manager, which is, basically,
almost completely undocumented - Fun! (Note to developers everywhere: in the words of an former boss - "if it ain't documented,
it doesn't exist").

However, from what I can gather, connman uses wpa_supplicant for the WPA transactions
(if you're using WPA, which, um, you should be). So, after fiddling around for a while, here's what my /var/lib/connman/settings
file looks like:

Now, just getting to this point took a lot of tweaking and messing around with various settings. However, it's still not connecting.
It's finding the access point, and even getting its MAC address, but it's unable to authenticate. Here's what happens when I run wpa_supplicant manually in debug mode:

and basically it cycles through this over and over. Now, I'm sure this all means something to whoever wrote this code, but to me
there's absoutely nothing helpful here. it's written for someone to try to debug the program, not to help someone troubleshoot
a problem with their setup. And, yet, this is, as far as I can tell, the only troubleshooting tool these fine folks have seen
fit to provide. Nice.

So, after wading through all this garbage, and trying a bunch of different things, I finally gleaned (with absolutely no help
from whoever wrote this crappy software, thank you very much!) that it's failing authentication. Why? Who knows. Really, there's
a special circle of hell for people who write error messages like this for their users to have to decode. When you get there,
you spend eternity debugging Windows NT BSOD error messages.

So, I tried looking up the incredibly clear message EAPOL: Supplicant port status: Unauthorized. Now, there are a number of posts that
imply that you need to have eth0 disconnected in order for this to work (which makes absolutely no sense to me whatsover -
since when are you only able to connect to one network interface at a time?), but doing that seems to make no difference. I've also
seen a lot of descriptions of procedures people use to get this to work that are the technological equivalent of holding a dead
chicken over the machine and praying. This didn't work for me either (well, okay, I didn't try the chicken...yet).

Which brings up my gripe: why is this so $@%^!&@ hard? Why do you have to go through this hell to just connect to a wireless access
point - something that they do in the Mac and Windows worlds all the time? Would it be so bleeping hard to just spit out some relatively
helpful messages - something along the lines of "authentication failed", or even "bad passphrase"? Something.

If you are guilty of writing software like this, do me a favor: go to the mirror, grab yourself by the collar and slap yourself
repeatedly, saying "Bad Programmer! Bad!" over and over, because it's exactly what I'd be doing if I were there with you.