WEBVTT

00:00.000 --> 00:00.660
A little late.

00:00.660 --> 00:03.440
Technical difficulties and all that.

00:04.140 --> 00:08.480
HackRF, you guys hopefully have seen a little bit of.

00:08.480 --> 00:15.080
And if you haven't seen the fancy new enclosure, here's one.

00:16.160 --> 00:18.900
So, you know, there it is.

00:18.900 --> 00:22.120
And there are a few people around here who have some.

00:22.120 --> 00:26.740
And if you back HackRF on Kickstarter, it's in the mail to you already.

00:26.740 --> 00:30.260
And there's one that people can win.

00:30.260 --> 00:31.900
Wireless CTF, right?

00:33.420 --> 00:35.360
Wireless CTF, HackRF.

00:35.360 --> 00:37.100
Somebody can win one, right?

00:37.100 --> 00:40.420
Yeah, do that.

00:43.840 --> 00:47.620
So go out, go forth and win a HackRF.

00:47.840 --> 00:49.980
So this is SDR Tricks with HackRF.

00:49.980 --> 00:52.520
I've given this talk once before at Recon.

00:52.520 --> 00:54.300
It's just a short talk.

00:54.300 --> 01:01.300
And the second half of the hour is going to be Jared Boone talking about the HackRF Portapak, which is super cool.

01:02.500 --> 01:09.120
It was Tau Day at the time that I gave this talk at Recon.

01:09.120 --> 01:10.620
You know, June 28th.

01:10.620 --> 01:11.920
Everybody should know the number Tau.

01:11.920 --> 01:14.440
6.2831853, etc.

01:14.440 --> 01:15.120
Right?

01:15.580 --> 01:16.480
Woo!

01:16.660 --> 01:19.500
Yeah, old school people call it 2 Pi.

01:19.500 --> 01:21.540
But Tau is the new hotness.

01:21.540 --> 01:22.900
Pi is old and busted.

01:22.900 --> 01:30.680
So I actually received for the first time in my life a happy Tau Day card from Dominic here.

01:31.580 --> 01:35.820
So that was pretty awesome.

01:37.460 --> 01:42.640
So this is HackRF1 without the swank case.

01:43.060 --> 01:49.200
It's an SDR peripheral that operates from 10 megahertz to 6 gigahertz officially.

01:49.840 --> 01:52.880
Unofficially is part of what I'm going to talk about today.

01:53.280 --> 02:01.980
20 megahertz bandwidth and that's a function of the 20 mega sample per second ADC.

02:02.100 --> 02:05.620
And it's a half duplex software defined radio transceiver.

02:05.620 --> 02:09.460
It can transmit and receive but it can't do both at the same time.

02:09.460 --> 02:14.320
And so I'm talking about kind of the top level capabilities.

02:14.320 --> 02:16.740
Like the high level overview of what the capabilities are.

02:16.740 --> 02:22.480
And in this talk I'm going to talk primarily about getting around these capabilities in various ways.

02:23.220 --> 02:28.340
Sorry, getting around the limitations of these capabilities in various ways.

02:28.540 --> 02:34.000
So just a little bit of an overview of the hardware design so you can understand what I'm talking about.

02:34.000 --> 02:36.680
The architecture of HackRF.

02:36.900 --> 02:44.980
At the antenna on the left we have signals that are in the range of 10 megahertz to 6 gigahertz.

02:44.980 --> 02:46.440
Actually this slide is really old.

02:46.440 --> 02:49.600
Back when we thought we would only go down to 100 megahertz.

02:49.600 --> 02:53.580
But we keep lowering that lower spec.

02:54.200 --> 03:16.500
And there's a wideband front end that has a mixer in it that converts the frequency so it shifts the frequency from anywhere in that range that wide range into the intermediate frequency range which is the 2.3 to 2.7 gigahertz actually now it's about 2.15 to 2.75 gigahertz.

03:16.500 --> 03:34.800
But it's right in that 2 gigahertz band right around 2.5 gigahertz we have an intermediate frequency and then there's an intermediate frequency transceiver that converts between the intermediate frequency and baseband where baseband is the vicinity of 0 hertz.

03:34.800 --> 03:37.800
So we have dual conversion.

