Tag Archives: Linux

Playing around with the HackRF SDR

2013-06-19 20.51.18

Lucky me! I was selected for the HackRF beta program and received my board from Michael Ossmann / Great Scott Gadgets.  If you don’t know what the HackRF is, its an SDR (or Software Defined Radio), read more here.

I’m running Mint 14, I already had a previous install of gnu radio I was using with a rtl-sdr. I was able to get things up and running pretty easily. First I grabbed the hackrf firmware release package, and the hackrf host tools.  Then I built the host tools and updated the firmware.  At this point I thought I would be good, but it appeared that I had to update my rtl-sdr package as the hackrf source wasn’t present.  After that I was pretty golden and was able to get a FM demod sketch running pretty quickly.

2013-06-19 23.03.16By default the Jawbreaker is tied to an internal pcb trace that acts like an antenna, it’s just that antenna is pretty horrible.  Luckily I already ordered some parts from amazon.  A 2.4ghz +10db gain antenna, and a SMA to RP-SMA adapter.  The HackRF uses SMA, where as most wifi antennas are RP-SMA.  After cutting the trace to disconnect the antenna (R44), putting the adapter and my massive antenna on it… I was getting a good feed of data.

 

2013-06-19 23.20.00

I used a sketch that someone had made from the HackRF mailing list, it worked pretty good.  I already made my own FM demod using the RTL-SDR so I understand how it works, except this one was more elaborate.  I’ll investigate this more as I learn gnu radio a little better.  For now I at least got things up and running.

 

Cross platforming with MinGW/GCC

I’ve been working on this project that needs data streamed to the serial port, and I’m working on making it cross platform.  That’s at Windows/Linux … I’m sure if I get Linux working an OSX port would be easier.  I have to say MinGW is an great environment.  Teamed up with Eclipse, (other than my normal gripes with Eclipse) I’m pretty satisfied I must say.  I’m able to take my project over to Linux and compile just the same.

Now dealing with serial ports in Windows/Linux still needs some abstraction, I thought the MinGW lib’s would actually help more on this, but they seem to work fine for Linux but the process is slightly different in Windows, thus I still had to make wrapper functions for open/close/write/read and a few #if directives.  Not too bad, I just thought this is something simple enough that would have been built in already.  Oh also had to macro define sleep for a delay.  I should try to figure out how to compile for both environments with 1 compiler, maybe use crosstool.  For now I’m ok just having the same code and building on both environments.