Friday, January 8, 2016

"Software defined radio" is more about "software" than "radio"

I've been looking for some way to learn more about software-defined radio (SDR). After a bit of perusing around, I decided to purchase a HackRF One from Sparkfun. It's $300, but that's far less expensive than many other systems, which run into thousands of $. I ordered it just before Christmas, and it arrived a few days after the New Year. I've had it for just less than a week. Here's what I've learned thus far about the HackRF One:
  1. It will most likely not "just work". I first connected it up to my primary computer, a 64-bit Intel quad core running Linux Mint 17. I thought I'd try just some of the basic stuff first. The first thing they suggest is to try the "hackrf_info" command to make sure the USB connection is working. I was able to install the "hackrf" toolkit with no problem (sudo apt-get install hackrf). But every time, the output of the command stated, "hackrf_open() failed: HACKRF_ERROR_NOT_FOUND (-5)". Forget trying out any radio stuff. The box isn't even talking to the computer yet. I then tried it on another computer, also running Linux Mint 17. Same thing. And again with yet another computer running Ubuntu 14.04.03. Same as the others. According to one of the HackRF wiki pages, the suggested fix is to first check that you're running the latest version of "libhackrf" and "hackrf-tools". It would have been nice that they provided information on how to check what version of these programs are currently loaded. You can't just run a "libhackrf --version" command in the terminal and POOF! know the version. It doesn't work that way. The next thing is to try running the command "hackrf_info" as root, which means using "sudo hackrf_info". Guess what? That didn't work, either. No worries, because there are other things to try.
  2. "Software defined radio" is more about "software" and less about "radio". The next thing to try is to use the "LiveCD" option. This means using a thumb drive loaded with the provided Pentoo operating system as recommended on the "Getting Started" page. I was able to load the OS onto a thumb drive (a fairly new 4 GB one), then put it into an older Compaq Presario C500 laptop. It booted up fine, and I was able to run the "hackrf_info" command. It gave me a proper response, telling me the firmware version of my unit. Turns out the firmware is 2014.08.01. Considering that the current version (as of this writing) is 2015.07.02, it's a bit out of date. The "Getting Started" page also provides a link to the site to update the firmware. Which leads to the next problem. Where's the file to flash the memory of the HackRF One? The website says to either download it or create it from source. This leads me to a digression. I should have realized that "software defined radio" was going to be more about "software" and less about "radio". I'm a radio engineer by training. I can do, um, okay with basic computer stuff. I'm not a heavy programmer by any stretch. The thought that I would be able to get this device, hook it up, and start programming filters and signals now seems rather naive. The point of this digression is that the "LiveCD" isn't working with my Ethernet connection. This is a first. The one thing I've always been able to count upon with Linux was that it would work with any Ethernet connection with which it was presented. Not so here. This "Pentoo" OS sees my Ethernet connection, but there's an error message stating, "NetworkManager is not running..." In order to get the latest binary, I have to manually load it to my primary computer, store it to a thumb drive, then cross-load it to the laptop running Pentoo.
  3. Most programmers are terrible at writing human interfaces. I already know that the HackRF One is built on a lot of Python programming. I see a lot of people exalting how wonderful Python is, how "powerful" it is, how "easy" it is. The last time I actually had something that was both powerful and easy was a Halmatro tool known colloquially as the "Jaws of Life". Python is arcane, it's command structure is far from intuitive, and the whole concept of "object oriented" programming is even less intuitive. I'm not saying Python doesn't work. It does. I can see that. But trying to figure out how to make it work requires forgetting pretty much everything I've learned about programming before this, except for using a QWERTY keyboard. Getting back to my problem at hand, I was finally able to load the latest firmware onto the HackRF One. It's now running firmware 2015.07.02. Does that mean it will now work with a regular Linux box? Nope. Now I'm getting the error, "hackrf_open() failed: HACKRF_ERROR_LIBUSB (-1000)". You know what that means? It turns out that it's a "write permission error" with respect to the USB drivers. And that means I now have to delve into the whole concept of "udev" rules. What are those? Again, no fucking idea. I've already read a few things. I'm already concerned because one of the primary sites many people point to talks about how "udev rules are flexible". Great. In common parlance, it means the rules and syntax will be arcane and extremely difficult to understand for all but the most patient people. But I guess I'm going to have to learn. As I stated before, "software defined radio" is more about "software" than "radio".

Saturday, March 31, 2012

My MIT Tech Review Comment: Resolution of Infrared Detectors