03:37.800 --> 03:52.940
We convert the frequency once between RF and IF and then we convert the frequency a second time between IF and baseband and then we have an analog to digital converter and everything is digital from there on out.

03:53.040 --> 03:57.440
On the transmit side it's the exact reverse.

03:57.460 --> 04:13.620
Same thing we go digital to analog baseband around 0 hertz and then it gets converted to the intermediate frequency and then it gets converted to the RF which is at whatever you configure it to between 10 megahertz and 6 gigahertz.

04:13.660 --> 04:23.480
So now that you're a little bit familiar with the architecture the first thing I want to show you is tapping into the baseband directly.

04:23.480 --> 04:27.180
Tapping into the analog baseband signals.

04:27.180 --> 04:41.320
So going back here what we're doing is bypassing all this radio stuff and just talking to the ADC or DAC on this analog baseband connection directly.

04:41.320 --> 04:43.220
So we put a header there.

04:43.220 --> 04:59.160
HackRF Jawbreaker if you have one of the beta units didn't have this little baseband header but HackRF1 we thought well it would be nice to add some expansion capabilities and this is one cool way to do that.

04:59.160 --> 05:14.160
So in this example I'm just plugging in two wires into the analog to digital converter so that I can use the HackRF to directly sample some external electrical signal.

05:14.320 --> 05:22.680
And for example I might use something well I might use something like a Hot Wheels radar gun.

05:22.880 --> 05:25.240
Which is one of my favorite toys.

05:25.240 --> 05:34.040
The Hot Wheels radar gun has multiple components in it and if you buy one from eBay it might be broken.

05:34.040 --> 05:41.080
But most likely the part that's broken is that board you see there with the two red controls on it.

05:41.080 --> 05:47.520
It's the control board and LCD and that's completely separate from the actual radio part.

05:47.520 --> 05:51.680
The actual radar that's within the Hot Wheels radar gun.

05:51.680 --> 06:01.360
So if you want to just use this thing for your own project you just rip that part off and connect it directly to the radar with these three leads.

06:01.360 --> 06:11.460
All you have to do is get a power supply and you get an analog baseband radar return signal that you can plug into your oscilloscope or you can plug it into your HackRF.

06:11.640 --> 06:15.320
And what we get is two channels.

06:15.320 --> 06:30.760
We have two ADCs and each one is a differential signaling with one volt peak to peak and the common mode voltage needs to be like around the middle of the supply voltage.

06:30.760 --> 06:38.240
So it's around 1.5 volts and there's no anti-aliasing filter on there so you have to kind of provide that on your own if you want.

06:38.240 --> 06:43.360
So it's a little bit tricky to interface with if you don't have much experience with electronics.

06:43.360 --> 06:46.700
It's not as easy to use as say an oscilloscope.

06:46.700 --> 07:02.320
But in this particular example I was able to directly plug in the Hot Wheels radar gun with nothing other than just some wire going from the radar gun to the HackRF baseband header.

07:02.340 --> 07:21.540
And I was able to just like wave my hand around in front of the Hot Wheels radar gun and I could see like in canoe radio exactly what I expected to see and I could measure distances or I could measure speed very easily.

07:21.620 --> 07:40.480
In addition, there's a direct to digital to analog converter so you could use the HackRF kind of as a general purpose function generator similar to how you could use it as a general purpose oscilloscope.

07:40.900 --> 07:50.480
It's again a little bit tricky to interface with because it's differential signaling and it puts out a maximum of about 800 millivolts peak to peak.

07:50.480 --> 07:58.240
And again there's no anti-aliasing filter so you would need to provide that yourself if you were going to design a circuit to connect to this.

07:58.520 --> 08:35.460
In the future it would be really cool to have, and I kind of started working on this but it's a ways off probably, it would be really cool to have a little add-on board for HackRF that kind of takes care of some of these details for you, adds the filtering adds like a differential amplifier so that you could just say for example plug in an off-the-shelf oscilloscope probe or plug in or use this thing just like you would use a bench oscilloscope or function generator kind of all in one.

08:35.460 --> 08:37.760
It wouldn't take very much circuitry.

08:37.760 --> 08:42.940
All the complicated stuff is already on HackRF on the main board.

08:45.360 --> 08:47.840
Which is what this slide is about.

08:48.320 --> 08:51.340
It would just make it a little bit easier to use.

