demantz / RFAnalyzer

Spectrum Analyzer for Android using the HackRF
GNU General Public License v2.0
869 stars 206 forks source link

Additional demodulation modes #2

Open dc1rdb opened 10 years ago

dc1rdb commented 10 years ago

Dennis, are there any plans to implement additional demodulation modes like SSB or synchronous AM?

73 - Robert

demantz commented 10 years ago

SSB is planned and will be implemented right after rtl-sdr support and recording. I didn't planned to implement synchronous AM.. Maybe at some time in the future.. can't promise you. It is really easy though to add a new demodulation mode to the code if you are interested! Or alternatively if you provide me with a working gnu radio implementation that is as simple as possible I can try to port it over to Java.

Dennis

dc1rdb commented 10 years ago

Regarding SAM and SSB, maybe github.com/gnuradio/gnuradio/tree/master/gr-uhd/apps/hf_explorer might be of help. For additional modes, see github.com/EliasOenal/multimon-ng I cannot judge if these are easily portable to Java, though... What do you think?

aneitzel commented 10 years ago

here you find a simple GNU radio implementation of SSB demodulation including a description: http://www.oz9aec.net/index.php/gnu-radio-blog/324-simple-ssb-receiver-in-gnu-radio-companion

regards André !

demantz commented 10 years ago

Thank you both for the hints! I actually found the implementation of Alexandru Csete earlier and used it as base for my implementation. I just uploaded the beta in a working branch. If any of you is interested in testing: https://github.com/demantz/RFAnalyzer/blob/working_branch/RFAnalyzer.apk?raw=true

But I think it is almost ready for release, so you don't really have to wait long if you rather stay with the stable release..

aneitzel commented 10 years ago

Hi Dennis,

really, really good job, SSB is working! I played around and found following problems in 1.10beta:

  1. AM demodulation is not working anymore (no sound, anyway other modes FM, LSB, USB are ok)
  2. In "start recording" menu the "stop after" is not seen in land scape mode. It is cute and i guess it depends on the different display resolution of phone. (i use a Samsung Note3 NEO). I noted it is added already as issue by another tester.

I,m a little bit sad about the 1Mhz fixxed bandwidth limitation while demodulation is active. Im not fully understand why demodulation of a selected part in spectrum (it is defined by the filter bandwidth you choose, for example 150khz FMwide) needs less cpu then same selected signal bandwidth within a 10Mhz spectrum. Maybe im wrong, my suggestion is only correct if the demodulator routines are only filled with choosen filter bandwidth.

But again, i love your APP! ;-)

thanks for sharing, regards André

regards from André (germany)

aneitzel commented 10 years ago

Additional note:

It is not able to start demodulation on a file recorded with RFanalyzer. I tested all bandwiths ( also with lowest value from menue = 1024 Samples/sek) and got error: source does not support saple rate for demodulation 1Mbs.

demantz commented 10 years ago

@aneitzel thx so much for testing! I fixed both bugs (AM & recording dialog) and released 1.10 now. Should be available on Google Play in about an hour.

Regarding bandwidth: Unfortunately it's not that simple. While the demodulation runs only on an 250khz wide band I still have to extract this band from the 1MHz wide input signal. This has to be done by down-mixing followed by down-sampling. Down-mixing is basically multiplying every inputsample with a complex cosine wave. Doing this for 1000000 samples per second (1MHz) is very CPU intensive. Down-sampling is even worse: We have to apply a filter to cut off all unwanted signals outside the interesting band. This filter does even more multiplications on each single sample. Finally after down-sampling is done we have a signal with only 250khz sample rate (or 62.5khz for nFM, AM and SSB) which can be demodulated.

As you see demodulation is not the problem as it indeed operates on a low sample rate. But down-mixing and down-sampling can't be done with signals that have sample rates higher than 1MHz.

Fortunately I discovered something I wasn't aware of before: RenderScript. This is basically a way for Android apps to do expensive calculations in parallel on the device GPU. So my next project will be a DSP library for Android using RenderScript. With this library it will hopefully be possible to select sample rates higher than 1MHz and also to improve battery usage.

Regarding your second post (about the recorded file): I believe you are changing the wrong setting. Playing recorded files should work if you do the following:

Again: thx so much for testing ;)

aneitzel commented 10 years ago

@demantz

thanks for explaining Dennis. Regarding file recording:

"Select a recorded file (that was recorded with 1000000Hz sample rate - file should say: >>1000000Sps)

Then i record with RFexplorer the bitrate must be choosen. The lowest fixed value i see is "1024" and not "1000". I dont have my mobile to hand now, but the file created on internal memory is automatically named xxxxxx1024xxxSps if i remember. If i now load this file as source no demodulation is working because of error: wrong sample-rate.

Until my HackRF is delivered (end of december), i use RTL-SDR as input source for testing. I will verify that and provide steps for recreating.

André

demantz commented 10 years ago

Hmm I have 1000000 (= 1MSps) as an option in the recording dialog:

ScreenShot

It would be a bug if it isn't there for you!

aneitzel commented 10 years ago

I verified it and you are right! Because of different display solution the "1000" value was not seen until i scrolled up. So fault was on ISO layer 8 ;-)

demantz commented 10 years ago

Glad it works now ;)

w9ran commented 9 years ago

Dennis, congratulations on a nice effort! It works with RTL stick and upconverter in AM and FM modes on my Eeepad TF-101 Transformer with nVidia Tegra 2 Dual-Core 1Ghz CPU but USB and LSB mode produce choppy audio, evidently that's the limit of this CPU. Or perhaps this could be an area for future optimization.

I've looked but have not found a way to set the sample rate from the RTL2832U driver - is this possible? Maybe reducing the sample rate to 1.024K would improve performance on less powerful CPUs.

aneitzel commented 9 years ago

Hello W0ran,

while Demodulation is activ the samplerate of RTL and HackRF is already downset to 1Mhz bandwith. Am 16.12.2014 18:19 schrieb "w9ran" notifications@github.com:

Dennis, congratulations on a nice effort! It works with RTL stick and upconverter in AM and FM modes on my Eeepad TF-101 Transformer with nVidia Tegra 2 Dual-Core 1Ghz CPU but USB and LSB mode produce choppy audio, evidently that's the limit of this CPU. Or perhaps this could be an area for future optimization.

I've looked but have not found a way to set the sample rate from the RTL2832U driver - is this possible? Maybe reducing the sample rate to 1.024K would improve performance on less powerful CPUs.

— Reply to this email directly or view it on GitHub https://github.com/demantz/RFAnalyzer/issues/2#issuecomment-67195851.

GeoNomad commented 9 years ago

Is anyone working on digital modes? PSK31, JT65?

How about CW decoding?

demantz commented 9 years ago

@GeoNomad currently I'm working on a Bookmark and a Scanning feature. I already thought about digital modes but didn't had time for it so far. Maybe in the future.. Or maybe someone else would like to try an implement it?

9a4gl commented 7 years ago

I would also like CW mode