Over at MIT's The Physics arXiv Blog, there's an article talking about a new development of an infrared detector. The basic idea is that they're using a four-wave mixing process to upconvert the infrared wavelengths to the visible spectrum. In my mind, that's heterodyning. They're mixing several wavelengths together inside of some rubidium atoms and one of the output wavelengths occurs in the visible spectrum. From that point, they pass the signal to a normal visible light image processor (CCD, CMOS, whatever) and VIOLA! (Yes, I meant to say "Viola!" It's a joke. No comentz on me porr speeling. Kay?)

Now take a look at the image. The first few lines were created with a normal visible camera; the last line was created using the above-discussed technique. Note that the last line is a bit fuzzier than the first ones. Here's how the MIT article explains this fuzziness (read "lower resolution"):
The technique clearly has some limitations, not least of which is the drop in resolution that this process causes. That's largely because of the motion of rubidium atoms in the gas, which must be heated to 140 degrees C.

I think they're getting too complicated with this explanation. How about the reason for the lower resolution is due to the fact that the original image was created using infrared wavelengths? Resolution, meaning the ability to resolve objects within an image, is related to wavelength. The longer the wavelength, the lower the resolution becomes. Infrared wavelengths are longer than visible light. Hence, it makes sense that an infrared wavelength image is going to be lower resolution than one made using visible light.
This was going to be the comment that I was going to leave at the MIT Tech Review site, but I decided not to.

Why MIT's Technology Review Has a Dearth of Comments


I follow MIT's Technology Review. It's a pretty decent website for all-things-tech. One thing I don't like, however, is their system for commenting. One of my favorite blogs, The Sensuous Curmudgeon, has a very simple method for adding comments. You type in your comment, give it an e-mail address and the "name" by which you want to be known, and click "Submit". Done. No muss, no fuss.

MIT's system, on the other hand, is far more arduous. First, you have to sign in with an account. They give you the "option" of signing in with your Facebook (blech), Twitter, Google, or Yahoo! account. Since I'm here, I already have a Google account. I signed into that thinking that would then allow me to post a comment. Wrong! No, as shown by the image above, once I've signed in with my Google account, I still have to create a "Technology Review" account. Put simply, WTF!?!?! You want two accounts for anyone to post a comment? I thought MIT was supposed to be the bastion of high tech. Apparently, their website didn't get that memo. Now they're a bastion of high bureaucracy.
Whatever, MIT. Keep your web site. I'll post my comments here.

Friday, November 26, 2010

My Father is on Linux - Finally

My father is in his mid 70s. He's not big on new things. He likes things to stay the same, not so much because he hates new things, but simply because he doesn't want to have to spend time learning new things. This especially goes with technical things, such as working on computers. So long as he has his "Mahjonng" and "Freecell", he's happy.
His computer is currently a 10 year old desktop with 512 MB of RAM and a 80 GB hard drive. It was running Windows XP, though he's not been running it that much. Why? Because it's slooooooow. I mean slooooooooow. I was home for a few, too-short days and took the plunge to dual boot his system with Ubuntu 10.10 (Maverick Meerkat). His response has been a surprising, "Fantastic, fantastic, FAAAAAAANTASTIC!" Under Windows, his browser (Firefox) was so slow that when clicking on one of his web-based e-mails, he could go grab a soda or sandwich and be back before the e-mail was fully open. Now, it's almost instantaneous. Is his Windows infected? Is it just his computer needs some temp files cleaned out? Perhaps a good cache cleaning? No idea. Don't care anymore. He's got his computer back and that's what's important.
On top of that, I was also able to "share" his HP PSC 2355 all-in-one printer with both my mother's desktop (still running Windows XP and sloooooowly at that) and her laptop. That was a bit of a chore NOT because of the Linux, but because of Windows. How do I know this? Well, my laptop also runs Ubuntu 10.10. I had to print out the wife's and my tickets for the flight home. All I had to do to allow my laptop to print from my father's computer was to say "Look at IP address 192.168.1.170" (the IP address of my father's computer). After that, my laptop said, "This is a HP PSC 2350 series printer. Correct?" I simply confirmed it and I was done. Windows, on the other hand, kept saying, "What kind of printer is this? Where can I find the driver?" What? Really? Oh, whatever. I have my tickets, my parents can print from any computer, and they can also share files if needed. My father has also been able to get caught up on his e-mails now that he's able to fly through them.
This is only the beginning of the experiment. I hope that the streak of good luck continues.