08:51.400 --> 09:02.220
And oh, and one thing the reason I put this slide here is to remind me that you could interface with an external RF front end this way.

09:02.220 --> 09:19.240
And this is one of the most exciting possibilities for this kind of expansion whether you use this baseband expansion board that may exist in the future or whether you design your own circuit yourself to plug into the analog baseband header.

09:19.240 --> 09:28.260
One of the best uses for that maybe would be to experiment with a separate RF section.

09:28.260 --> 09:32.840
A separate radio other than the RF section of HackRF.

09:32.840 --> 09:42.460
If you just want to use HackRF to be the computer interface to your radio, this would be an excellent solution.

09:43.180 --> 09:44.660
Full duplex.

09:44.660 --> 10:02.020
Now HackRF is half duplex and but the everything actually from the USB connector through the microcontroller into the analog to digital converters and digital to analog converters is actually full duplex.

10:02.020 --> 10:15.520
So from that analog baseband header to the host computer, all of that bi-directionally, you could operate in full duplex mode in theory at reduced sample rates.

10:15.520 --> 10:43.800
And so this is an interesting option if you were to connect your own radio front end to it that you could actually use it in full duplex mode or maybe you'll just put, maybe we'd just add a second RF section like a transmit only RF section that we'd plug into the baseband header and then you could use the onboard RF section for receive or vice versa.

10:45.940 --> 10:59.300
The operating frequency of HackRF the design, at first we decided that we wanted something to work from 100MHz to 6GHz and we weren't sure if we would really meet that goal.

10:59.300 --> 11:06.940
But once we kind of got the design on the drawing board, we thought, hey, we should probably be able to do 30MHz to 6GHz.

11:06.940 --> 11:15.520
And then when we actually started testing things, it was clear that it was working pretty well down to about 10MHz.

11:15.520 --> 11:28.520
And at that point, I started experimenting with different components to see if I could enhance that low frequency behavior without affecting the high frequency performance adversely.

11:28.520 --> 11:31.080
And I've had quite a bit of success.

11:31.200 --> 11:38.460
And I haven't talked about this much yet, and I haven't figured out what I can guarantee.

11:38.620 --> 11:44.920
But a little bit of a review before we start before I show you the results.

11:44.920 --> 11:50.840
Remember that we have two different mixers that are shifting the frequency.

11:50.980 --> 12:01.840
And so the local oscillator that goes to each mixer is the amount that the frequency gets shifted.

12:01.840 --> 12:10.080
So if we wanted to tune to 6GHz in the RF, and our intermediate frequency is 2.5GHz.

12:10.080 --> 12:18.180
Well, 6GHz minus 2.5GHz, that's 3.5GHz.

12:18.180 --> 12:22.520
So we have a 3 .5GHz local oscillator right there.

12:22.520 --> 12:26.540
And then we'll have a 2.5GHz local oscillator right here.

12:26.540 --> 12:30.100
Because that's shifting between 2.5GHz and 0GHz.

12:30.100 --> 12:42.700
So what affects the primary limitation on what frequencies we can tune to, is the range of frequencies that we can tune these two local oscillators.

12:43.080 --> 12:47.960
The range that we can tune this one to is only in that 2GHz band.

12:47.960 --> 13:11.560
But the range that we can tune that front-end oscillator, it's a range from like 85MHz up to, I think the data sheet, or the advertisement for the part is something like 4.somethingGHz, but it turns out you can actually configure it up to 5.4GHz.

13:11.560 --> 13:26.180
So, theoretically, we can tune this up to 2.7GHz, and we can tune that up to 5.4GHz, add those two together, and what's that, 8.1GHz?

13:26.180 --> 13:32.340
So we can configure it to tune anywhere from 0Hz to 8.1GHz.

13:32.340 --> 13:34.340
It's a really wide range.

13:34.340 --> 13:41.600
It doesn't perform well over that whole range, of course, but that's the range that it can be configured to.

13:41.600 --> 13:55.740
Now, I went ahead and tried this, and this is a plot showing the maximum, absolute maximum transmit power on the antenna port from 0 to 10MHz.

13:55.740 --> 14:04.840
So 10MHz, it's putting out about 15dBm, and that's our advertised minimum frequency.

14:04.840 --> 14:10.280
But as you can see, it works quite well way below 10MHz.

