And I'm done here. Everybody clap for Balint. I didn't suppose Anders is here again? I like to call him out every time, every DEF CON. Now, Anders very kindly lent me his prepaid cellular phone when he was visiting from overseas a couple of DEF CONs ago. We had word that I think we needed to switch on one of the science instruments on that space probe, and I was here, and so I tethered to his phone and then SSH'd into a laptop we'd left at the Arecibo Radio Telescope, and they powered it up, and then using some software that we wrote, we sent the command while I was watching the talk, because the talk was pretty good too, so I didn't want to leave that. But anyway, today, thank you very much for coming and watching. I hope this is going to be informative, and you'll be able to learn some tips and tricks from this. I just want to talk about some suggestions I might have, and I'm going to be biased, because it's just using some tools that I've been working on for quite some time, but how to basically use some tools to get good captures, IQ captures, in a manner that you can use to make sure that you record sufficient metadata under certain circumstances. If you're doing lots of captures, and then once you have all that IQ, some tools that you can use to actually review it, and see whether signals that you're looking for, or anything interesting may actually be in those captures. So, capture and analyze like a BALS, and I just want to do a shout out to Nate, and there's Nate Temple, Dev Nelling, stick your hands up Nate. That's BALS number one, where's BALS number two? Where's Neil, Neil Pandia, where are you? There he is, hand up there, there's BALS number two. They've been very, very helpful with all my efforts, thank you guys. So anyway, the first one is, let me just get these slides up here. There we go. Who's heard of KitchenSync? Well that's great, then I have something to teach you. KitchenSync is, I'm probably the only one that uses KitchenSync, I've used it in the entire world now, but it also might be a little bit daunting, because it has three pages of command line options, so it's highly flexible, but KitchenSync is a tool that I originally wrote when I was at a research, and I've been sort of extending it a little bit, it's open source, so I forked the repo and I've been adding features to it. It's basically a Swiss Army knife for capturing, and in this particular case also testing some of the more advanced features of USRP, of USRP. So I've got one plugged in here, and the thing about this is that I haven't tested it with KitchenSync, but if you wanted to use this with other hardware like an RTL or any other SDR you can imagine, what you can do actually is either modify the source code to use another API, or Josh Bloom made Soapy SDR, who's heard of Soapy SDR? Yeah, a couple of you? So Soapy SDR is supposed to be a totally vendor neutral, a neutral API that allows you to access a whole lot of different types of software-defined radio hardware. It has been very comprehensive, it has a very, very wide support for hardware. I highly recommend you check it out, it's also a really slick API. But one of the things he added to Soapy was the ability to have Soapy talk to USURPS through UHD, but then also he made a loadable module for UHD to access Soapy devices. So you can install Soapy SDR, and any application that uses UHD will then hook into Soapy, and then you have every other SDR available for you to use as well. So if you want to use KitchenSync with something else, install Soapy, install the UHD module, and then you can access whatever you want. So KitchenSync is a command line utility, it's a single C++ file that you can compile, and you basically can tell it to do all sorts of things. I've mainly been using it to do captures. So the command line ends up getting pretty long if you need to do more advanced stuff, but let's break it down. So here's an example. You just run KitchenSync, you tell it how many RX channels you want to capture on. If your SDR supports one, then obviously it's just going to be a single channel, but if you're using an SDR that does multiple channels, like a B210 or what have you, then you can have it capture both channels at the same time. You tell it how fast you want it to capture the sample rate, RX rate. Progress interval, and I'll show you this in a demo in a minute. Progress interval is nice because you can either have it just sit there silently doing its thing, or every second or however long you want, it'll print out the timestamp and how many samples it's captured and so on. That can be good for testing. Interestingly enough, I've found that if you're really pushing the limits of capture, you know, these things operate over USB 3 nowadays, and you can do 56 megahertz worth of usable bandwidth, you can stream that, to RAM disk, you can create a RAM disk on, you know, OSX or your Mac or whatever you want, and then stream it directly into RAM and then you can support that capture rate, which is great if you want to do really high bandwidth captures. But I found, interestingly, that depending upon your system configuration, if you end up having the program print out the progress interval every however long, there's, you know, maybe a system call that happens or there's a little bit of overhead there, and sometimes you can drop a sample if you're really at the limit. So, sometimes you want to have that off. Obviously, then you set the frequency that you want to capture at, the antenna, and then, I'll talk about this in a minute, but the CPU format that you want the samples in, the gain, the capture file, and then comes the cool stuff, which is about time synchronization. So, I found myself recently needing to do captures at specific times for a specific length, and it has some options depending upon your, you know, time. So, you've got the timing set up with your SDR about when you want to start, because if you're going to RAM disk or you only have limited drive space and you're capturing a whole bunch of things simultaneously, you don't necessarily want to supervise it and let it go on forever. Another thing that I'll talk about is the timing file, which is important. So, who's done captures where you've ended up dropping samples? You try and capture a bunch of data and then your SDR is producing samples, quicker than what your computer can record to disk. This doesn't happen, obviously, when you're, you know, doing quite narrow captures at slower rates, but if you're doing it really fast, stuff like 50 mega samples per second, you can overflow very quickly. So, what the timing file does is it actually stores in a sidecar file the hardware timestamp and the number of samples that have been received, so that if you do, in fact, have any overflows, you can go back and it's just a CSV file and see the time at which the next sample came in after you had a discontinuity, which means that if you need to, you can actually recreate a continuous stream, because often what happens is when you take your capture and then you put it into some decoder, right, if you're tracking a digital signal, then if you have a discontinuity, it might screw up your clock recovery, your decoder will, you know, lose lock on your signal and then you won't know what happened, because it's assuming that the sample stream is continuous, you haven't dropped anything. So, there's something else that I'll show you you can use to, that'll take in that timing file and then pad the missing data and then, you know, whatever is consuming this won't have any problems. Another thing, for example, is you can add an RX start time down the bottom. So, if you have the ability to set the time... If you have the ability to set the time in your device, like on this one, you can actually set, you know, tell it, all right, the time is now this. Or, you know, I'll show you how else you can synchronize time, but then you can actually say, I want you to start streaming it at this time. I'll come back to that in a minute and explain why that's important. But if you're doing multi-channel stuff, this can be, you know, part of a MIMO experiment, or if you've got two different antennas pointing in two different directions and you want to capture at the same time, or you want to look at two different frequencies, but make sure that you record in a time-aligned manner, then you can actually tell it to do multiple channels. So, you can give it, you know, a list of frequencies and a list of gains. And what's nice is that you can use this formatting option in the RX file so that instead of just spitting out one IQ file, it'll spit out two. Or if you want it one, but you want interleaves to one, you can give it two samples, you can tell it to do that as well, depending upon, you know, whatever is consuming this would require. And then some tips, if anybody's using, say, a B210, if you want to decrease your chance of overflows, you can increase the num receive frames in your UHD arguments, just another thing that you add to the command line options. And people, you know, try different values and talk about different values, but I've found that actually depends upon the... hardware you're using and the controller and what have you. So, you need to use and experiment with some different values there because some will just crash the app, some will crash the, you know, the controller, you'll get corrupt data. So, it's always good to experiment with those values. And then there are other ones that, you know, if you have a device like this, it has an A-side and a B-side, so if you want to use the B-side instead of the A-side, you can set that as well. And the important thing about the CPU format, when you capture IQ samples, they're usually in one of two standard formats, floating point or fixed point. And floating point is usually FC32 or CF32 in Soapy land, and then you've got SC16. So, you've got, you know, pairs of 16-bit short samples or pairs of floats. And obviously, if you have pairs of floats, they're going to be twice the amount of data than two fixed point, you know, short values. So, if you're trying to fill up your RAM disk at 50 mega samples per second, obviously, you want more bang for your buck. So, you can tell it to use the short samples. And what's interesting is that commonly, when you actually stream from a device, it actually ends up coming off the FPGA in a fixed point format anyway. So, there's no point in having the host convert it to a floating point format, which is, you know, good when you're using it in various applications. But if you're just trying to store it, you can get twice as much in there. And the other feature that I added recently was this RX file loop size. And that's important where you have a finite amount of storage. Let's say RAM disk, let's say, you know, you've got 32 gigs there. You leave, like, 500 megabytes for your OS. And if you want the system to just keep capturing and then you stop it when you want to, once you've seen some other experience, if an external event occur, maybe you're looking at another monitor or maybe you're listening to something or looking at something, then, and you manually stop the capture, it means that it will store the last, you know, 31 and a half gigabytes worth of data. So, in this case, it'll just keep basically recording into a circular buffer in RAM. And if you specify the loop size, it'll tell you how big you want that circular buffer to be. And then, when you do that, it'll create a .loop file as well, which is another sidecar file that will store the file cursor and the sample count every time it loops and then at the end. So that once you end up with your final capture file, if you think in terms of a circular buffer, the beginning of the file will be somewhere, you know, the beginning of your last 31 and a half gigs is not at the beginning of the file, it's somewhere inside the file. So, it stores the offset there and then you can loop that through to recover your continuous recording. So, what's cool is once you do these big recordings, you can capture a lot of data. This is a waterfall here captured around, you know, I think 437 megahertz. And you can see there are a lot of different signals in there. And it's a very, very large bandwidth. So, lots to see and explore. But the thing is, if you want to actually go in and analyze these signals, there's a lot of them. And so, it'd be nice to have some tools to sort of zoom in and look around and look a little bit closer. So, I'll show you some interactive stuff in just a second. This is an example where you can zoom in with this little tool called BASFFT. It can read in IQ and it'll plot it. You can have a text file that lists frequencies and you can give it names. And then there's this different app that uses GNU Ready called the multi-channel runner that I'll show you. And that will take in this massive IQ on all these frequencies that you specify and then extract the various channels and then decode them in whatever way you wish. And then it'll take that metadata out and then overlay it back on your waterfall. So, you can see these are transmissions and it's got those dotted lines around the transmissions to indicate that's when the squelch opened. If you're dealing with P25 transmissions, then you can do a big capture, analyze it, put it through the multi-channel P25 decoder. And then you can do a big capture, analyze it, put it through the multi-channel P25 decoder. And then who's familiar with the different frame types in P25? Where you've got your header data unit and the tail and the two voice packets. So, when you transmit P25, there are different frame types that it transmits. There's a header and then when it's transmitting voice traffic, it actually alternates between these two voice packets, voice frames. And as you can see there, you can identify voice traffic by the cyan and darker blue alternating rectangles if you, you know, look at each of these channels in the waterfall. So, I'll show you that in a sec too, but it's basically the OP25 decoder with the modification to spit out the timestamp at which each of these frame types are decoded by the, you know, in each channel. So, let's take a quick look at that. I wonder whether I can... Where did that file go? Oh, here it is. So, I'll do some command lines. I'll do some command line demos of kitchen sink in just a second, but these are just some captures that I did with it. And why is that not working? Okay, here we go. So, let's have a look at the whole capture. So, when you run the program, it looks like... Like this. So, sorry, it's difficult for me to see. You run the program, you give it your capture file, you give it a frequency list and then you give it the event list which basically contains the output from once you've run it through the multi-channel decoder and then it shows you all of the channels that you've put into your text file, it's just a list of frequencies, and then it'll draw the lines to show the channels and then once it's gone through and analyzed all those channels, then you can just zoom in and you can see that you have the IQ that's been represented in the waterfall and you can see the energy there, you know, the red there, but then because it's gone through a narrowband FM decoder and with a squelch in front of it, it's identified with that white line around it saying, oh, I actually found something here. And when it does that, then it actually demodulates using narrowband FM, makes a WAV file, and then you end up with all these WAV files here. So, you can, you know, click on it there in your OS and listen to them, or you can also just double-click them in the waterfall like this, and then it'll play it back. So, anything that you like to, you know, that's of interest to you, you can just click the button here, click it inside the area of any of these signals that it's found, and then, you know, review it. So, that can be quite a powerful tool if you're sort of hunting around searching for a signal. That's a trunking control channel there, or maybe that's Tetra. So, this is kind of nice because you can record, you know, very, very wide bandwidth captures, and then run it through this multi-channel processor. It takes a little bit of while to, you know, process all the channels per your channel frequency list, but once it does that, then it'll spit everything out, and then you can use that tool to analyze it. And then, let's see here. So, you can also do it for P25. And similarly, I won't show you the actual interactive view, but with that, you can also have it output, let me find a good example here, also have it output just static images if you want to render it to an image file, like a PNG. So, this is the same example, instead of, you know, being in that interactive mode, spits it out to a picture, you can zoom right in, and again, we can see those individual transmissions with the data, individual data frames color-coded there. So, in a way, this is also a good diagnostic tool to determine how well your decoder is actually working. So, this is found in voice traffic here, and then on the side, these series of pink blocks are actually trunking control blocks on the trunking control channel that's used to coordinate traffic on this particular network. So, you can see all the individual P25 packets, and then if this was an interactive mode, if you ran it through the multi-channel decoder with P25, then you would get out all the P25 traffic. So, just as an example of what that looks like here, I've talked about this in the past, but I have this notion of the multi-channel decoder block in GNU Radio. And the way that works, and I should say that it's not optimal, because you can use polyphase filtering and all sorts of advanced DSP techniques to split off multiple channels in an efficient manner and pass them through some decoder. But in this case, fundamentally, you just give it a list of frequencies, and you have a template flow graph, and it instantiates a bunch of those flow graphs, and links the original capture file into each of them at the frequency. So, they all just operate in parallel. So, the way it works is that you make these templates, and in this flow graph, this is the OP25 channel template, and you have an input here, which gets linked up to the original file at a particular channel offset, and then it goes through a bunch of blocks, squelch and what have you, but the important one is down here in the bottom right, where it... I can't quite read what's going on there. I think this is... I'm not showing my screen, so I can't see. The baseband signal gets pumped through the OP25 decoder, just down the bottom here, and then it produces the symbol stream for the channel, and that goes into... into the audio decoder. The first port here outputs the decoded audio, which will then get put into a WAV file, and in addition, it also outputs messages. Oops, I didn't want to delete that. It also outputs messages that get output from this instance, and then aggregated in the controller class, in the parent class, and that all gets output to a file. So every single time the decoder sees a new frame in a transmission, it'll output what that frame is and the time to produce an event list, and that's the event list that gets pulled in and rendered out in this tool that I was telling you. So this one is the conventional FM version, so if we were to not look at the OP25 one, but look at just the narrowband FM one, then similarly this outputs the FM demodulated audio down the bottom here, but also you get this message from the power squelch coming out that the timestamp of when the squelch opened and closed gets logged into a central file for all of the channels, and then the script is able to know that actually there was a transmission here, and then it indicates that with the... with the box, so you can click on that again, and then, you know, listen to whatever transmission is going on there. So it's a good way to review this sort of stuff offline. And by the way, if anybody's got any questions, then please ask. So let's talk a little bit about time synchronization. This is important where you're trying to capture things either at the same location, but using different devices, or capture things at different locations at the same time, or capture things in a very, very precise manner where the signal that you're capturing is also synchronized and you want to be perfectly locked to it. So usually, you know, when you do your average old capture, you just say, all right, give me samples now, and I'm going to store them to a file. But sometimes you need to make sure that, for example, the time that you end up setting in your device is accurate and in the same time domain as, say, GPS or some golden reference time. So you could have, as an example, on this board, there's a GPS DO. So you plug in a GPS antenna. This GPS DO would synchronize to the GPS constellation and then give you a very accurate time base for this radio. You can have other radios where you have a house sync where 10 megahertz and one PPS is distributed through some location, and you just plug it in there, and then you get your time information. So this time information is usually split up into two elements. One is pulse per second, and the other one is a 10 megahertz reference frequency. The PPS, is important because it demarcates exactly when a new second starts. So commonly with the GPS receiver, you might see a little light blinking. Who's seen a light blinking on a GPS DO or GPS receiver before? That light blinking indicates the precise time when a new second has started. And then the other element is this 10 megahertz sine wave. 10 megahertz is just a commonly used de facto frequency. And it basically gives you the clock reference for how quickly time should be advancing. So commonly the way it works is with a SDR, you give it both signals and you say on the next PPS edge, the time is going to be, you know, however many seconds past the epoch. And then when the software defined radio sees that pulse, it latches that time and makes it active. So it just sits there waiting for the pulse. And then as soon as it comes, it knows this is the precise time at that instant. But then that only usually happens at the beginning before you start capturing. So what happens after it sets the time and then gets going? Well, these SDRs have their own internal oscillator, right? They have their own internal clock and they're all slightly different. If you're talking about very, very large bandwidth captures or high bandwidth signals, you will very quickly start to see a difference in the timing of the signal that you captured and what the actual transmitter is using. And commonly that's why you need to use clock recovery mechanisms in a decoder because your oscillator in here will not be synchronized to the oscillator at the transmitter. And so a clock recovery will take into account these slight frequency differences that are produced by manufacturing differences in the clock. So this is a crystal. So when you buy crystals, they actually come with a tolerance to tell you, oh, it's this frequency plus or minus whatever ppm, parts per million. And you can then calculate out at a particular frequency how far off that frequency you might be within the tolerance of the crystal. However, if you use an external reference like 10 MHz and plug that in and share that amongst devices, you can use that 10 MHz to discipline the oscillator on the SDR. So the way that works on this, for example, is you feed the 10 MHz in to a special chip, a PLL chip, and that 10 MHz will then be used to discipline and synchronize whatever oscillator or hardware clock is running on here. So it's basically saying, this is the reference, this is how fast 10 MHz is really going, you need to sort of tune and discipline your internal oscillator on there and sync with it. And once you feed it this 10 MHz, you can then capture at any rate, tune to any frequency, and that will be precise with respect to this reference. So then going back, when you get the PPS, you set the time at that point and latch it, and then once you've got the 10 MHz, then from that point on, your radio will be capturing at exactly the rate that you want. So let's keep it easy and say we want to capture the rate of 10 Mbps. Every second, we expect to get 10 million IQ points per second. Once we have the 10 MHz disciplining that, we'll get exactly that. And then we don't need to worry about anything else and we'll be perfectly synchronized. So let's say we have a couple of these at different locations with GPS DOs, they can all be synced up with a GPS antenna, they all listen to the satellite constellation, and if we need them to start recording at precisely the same time, we tell it to use the GPS DO, which produces a PPS and 10 MHz, and then they can all be locked on and running at the same rate. And this is also important because a lot of systems out there that actually transmit use GPS as a means to provide an accurate reference. So who can name some of them? Give me some examples. FM broadcast, LTE, digital TV, they all use GPS as a reference. If you look at a cell tower, you can usually see a little sort of a white upward, it's called a bullet-shaped GPS antenna, and that basically sits there and provides a very, hopefully, stable and accurate reference. And I won't go down the rabbit hole, but it's really interesting if you consider how potentially vulnerable systems are if you're able to somehow spoof or disable GPS. Because once you do that, in those cases you don't care about position, it's purely used for time. And they're all, you know, advanced systems are able to detect that and warn against that, but still it's kind of a problem when you have that as a reference. Yes? I'm sorry if I, like, just not understand. No, no, please ask questions. Don't be afraid. You're getting the time signal from the GPS receiver. Yeah. What is providing the 10 MHz reference for it? So that's a very good question. What's providing the 10 MHz reference? So with this GPS DO, actually, there is a 10 MHz oscillator on the GPS, which is much higher quality than the one, you know, whatever reference is originally on the board. The GPS is providing both 10 MHz and PPS. So, you know, if you're not using GPS, but you're using a house sync, you know, just as an example, when we were at Arecibo, we needed to have very accurate time information on when we recorded everything. So there they had a, I think it was a hydrogen laser clock that was very accurate and local on site, and it provided PPS and 10 MHz, but they had that routed through the entire facility. So you could just go anywhere, plug your 10 MHz and PPS into the wall, and you would get super accurate time. And that's what we did with the GPS is there. And what it meant was when you set the time, and I'll show you that in kitchen sync in a minute, when the samples come back from the SDR, each sample, then you can calculate the precise time at which the, you know, sample entered the antenna port. If you, I mean, there's a bit of latency there through the hardware, but ignoring that, you know, very accurately when your samples were recorded. Question. Yeah, so the question is, how does the coax affect sample delay and what have you? It does affect it. So if you're using multiple channels in a system, you need to make sure that your coax is all the same length. You know, it, these signals travel at a finite, you know, propagation rate through, through that kind of medium. So if you need that kind of accuracy, you need to measure off. But also you need to consider, you know, the bandwidth of your signal and that sort of thing. Maybe it doesn't matter too much. It depends upon, you know, how precise you need to be in the overall characteristics of the system. Any other questions? I'm glad that there are there have been some keep them coming. If something's not clear, then, you know, let's keep it interactive and I can I can try and clean it up for you. So just to demonstrate this a while back, I wrote this script called PPS diff. And what it does is it it sets the the PPS and sets the reference information on the SDR and then it checks whether the samples that you're getting are actually at a rate that you expect. So let me demonstrate that to you. So if you look, I'm going to. Can everybody read that? Is that is that all right? So what I'm doing is I'm starting up this PPS diff and I'm telling it to use the GPS DO. So this only works if you have a reference that it can lock to and a PPS that it can detect. If it can't detect the PPS, it'll say, you know, there's something wrong with your PPS. So it's a good way to diagnose if everything's connected properly. And the way it does that is that basically UHD has an API where you can say get the time. The last time you saw a PPS edge and it just keeps asking for it. And if more than a second has elapsed or, you know, configure it more than two seconds or whatever. I can't remember has elapsed on the host. If it hasn't seen two different times at the last PPS, then obviously it's not getting PPS. So you can use that to diagnose what's going on. So it looks for that. It checks it asks the SDR the use of whether the PLL that I was telling you about on there has actually locked to the 10 megahertz that you providing it. Because sometimes if you give it a two week a signal, it won't lock and then you might think it might be capturing and locked to your external reference, but it won't be. So it's always important to check that it's locked. And once. It's got a PPS and it's locked, then it starts printing this this out every second. And what I want you to look at here is on the very right hand side. It says ticks diff. So ticks is another way of thinking about samples. I think here the default sample rate is is 16 megahertz. And so what you expect is if you have a precisely tuned 10 Meg reference coming in and the use of synchronized to it every second. We expect exactly 16 million samples to have come out of the user every second. So this is happening at, you know, printing printing out every second and it's detecting when the PPS edge comes and then I think it uses that to calculate stuff and then print this out. But it's basically saying from the time at the last PPS to the next one count the number of samples and then you can check that it's correct. So watch what happens now. When I trick it by saying I want to use the red the 10 megahertz reference is now going to be the internal clock. So don't use the 10 Meg coming out of the GPS but use the PPS coming out of the GPS just to trick it and then we don't care about the lock. So if I run that then the PPS is still coming out of the GPS right at its at its own, you know, more correct rate because it's high quality even though we're not synchronized to GPS here the PPS and 10 Mega still running and you can see now that the tics. If is not quite 16 million, it's a little bit less because the oscillator on the on the SDR is not being disciplined by the same sources. What's in the GPS that's providing the PPS so you can see how there you can get slightly different capture rate and if you need very very precise, you know timing in your captures. That's obviously a problem and then you need to work out why that's happening. So in practice, if everything's wide up and working correctly, we would see 16 million all the time. And then this also can be used to dump out some additional timing stats and what have you. So that's PPS diff handy little tool there. Now, what about the timing file the timing files important because say if you want to record something and you need to know when the samples are coming in relative to real time, kitchen sink and output this timing file and you can go back and say, oh, you know, it was exactly, you know, 333 p.m. and 6 seconds and microseconds and nanoseconds all the way down. So you can very very precisely identify the point at which you're you're looking at in a capture file. The obvious way to do that ignoring all this is you just, you know, note the the time on the wall clock on the computer when you start recording but there's going to be some latency between what the wall clock on the computer is and what you know when the samples actually arrive there because you've got the bus latency, you know network USB what have you and other factors. So if if you're willing to live with that, that's fine. But if you need very very accurate timing then you know, you need to have these these references there as I said, you can use this to synchronize captures across frequencies across devices across locations. Now, once you have actually recorded your IQ and you have it and a timing file, then in job as I added this block, which is the the bass file source and it lets you open up an IQ file as you did before, but it also lets you tell it about timing information as kitchen sink wrote it to that timing file. And that's important because you can either have, well, it will output time tags. If you're familiar with GNU radio, you can send metadata along with your samples. So when the time takes a jump or start streaming, you know, if there's an overflow it jumps it'll produce time tags and send them along with your sample stream. There is already a block that does this. I think it's the was the meta meta file sync and meta file source and that works really nicely, but they have a bit of a an odd file format that it saves everything in and this is just nice and simple, you know, line delimited common delimited text file. And the other nice thing is that it can automatically load a whole sequence of files. So for example, who's used HD SDR here or yeah, couple of you. So HD SDR is a Windows based application makes it very simple to use your SDR and receive signals and look at a waterfall and and demod, you know, am-fm single sideband when you hit record there. It actually splits files. Every, you know, four gigs. If you recall with fat 32, you can't store more than four gigs in a file. So it'll automatically split them and if you end up using that to record data for a very, very long time, you'll end up with a lot of files and if you want to process them all as one big batch in good new radio, then it's going to be pain to have to run your flow graph, load up the next file, run it again and so on. So with this, this will automatically dead, connect a sequence and then load them all at the same time. So you just basically treat all of your split files as one big one and if you need to seek around in there, you know, this has a Python API as you can call and it'll load the right file and seek to the right point in that in that file. I'll show you that in a minute and it could automatically get the sample rate out of the file depending upon if it's in the timing file or if it's a way file in the header and so on. So it's it's nice if you've got stuff downstream of that and I'll show you that as well. Now regarding the overflows remember I was telling you that an overflow is a discontinuity. So you have lots of continuous samples your computer can't write to disk fast enough. It'll drop some samples and then we'll start going again. So with the timing file, you know the time at which it started streaming again continuously, but with this block you can change the pad mode. So you can turn padding to on and it'll actually produce filler samples. Zero samples to pad out all those missing blocks. If you got something downstream that's assuming that your sample stream is continuous without any discontinuity. This can fill those holes. So I showed you some of the things that BazFFT can do. It'll produce a nice waterfall. It'll annotate it with events that are produced by decoder. It'll draw lines through the frequencies that you're interested in. But now I want to show you the interactive playback mode. And that'll round out the talk I think. The interactive playback mode is a system where you can load up a bunch of capture files. It'll load them all automatically. And then you can interactively review. Do I have it loaded already? No I do. You can interactively review everything in the file. So I'm just going to start it again. One thing, there are some more features to this that I won't discuss now. But BazFFT has another feature. I showed you where instead of just going to a matplotlib window you can have it dumped to a PDF or to a PNG. It also has one where it'll compute all the FFT data. Because when you run it by default it needs to go through, read all the IQ, compute the FFTs, average them, etc. If you don't want to do that every time because you're dealing with tens or hundreds of gigabytes worth of data. You can have it compute it and then store the result to a separate file which is like a cache version of all of the FFT data. And that's usually much smaller and much, much faster to load if you need to reload it later. So I have this HTSDR file just to illustrate what I'm talking about. I'm going to copy that so I don't lose it. And then you'll see here, I have to wait for my drive to spin up maybe. Hello. There we go. So there are a lot of capture files here, right? So these were recorded with HTSDR. They've been split at whatever the split, I think it might have been two gigs actually. And there are a lot of files. So you don't want to have to open all of these up individually. It will automatically load them. You don't want to have to recompute the FFT every time you want to view something. So it will do all that and then store it as this intermediate file. So if we load that up, it will open that up. And then you see here, I've also added this XML address. This is going to use XML RPC to talk to a GNU Radio flow graph. And then we can interactively... That's just being read from my hard drive. If you do this, make sure you use SSD because using mechanical drives is much, much slower. So as you can see here, that's actually a list of all of the original files that we used to build this composite. There are a whole list of them that were automatically detected in sequence when I ran it before. Now it's rendering the plot out. Here we go. So... If you can see there, you've got these horizontal lines that run across the screen at regular intervals. That demarcates which capture file was used at that particular point. And if you look over on the left-hand side, you can actually see each of the capture files that were loaded to produce some data. And then when you ran out of data in that file, it moved on to the next one. And then, again, we have a lot of signals in here. So you can... You can zoom into them and look around. In this case, I didn't run it through the multi-channel decoder that I was describing before, so it hasn't gone through... I haven't given it the frequencies to look at and decode and separate, but now we can do that interactively. And I'm going to run... Oh, not that one. I'm going to run this. So this is the playback. And what I do is I just give it the first file. And that's the file that gets given to that grbaz file source block. And then the file source block will automatically load everything else. So when I run it, if you watch, you'll see it load the first one and then load each of the other ones in succession. And this is just done automatically because the metadata in the hdstr file has a warclock timestamp for when it ends. And so it looks if there's a file in existence that would match the timestamp, you know, that it should continue at. So let's see what happens. See, it loaded them all up there. And now you'll have to pardon the breaking in the audio because it's a very, very high bandwidth file and it's reading off my mechanical drive. It's slow. But it's also going to the disk cache. So when I load it up... And replay in a minute from memory, it should be faster. So this is the channel that we're looking at. But if you look, somewhere there is the frequency offset. So there's some frequency offset that I've set in the file. Let me just change the squelch here so that we don't have this annoying sound. So this is all well and good. We want to explore the file interactively. So we can bring this up. And now these two applications are actually talking to one another. So if you scroll here, see the white line? That white line is the time cursor in the file that's actually being played back from the GNU radio application. So the GNU radio application has loaded up all this stuff. And this is showing us, you know, the play cursor for the file. So let's say we want to actually listen to some of these transmissions here. I can't remember what's in this file. Let's see if there's anything interesting. Here we go. This looks like some audio here. So I can have this here. And then let's say I want to listen to this point in the file. You can just click. It'll load that file, seek to that position, and then select that frequency in the channelizer and then play it back, and then... So again, it's because it's reading off mechanical, but if we start it again... Yeah, there we go. So... And then, you know, maybe that's not interesting, so you click over here, and then it'll seek to that point, you know, pick the right file, seek to that point, and then playing and demodulating that file. So in that respect, it's, I think, a pretty powerful tool to, you know, review individual signals if you're looking for a needle in a haystack in a large capture file. And, you know, if nothing's interesting there, then you would just zoom out in time or frequency, zoom out in time or frequency, and then have a look at somewhere else in the file, and then, you know, if you're interested, you just click there. Who can tell me what that signal is? . Yeah, some sort of paging system. So that's a good way to do it, and then once you find your candidate signal, then you can isolate that channel, pull it out, and continue your processing on it. But this is kind of a neat kind of visualization search tool. So the last thing that I'll show you, then, is just a little bit of kitchen sink. . So as I was saying, it has quite a few command line options. Whoops. As you can see there, quite a few options. Did I already... Surely there aren't that many. No, that's actually all of them, yeah. It looks like it's more, because I'm not used to seeing in such a large font. So if you just run it with no arguments, then it'll just start testing the streaming on TX and RX. And then, you know, you can do things like Rx channel zero, progress interval one. And then this will just do Rx only. And then every second it'll print out the rate that it's going at. And it's on purpose quite verbose, so it's telling you what it's doing, what it's setting at every step, so that if you need to, you know, say, check your logs or copy and paste your console outputs, you need to have a record or what have you, then it's there. You know, other enhancements might be adding this to some other metadata that's output alongside all the timing information. But again, you know, with all those other command line options, you can sort of tell it exactly what to do and when and store metadata so that you have all the information that you need later on to perform analysis with a really good notion of the time that was used at that point. So I think I'll wrap up there. Questions? So the question is, what kind of maximum sample rate can you expect with USB 3.0 when using hard drives and SSD? It really depends on a lot of factors. That's sort of the default answer. I think with modern SSDs, you can, as long as your system is performant, you can, I mean, I think I can do 50 mega samples per second. Usually I go to RAM. The problem is if you want the best performance, you need an Intel chipset, Intel USB controller, and you need to run on the Linux. And you can play around with the kernel and if you want to e-cat a little bit more performance. I love OSX, you know, all this is running on OSX, obviously, but OSX, as I think we all know, is designed to give you really slick UI performance and good response time there, which means it comes at the sacrifice of scheduling in like a capture program. So when I, when I, if you want to do it on OSX, you need to reboot your system, make sure nothing comes up, and then capture like that. And I've actually done, I have spent so much time trying to figure out how to optimize performance on here. Turns out when you run instruments and you look at the call stack and what's the heaviest, it's the Darwin system call that's submitting the USB request. So everything else is pretty lightweight. So there's a neat program called RAM Disk Creator, and you can use that to make a RAM disk. It'll just pop up as a volume. What I found, funnily enough, is if you use Disk Utility and then reformat it as exFAT instead of just HFS plus, which is the default, you get a little bit of extra. And then if I have my web browsers running, I need to use kill and then run a regex to like stop every single thing to do with any web browser that I've got because they're just so heavy and cause the scheduler to context switch. So, you know, all these little things. Yeah. The question is, what's the feasibility of doing custom processing and decoding on the FPGAs? That's a whole topic unto itself. There are lots of possibilities. If you want to talk to Neil or Nate, they gave a talk yesterday about using RF knock on the FPGAs. A lot of people have done some amazing custom stuff and there's all sorts of frameworks to do it in. So there are a lot of options out there. . This is a USRP B200. But, you know, as I mentioned, if you use SOAPI SDR, then all this stuff can apply to whatever radio you might have. Any other questions? No? All right. Yeah, one more. Is there any online resources you would recommend for digging into this further? For like timing stuff and all that kind of jazz? Communities in general. Oh, one of the good places is gnu-radio.org. They've got lots of stuff there. The RTL-SDR blog has a long-running series of all sorts of really cool projects on all sorts of platforms. And, yeah, I mean, they're the two other main ones. Has anybody else come across any other good resources lately? Yeah? Please. Yeah, so... I think they're two good ones. Other people might have some other suggestions that they've used recently. But anyway, thank you for coming and thanks for your attention. If you've got any other questions, please find me afterward. Thanks a lot.