Software Defined Radio
jim lesurf (2082) 1336 posts |
I’ve been using a ‘Funcube pro plus’ for some time with Linux boxes. This is a USB ‘software defined radio’ USB dongle that I use for things like spectrum analysis. I wrote some simple programs to use this. I’m wondering about the possibility of using it with RO. No idea if that would get anywhere. But I thought it worth mentioning here to see if anyone else is: a) also interested in using it with RO. b) might be able to help. So, anyone interested in spectrum measurements, amateur radio, etc? The Funcube Pro plus works from about 150 kHz up to about 2 GHz and outputs 16 bit samples as if an ‘Audio device’. So I know how to read the output already as it would work with the USB Audio modules. The gap at present is controlling its settings via HID. These mainly are for telling it the current ‘LO frequency’ you want and any gain it applies to its IF output before conveying it to the host computer as ‘audio’. Of interested to anyone? Jim |
Steve Pampling (1551) 7931 posts |
“About 2GHz” so just below the low end WiFi stuff then? |
jim lesurf (2082) 1336 posts |
FWIW you can see the calibrations I did on my funcube at http://jcgl.orpheusweb.co.uk/funcube/FUNcalibrate.html Radio amateurs will also have published simple circuits for DIY pre-downconvertors that allow such devices to be extended to higher frequencies. TBH though I suspect if all someone wanted was to sniff WiFi they could easily buy dongles specifically aimed at that. IIRC CPC/Farnell and others sell them cheaper than the funcube. So it depends on the extent to which you might want to examine any interference. The funcube give the ‘raw’ sampled data so you can analyse it however you wish. I don’t have any of the WiFi scanners son don’t know if they do this or if you’re tied to their own software. Jim |
Steve Pampling (1551) 7931 posts |
It was more a case of poking back at the bods at work with an official use for a Pi. To give you an idea the latest request from my boss for us all to test a remote working facility1 included a suggestion that I also test access to the VMware View Horizon facility from a Pi2 as well as Linux3 Home survey kit would be nice for many people to show the interference from microwaves and DECT phones etc. Also another " can do" for RO 1 Bit of a p-take asking me as I was the one sorting out the DMZ firewall rules to get the setup working |
Raik (463) 2026 posts |
I have try RTL-sdr on my Pandora in Angström. RTL-sdr using a DVB-T Stick with a RTL2832U chipset to do this. |
jim lesurf (2082) 1336 posts |
FWIW I also have one of the RTL’s. But having started with the FUNCube Pro Plus haven’t yet bothered with the RTL. The RTL type is cheaper, and does sample at MHz rates, so gives a wider IF bandwidth. But they use 8-bit samples, hence lower dynamic range, and lack the good set of RF filters which the FUNCube includes. As a result, for measurement or monitoring purposes the FUNCube is better. (In fact, the FUNCube uses 24bit sampling, but outputs 16bits after applying a gain scaling specified by the user as a ‘gain’ to allow you to maximise the accessible range.) http://jcgl.orpheusweb.co.uk/temp/FilterBeforeAmp.png shows an example of the kind of results I get. At present I’m trying to rig up the FUNCube as part of a system that also uses a noise source to measure the impedances, etc, of HDMI cables. But in both cases the method is, I think, to use HID for control and USB ‘audio’ for the output. So getting one type working should make getting the other working easier. |
Dave Higton (1515) 3404 posts |
I’m not sure what use an SDR is to us on RISC OS unless we can get the DSP seriously working on a platform that has it. |
jim lesurf (2082) 1336 posts |
Occurs to me I must be wrong above. The output sample rate of the RTL will be above 1MHz which is rather too high for the audio transfer specs.
I doubt it would be useful for tasks like using the system as a band II FM radio to listen to radio 3. :-) However that’s not the kind of thing which radio amateurs or those like myself interested in measurement will want to do. (And a decent dedicated tuner would be cheaper/better anyway for simply enjoying Radio 3!) The wideband spectrum scans I do simply do measure the (rms) level for a short period and step across the range chosen. Swept spectrum analyser. The only DSP is to do the rms of the values. That, and some of the other measurements I use the devices for aren’t particularly slow on something like my ARMiniX. For narrow-band spectra see the comments below. At present I find using the FUNCube is awkward as I collect the data on a Linux machine, then transfer that to a RO box for plotting and examination. Given the RO box being able to use the FUNcube I could make it into a swept analyser for power-frequency spectra, and also probably for swept 1-port impedance measurements. Showing the results graphically on-screen as it goes, then saving drawfiles/bitmaps/csv as needed. If you’ve seen my old !IyoScope and the newer !USBScope you can see what I mean in terms of output, controls, etc. A version of !USBScope used with the FUNCube would show the FFT-derived spectrum of the band the device is tuned to in the same way as !USBScope shows the audio spectrum. This seems fast enough to use as a simple lab measurement display/monitor to me. But yes, it would be nice if we could use the floating point hardware. However it’s usable without that. Has anyone tried !USBScope with a USB ADC so they can see what I mean? Jim |
ronald-scheckelhoff (2262) 60 posts |
However that’s not the kind of thing which radio amateurs or those like myself interested in measurement will want to do. I was wondering about the viability of RiscOS for ham radio apps. I use an SDR, where the hardware part of the SDR is a “Soft66” with front-end filtering at HF (twenty metres, mainly, but have it switchable for the 80,40,20,15, and 10 metre bands). For those who are not hams, twenty metres (wavelength) is a frequency of about 14 MHz. The little “Soft66” is a $20 kit and is a 2in x 2in board with five ICs used to receive HF and convert the received band to SDR I/Q signals. It also contains some discrete components for BPF filtering. It is more attuned to HF than the RTL, which has to be down-converted to HF because its low end is VHF. Anyway, I feed the output of the “Soft66” into my sound card. The software part of the SDR I use is Linrad. The Linrad software takes the I/Q from the “Soft66” – and presents a nice waterfall of a chunk of the 14 MHz band that is equal in width to the sample rate of my sound card. So, I can have the entire CW portion of the band on my screen’s waterfall display, and click on signals to listen to them. (CW, usually, but sometimes SSB (voice). It would be fun to get something like Linrad running on the RiscOS. Linrad may have too many Linuxish underpinnings for a RiscOS conversion, but there is another SDR program that is written almost entirely in Python, and I’ve used it successfully on FreeBSD. That program is called Quisk. The minimum sample rate I’ve successfully used (relative to the audio hardware) – is 48KHz. I’ve been thinking about the FunCube, because it would give me pretty much all of the HF spectrum without switching crystals (what I have to do on the soft66). So, that’s an interesting piece of hardware. The Funcube creator has a nice write-up on what he did (adding chips, etc) to exceed what the bare RTL can do at HF. |
jim lesurf (2082) 1336 posts |
The nice thing (from the RO POV) about the FunCube Pro Plus is that the output uses the open standard ‘USB Audio Class 1’ transfer methods to provide the data as if it were a stereo audio stream. This is already known to work fine on suitable RO hardware if you load the USB Audio modules, etc, that Colin and Dave developed. The missing key is being able to control the FunCube via its HID interface. If someone cracked that I could do versions of my measurement software for RO. At present these only have Linux versions. Jim |
ronald-scheckelhoff (2262) 60 posts |
This is already known to work fine on suitable RO hardware if you load the USB Audio modules, etc,... @Jim: I suppose that by “suitable hardware” you mean that which is available with the normal RISC boxes, i.e., not the Pi. What could you suggest for my use of a Pi2, in terms of making the Soft66/Pi2 combo work, assuming the port of some kind of SDR software? |
jim lesurf (2082) 1336 posts |
@Ronald Afraid I can’t advise wrt the Pi. :-/ I don’t have one, and I understand that the current versions of the USB Audio modules don’t work on it. But then, they don’t currently work correctly on my ARMX6, either! :-/ AIUI the problem is that the details of the USB controller/hub hardware varies from one RO machine to another, and the USB Audio is currently an ‘add on’ you softload. So it works on some machines – e.g. Iyonix and ARMiniX, but not others. Some controllers seem to omit some forms of transfer support. On my ARMX6 it currently works for 48k rate, but gives ‘pops’ – i.e. discontinuities in the data transfers – at 96k. Colin has to deal with this hardware by hardware because the relevant info isn’t documented. Its a PITA. I also don’t know if your SDR ‘dongle’ actually uses Audio for passing its data to the host machine. The FunCubeProPlus does. Jim |
ronald-scheckelhoff (2262) 60 posts |
... also don’t know if your SDR ‘dongle’ actually uses Audio for passing its data ... I guess it depends how you define “audio” – but it’s in that domain. My meanderings on the net tell me most people are using Rasbian and a USB Sound adapter for SDR on the Pi boards. One person, unhappy with restrictions of USB, opted for Wolfson audio (on the Pi) and Cirrus (on Pi2). They’re the same company now, or so I think I’ve read somewhere. Anyway, I pulled some pdf specsheets down, and it seems Wolfson is I2S. That’s better anyway!
Much less latency issues, higher sample rate. Or so I read. I guess the sample rate is not the USB issue so much as the Wolfson DAC itself. Some of these new ideas in my head were instigated by : Now to ask the experts of RISOS about state of I2S? |
ronald-scheckelhoff (2262) 60 posts |
Topic: General / Where to start? There’s also an audio in/out I2S header (P18) but no driver for that exists yet either. I may have answered my question with a ROOL forum search. Unless things have changed? |
Chris Evans (457) 1614 posts |
It’s not I2S but there is work being done for SPI on RISC OS see here |
ronald-scheckelhoff (2262) 60 posts |
It’s not I2S but there is work being done for SPI on RISC OS see here ... Are there any decent SPI DACs and /or ADCs? This TI doc describes a simple hardware converter between I2S and SPI, but I think there are (apparently, from reading your link) throughput issues with SPI. It’d probably be a cow/horse marriage, but I’m not the expert for explaining this matchup. There are audio gurus of all sorts on this forum, and I’m sure one of them could illucidate this for us … |
Rob Heaton (274) 515 posts |
I’ve recently picked up an SDR dongle, it would be cool to use it with RISC OS! The model I’ve got is the NooElec NESDR Mini |
Colin Ferris (399) 1748 posts |
How is the Funcube controlled – ie is there anyway of finding out what is being sent to the Dongle? |
Colin Ferris (399) 1748 posts |
Does Chris of CJE supply the FUNcube Dongle? Answering some of my questions – it seems a good idea to to have a 5 to 10ft USB lead – to keep the Dongle away from the computer. Have come across some SDR (Software-Defined-Radio) programs – some I don’t understand what I’m looking at :-| Some seem a sort of open-source. Came across a simple one – FCHid.exe – it seems to just set the frequency – no AM/FM/USB/LSB/CW control. How upto date are the USB audio drivers for the new machines? |