14:10.280 --> 14:15.220
More like 1MHz is kind of where it starts taking a dive.

14:15.480 --> 14:23.060
And I've used this, for example, to tune to AM radio stations, shortwave radio stations.

14:23.060 --> 14:43.700
I've literally put a long piece of wire and just stuffed the end of it into the SMA connector on a hack RF and listened to radio Havana, Cuba, shortwave radio station at 5MHz at my house in Colorado.

14:44.200 --> 14:46.620
I do live on a mountain, that's true.

14:46.620 --> 14:48.800
Although my lab is in a valley.

14:50.700 --> 14:54.180
So here's an extreme example.

14:54.180 --> 15:00.280
I wanted to see what the lowest frequency thing was that I could pick up with hack RF through the RF port.

15:00.620 --> 15:09.560
So I got a spool of wire and I just clipped to the leads and plugged that into the RF port.

15:09.900 --> 15:15.280
And... oh, shoot, I don't have a good screen shot of this.

15:15.400 --> 15:20.500
And what I did was I held it up to a low frequency RFID reader.

15:21.000 --> 15:25.420
And I was able to sniff low frequency RFID packets.

15:25.420 --> 15:37.320
So I know a lot of people were excited when I first announced that hack RF could go down to 10MHz because they said, oh, that's now 13.5MHz is in our range.

15:37.320 --> 15:39.680
We can do high frequency RFID.

15:39.680 --> 15:48.660
Well, two orders of magnitude lower in frequency is low frequency RFID tags operating at 125kHz.

15:48.660 --> 15:55.420
And that is way down by this, the bottom of the valley on the left, right?

15:55.840 --> 16:01.400
And I was actually able to pick up those RFID tags very easily.

16:01.400 --> 16:08.340
I can't show you the little demo of it because I'm short on time and my laptop isn't working.

16:08.400 --> 16:12.180
So you'll just have to take my word for it.

16:13.620 --> 16:14.480
What's that?

16:14.480 --> 16:19.180
Oh, I won't worry too much about time, but still, my laptop isn't working.

16:19.180 --> 16:31.540
So if anybody wants to see later one-on-one, I do have on my laptop like a saved waveform that I can show you a little replay of this.

16:31.840 --> 16:34.140
I just can't put it up on screen.

16:34.520 --> 16:49.600
But I was totally able to do this just by clipping in a loop of wire to my RF port, holding the loop of wire up to an RFID reader and then holding an RFID tag next to it.

16:49.600 --> 16:54.920
I got a very clean signal that I could decode in software with no problem.

16:54.920 --> 16:57.560
Now this is a receive only solution.

16:57.560 --> 16:59.960
I can't spoof a tag.

16:59.960 --> 17:19.520
I can't transmit to the reader because the way low frequency RFID works is that I would have to be able to modulate the power of the signal, the 125 kHz signal going through the coil of wire that's within the reader.

17:19.700 --> 17:23.420
And I don't have enough output power to do anything like that.

17:23.420 --> 17:36.460
If I were going to do that, I would need some kind of small external active circuit like a one transistor circuit for example to actually be able to modulate and spoof a tag.

17:36.460 --> 17:41.920
It could literally be as simple as a one transistor circuit or a one diode circuit.

17:42.120 --> 17:47.620
But I would need some kind of external circuit to actually spoof a tag.

17:47.820 --> 17:52.240
Sniffing tags though, no problem with just a loop of wire.

17:52.240 --> 18:23.600
And even though it's way down at the edge of well below the good operating range, the amount of power that I get coming in on that direct coupling with this big loop of wire held right against the reader, it's so much power that it overcomes the losses that are in the hack RF receive chain in the analog section at those very low frequencies.

18:23.600 --> 18:29.080
So I thought that was pretty exciting that I could actually do something way below 1 MHz.

18:30.200 --> 18:35.500
Now I want to show you something about operating way above 6 GHz.

18:35.500 --> 18:44.260
So the highest frequency test equipment I have in my lab is this spectrum analyzer that goes up to 7 GHz.

18:44.260 --> 18:54.800
I don't have anything that goes up to 8.1 GHz which is the highest frequency that I can tune a hack RF to or I can configure it to, but I can at least show you things up to 7 GHz.

18:55.380 --> 19:10.160
So the yellow line, just look at the yellow trace for a little bit, that's showing the maximum output power that I'm getting directly out of the RF port from hack RF tuned to 4 GHz to 7 GHz.

19:10.160 --> 19:13.800
So 4 at the left side to 7 on the right.

19:13.800 --> 19:17.780
And this is the maximum output power in DBM.

19:17.780 --> 19:22.000
Now this little marker here, right there, that's 6 GHz.

19:22.000 --> 19:26.700
So that's the edge of the advertised operating frequency range.

19:26.700 --> 19:33.300
As you can see, as you go up in frequency, overall the performance declines.

19:33.300 --> 19:41.640
There's a little bit of a hump around 5.5 GHz, like it gets a little better in the 5 GHz band and then a little worse.

19:41.640 --> 19:46.900
And then just a little bit above 6 GHz, it starts dropping precipitously.

19:47.040 --> 19:56.180
And our output power up at 7 GHz is barely measurable with the way I have this spectrum analyzer configured.

19:56.180 --> 19:58.760
So it's not really useful up here.

19:58.760 --> 20:04.920
But it certainly could be useful in the low 6 GHz band, above 6 GHz.

20:04.920 --> 20:13.040
Now, then I did this again configuring the HackRF in a completely different way.

20:13.040 --> 20:15.480
And that's how I got this blue trace.

20:15.560 --> 20:23.540
What I did was I configured, I basically bypassed the entire front end mixer.

20:23.700 --> 20:33.180
And I sent the intermediate frequency right out directly through the front end amplifier to the antenna.

20:33.180 --> 20:35.700
And this is a normal configuration.

20:35.700 --> 20:42.500
This is how we tune to things like around 2.4 GHz, 2.5 GHz.

20:42.500 --> 20:45.780
That's how we normally tune to things in that 2 GHz band.

20:45.780 --> 20:49.240
The intermediate frequency band is by bypassing the front end mixer.

20:49.320 --> 20:55.360
So I bypass the front end mixer and then I look at the output power maximum output power.

20:55.360 --> 20:58.540
I'm really maxing it out as much as I can.

21:00.040 --> 21:12.080
But I'm looking at the output power as I sweep the intermediate frequency from 2.15 to 2.75 GHz.

21:12.080 --> 21:19.280
I sweep that frequency and then I got this blue line in the 4 to 7 GHz band.

21:19.280 --> 21:30.880
So why do we have these big peaks in this region from here to here and then from this region from here off beyond my measured frequency range?

21:30.880 --> 21:34.940
It's because they are harmonics of the intermediate frequency.

21:35.180 --> 21:39.880
So this range right here is twice the intermediate frequency.

21:39.880 --> 21:47.940
2.15 times 2 is 4.25 GHz and that's where this blue region starts here.

21:48.260 --> 21:52.180
And then three times that starts here.

21:52.180 --> 21:55.460
So this is the second harmonic and the third harmonic.

21:55.460 --> 22:15.840
Now notice that especially way up here around 6.5 to 7 GHz, this actually allows us to get much more output power than we are able to by properly using the wideband front end and configuring it to operate like the way you would expect up here.

22:15.840 --> 22:23.220
The question is am I still dumping tons of power out at 2.4 GHz?

22:23.220 --> 22:25.420
Absolutely, I certainly am.

22:25.420 --> 22:31.860
But by exploiting the harmonics, and if you were going to do this in real life, you would use a filter.

22:31.860 --> 22:39.600
You can take an off-the-shelf external filter that you can plug in between the hack RF and antenna.

22:39.640 --> 22:49.320
You could actually operate at 7 GHz by filtering out everything below that would include all that power you are putting out in the 2 GHz band.

22:50.120 --> 22:55.320
It's a pretty dirty trick, but it's something that can be done.

22:55.400 --> 23:05.160
And it's actually not too uncommon a trick for people who typically build equipment or use equipment in the many GHz.

23:05.360 --> 23:19.180
So, one thing to note is that the frequency response is extremely non-flat of this blue curve, especially note that gigantic peak around 4.9 GHz.

23:19.180 --> 23:27.860
The reason that it is so non-flat is because I am actually over-driving the front-end amplifier.

23:28.680 --> 23:35.580
And so, it's just like over-driving a guitar amplifier and getting that distortion.

23:35.580 --> 23:40.600
That distortion increases the harmonics that you get.

23:40.600 --> 23:55.380
So that when we look at the harmonics, if we are over-driving that front-end amplifier, we are able to get some extra peaks in those harmonics at certain frequencies where things just over-drive the amplifier a little bit more.

23:55.380 --> 23:59.580
So that's why we get a really good peak around 4.9 or 5 GHz.

23:59.800 --> 24:06.440
And that's probably why this is increasing and not decreasing in this region below 7 GHz.

24:06.440 --> 24:19.540
So what this does from 7 to 8.1, I don't know, but what I would expect is that the yellow curve drops off and becomes totally unusable if it's not already.

24:19.580 --> 24:30.240
And that the blue curve probably goes up and down a little bit and eventually maybe traces something similar to this curve, but less so.

24:30.360 --> 24:37.220
So that's kind of a dirty trick you can use to do some fun things at very high frequencies.

24:37.700 --> 24:47.440
And one other thing I wanted to note, I talked a little bit about kind of overcoming the limitations of the operating frequency range.

24:47.440 --> 24:53.640
I talked about overcoming the limitations of half-duplex if you use that baseband header.

24:53.640 --> 25:00.600
But another thing I want to note is that theoretically you could overcome limitations of the sample rate.

25:00.840 --> 25:17.400
We have a sampler that is specced to run up to 22 MS per second, but we always figured it was wishful thinking that we'd just barely get up to 20 MHz or 20 MS per second on our USB interface.

25:17.400 --> 25:23.740
So as it turns out, at least on some USB host controllers we can actually exceed that.

25:23.740 --> 25:31.620
Like on my laptop I can reliably run at a maximum sample rate of 21.5 MS per second.

25:31.620 --> 25:34.960
So just a little bit higher than 20 million samples per second.

25:34.960 --> 25:39.420
Which is 43 MB per second going over USB.

25:39.420 --> 25:41.960
That's a lot to go over high speed USB.

25:41.960 --> 25:46.180
I've actually never seen any other USB device go that fast.

25:46.180 --> 25:49.280
Except for super speed USB devices of course.

25:49.560 --> 26:05.440
And additionally if you were to do processing on the ARM instead of on the host computer and not worry about the limitation of USB, you might even be able to go a little bit faster.

26:05.440 --> 26:14.240
And if you want to learn about running code on the ARM, stick around for the next half hour to listen to Jared.

26:14.980 --> 26:32.240
And there is a little, there is some header there's an extra header that you can install on HackRF1 that gives you direct access to pins on the CPLD which is just some little logic glue between the ARM and the ADCDAC.

26:32.240 --> 26:43.080
So you could completely bypass the ARM and stream your samples in and out of those CPLD pins like if you had an external FPGA board or something like that.

26:43.080 --> 26:47.400
And you might even be able to get a little bit more sample rate out that way.

26:47.600 --> 26:53.560
The ADCDAC chip is spec to run at 22 million samples per second.

26:53.560 --> 26:57.160
But I believe it can be overclocked in many cases.

26:57.160 --> 27:07.040
And it can also be replaced with a pin compatible replacement chip that runs up to I think 40 mega samples or 60 mega samples.

27:07.040 --> 27:11.140
I'm pretty sure it's just the same chip that they just bin.

27:11.160 --> 27:16.720
And so the ones that they sell as 22 mega samples maybe didn't test as very well at 40.

27:16.720 --> 27:21.820
But they probably operate somewhat faster than 22 in most cases or can.

27:21.820 --> 27:32.180
And additionally there's an analog baseband filter in the intermediate frequency transceiver that can be configured to a maximum of about 30 megahertz.

27:32.180 --> 27:46.380
So that's kind of the limiting factor at that point if you kind of use those tricks to bypass USB and bypass the arm and at the extreme actually replace that ADCDAC chip with a faster one.

27:46.380 --> 27:52.800
Your limiting factor would be that baseband filter that gets you up to about 30 megahertz instead of 20 megahertz.

27:53.120 --> 27:55.320
And that's SDR tricks with HackRF.

27:55.320 --> 27:56.220
Thanks for listening.

27:56.220 --> 27:59.940
And I hope you'll stick around to hear Jared talk about the HackRF PortaPak.

27:59.940 --> 28:00.680
Thank you.

