AlexandreRouma / SDRPlusPlus

Cross-Platform SDR Software
GNU General Public License v3.0
3.93k stars 539 forks source link

HackRF (with and without PP) on Android #1090

Closed sizzlik closed 7 months ago

sizzlik commented 1 year ago

Hey, I got 2 hRF One (r9) boards, one with portapack H2+, one just in alu enclosure. Both are on the newest firmware and both work fine on my windows pc. But on Android the app just closes when i click play (on phone and tablet). Works with the RTL-SDR V3, nooelec smart xtr and smart v5. HackRF works with other apps like sdrAngel, SDRtouch etc. Same on DragonOS Focal, but that version might be outdated, got to check.

AlexandreRouma commented 1 year ago

Both my hackrfs work fine for me on android (latest firmware). can't replicate at all.

sizzlik commented 1 year ago

tried again..works on windows and dragonOS. But for some reason not on my Samsung Tab A 2019 nor my Xiaomi Note 8T. All other SDR that i got (RTL V3, Nooelec V5, Nooelec XTR and a noname china bugger work..only the hackRF closes the app once i click play. But it recognizes the hRF when i click refresh. Only crashes when i click play. Sure the problem must be on my side..any idea what it could be maybe? As other app like SDRAngel, touchSDR, MagicSDR work on android with the hRF.

AlexandreRouma commented 1 year ago

if you have some other app that takes control of the hackrf by force (by listing it in its app manifest) it could cause issues. Try it on a device with no other SDR app installed.

Dane-Law commented 1 year ago

Do you have RF Analyzer installed on your Android devices? this fellow https://i.imgur.com/RMGEJWS

sizzlik commented 1 year ago

Nope..only dump1090 and a ads-b app, wich i uninstalled to test but no change. I guess its a problem with my hRF board.

Dane-Law commented 1 year ago

I got the exact same problem, I have tried it on 3 different Android devices.

it's the same on all the devices above, - it will install fine, and the system will also ask if I want HackRF to connect, and it will process with "HackRF USB" below when refresh' so SDR++ clearly sees it, but the moment you then click the "play" button, it hard closes the SDR++ app.

So I reckon it's something with the HackRF, maybe "HackRF in Portapack with mayhem FW simply don't work with SDR++ Android even though you clearly are putting it into HackRF mode - I am on Mayhem FW 1.2-. weird as HackRF Portapack it all works fine in Windows with "SDR++ windows version" and also works fine with other HackRF Android apps like RF analyzer, which I had installed on the Samsung Tab S5e tablet.. also works great, it's merely SDR++ that chokes when you hit that play button...

This is my HackRF Portapack version below, which is the most common / recommended HackRF clone version from the HackRF Portapack community (model HackRF Portapack H2, and I got Mayhem 1.2 fw on it, and everything else works great, only SDR++ I can't get to work in Android as it hard closes the app while, in windows SDR++ no problems) https://i.imgur.com/9H7j7Yk.jpg https://i.imgur.com/CRwdrJ5.jpg https://i.imgur.com/jzNXNP6

Any approach to fix this?

Dane-Law commented 1 year ago

Both my hackrfs work fine for me on android (latest firmware). can't replicate at all.

what HackRF do you have? and is it standalone original units?

AlexandreRouma commented 1 year ago

both a clone and an official one.

sizzlik commented 1 year ago

i got 2 clones, both R9, different manufactur, same chipset (MAX2839/Si5351A/WM8731/RFFC5072), one in a portapack H2+, one just in an alu encolure. The "original" is not different nowadays due to the recent chip shortage, and they all come from the same factory in shenzeng. Afaik the R9 started to use the chips that others used previously.

derkommutator commented 1 year ago

I'm experiencing exactly the same behaviour with a recently-acquired HackRF (original I think, 2018.01.1 firmware) on both a Lenovo P11 Pro running factory Android 11, as well as a Fxtec Pro1-X running LineageOS 20.

I found a copy of the old "original" March 2022 prerelease of SDR++ for Android, and it does not exhibit this problem. Everything appears to be working properly in that build.

sizzlik commented 1 year ago

I'm experiencing exactly the same behaviour with a recently-acquired HackRF (original I think, 2018.01.1 firmware) on both a Lenovo P11 Pro running factory Android 11, as well as a Fxtec Pro1-X running LineageOS 20.

I found a copy of the old "original" March 2022 prerelease of SDR++ for Android, and it does not exhibit this problem. Everything appears to be working properly in that build.

Mind to upload the apk somewhere, so i can test aswell? Maybe there is a chance we find the problem when comparing the changes in the build.

derkommutator commented 1 year ago

Mind to upload the apk somewhere, so i can test aswell? Maybe there is a chance we find the problem when comparing the changes in the build.

There is a Google Drive link on this page: https://forums.qrz.com/index.php?threads/sdr-plus-plus-for-android-lovers.806694/

Naturally I make no claims as to the purity of the software behind that link. Probably fine, but this should not be considered a trustworthy source. ;)

sizzlik commented 1 year ago

Mind to upload the apk somewhere, so i can test aswell? Maybe there is a chance we find the problem when comparing the changes in the build.

There is a Google Drive link on this page: https://forums.qrz.com/index.php?threads/sdr-plus-plus-for-android-lovers.806694/

Naturally I make no claims as to the purity of the software behind that link. Probably fine, but this should not be considered a trustworthy source. ;)

VM >> BlueStacks >> wireshark >> see if E.T. wants to phone home

derkommutator commented 1 year ago

VM >> BlueStacks >> wireshark >> see if E.T. wants to phone home

Well, my device is rooted and firewalled, and doesn't have anything personal on it anyway. Really just issuing a standard "caveat emptor". :)

sizzlik commented 1 year ago

Hehe..i ment that as general advice for people that want to be extra secure if they browse this page ;) Nothing to gain from my devices either, but better save than sorry.

(Judging by your name, german?)

Dane-Law commented 1 year ago

Mind to upload the apk somewhere, so i can test aswell? Maybe there is a chance we find the problem when comparing the changes in the build.

There is a Google Drive link on this page: https://forums.qrz.com/index.php?threads/sdr-plus-plus-for-android-lovers.806694/

Naturally I make no claims as to the purity of the software behind that link. Probably fine, but this should not be considered a trustworthy source. ;)

That worked, thx buddy. Tried it with my HackRF Portapack (model pictured above) on a XiaoxinP11pro2021 11.5" tablet (aka LenovoP11pro2021) now the SDR++ android app, dont crash the moment, I push the play button after initialised the (HackRF USB) I sadly dont have the insight & skills to decipher what exactly the dev has changed' that makes the current Android version crash, while the old 2022 SDR++ Android prerelease0-dont.. Hopefully the dev, knows the reason and can fix it, as the majority of HackRF with portapacks is the H2+ At first glance' Im very impressed with SDR++ for Android (prerelease0 version) well done Alexandre.

sizzlik commented 1 year ago

didnt had time to test yet, but we got 3 people with the same issue and apparently the issue isnt the hardware but some change that happened some time ago. Maybe Alexandre still got the source from that or another past version to compare..or maybe even remembers what changes had been made in between. Last resort, disassemble, bit comparison, lots of coffee and a few prayers. But i think we getting closer to a bugfix.

Do you guys got any problems with the pc versions? On dragonOS i get the same..it worked in the past, doesnt work anymore. Dont have windows to test atm, but can set up one of my laptops with a fresh win if needed.

derkommutator commented 1 year ago

Maybe Alexandre still got the source from that or another past version to compare..or maybe even remembers what changes had been made in between. Last resort, disassemble, bit comparison, lots of coffee and a few prayers.

Hahah that's a little extreme. All the code commits are right here on github, so it's certainly possible to narrow down where it broke. However, a scattershot approach to the problem is likely not the fastest way to get to a solution. Probably best at this point for someone familiar with the code evolution to inject some thoughts.

sizzlik commented 1 year ago

Maybe I should end my comments with /S to indicate when im jokin. Youre right, Alex needs to have a look as he knows best. But its good, thanks to you, that we now have an anchor point to look at.

sizzlik commented 1 year ago

Dont know if its of any help, but here is a terminal output what happens on my side, runs fine until it closes with the final line "Segmentation Fault". There are a few errors while loading up aswell. Taken from a fresh updated DragonOS install. Could it have to do with the audio sink as someone in another issue post mentioned?

moe@radioshack:~$ sudo sdrpp [05/07/2023 06:48:27.000] [INFO] SDR++ v1.1.0 [05/07/2023 06:48:27.000] [INFO] Loading config [05/07/2023 06:48:28.000] [INFO] Using OpenGL 3.0 [05/07/2023 06:48:28.000] [INFO] Loading icons [05/07/2023 06:48:28.000] [INFO] Loading band plans [05/07/2023 06:48:28.000] [INFO] Loading band plans color table [05/07/2023 06:48:28.000] [ERROR] Menu element is missing name key [05/07/2023 06:48:28.000] [INFO] Loading modules [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/rfspace_source.so [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/rigctl_client.so [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/sdrplay_source.so [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/rigctl_server.so [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/radio.so [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/new_portaudio_sink.so [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/sdrpp_server_source.so [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/m17_decoder.so [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/recorder.so [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/spyserver_source.so [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/hermes_source.so [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/rtl_sdr_source.so [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/rtl_tcp_source.so [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/meteor_demodulator.so [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/soapy_source.so [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/plutosdr_source.so [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/hackrf_source.so [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/discord_integration.so [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/airspyhf_source.so [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/frequency_manager.so [05/07/2023 06:48:28.000] [WARN] ConfigManager locked, waiting... [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/limesdr_source.so [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/spectran_http_source.so [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/bladerf_source.so [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/network_sink.so [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/scanner.so [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/airspy_source.so [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/audio_source.so [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/inmarsatc_demodulator.so [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/audio_sink.so [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/file_source.so [05/07/2023 06:48:28.000] [INFO] Loading /usr/lib/sdrpp/plugins/perseus_source.so [05/07/2023 06:48:28.000] [ERROR] Couldn't load /usr/lib/sdrpp/plugins/perseus_source.so: libperseus-sdr.so.0: cannot open shared object file: No such file or directory [05/07/2023 06:48:28.000] [INFO] Initializing Airspy Source (airspy_source) [05/07/2023 06:48:28.000] [INFO] Initializing AirspyHF+ Source (airspyhf_source) [05/07/2023 06:48:28.000] [INFO] Initializing Audio Sink (audio_sink) [05/07/2023 06:48:28.000] [INFO] Initializing Audio Source (audio_source)

RtApiPulse::DeviceInfo pa_context_connect() failed: Connection refused

[05/07/2023 06:48:28.000] [INFO] New DSP samplerate: 48000.000000 (source samplerate is 48000.000000) [05/07/2023 06:48:28.000] [INFO] Initializing BladeRF Source (bladerf_source) [05/07/2023 06:48:28.000] [ERROR] Could not list devices -7 [05/07/2023 06:48:28.000] [INFO] Initializing File Source (file_source) [05/07/2023 06:48:28.000] [INFO] Initializing Frequency Manager (frequency_manager) [05/07/2023 06:48:28.000] [INFO] Initializing HackRF Source (hackrf_source) [05/07/2023 06:48:28.000] [INFO] Initializing Hermes Source (hermes_source) [05/07/2023 06:48:28.000] [INFO] Initializing LimeSDR Source (limesdr_source) [05/07/2023 06:48:28.000] [INFO] Initializing Network Sink (network_sink) [05/07/2023 06:48:28.000] [INFO] Initializing PerseusSDR Source (perseus_source) [05/07/2023 06:48:28.000] [ERROR] Module 'perseus_source' doesn't exist [05/07/2023 06:48:28.000] [INFO] Initializing PlutoSDR Source (plutosdr_source) [05/07/2023 06:48:28.000] [INFO] Initializing RFspace Source (rfspace_source) [05/07/2023 06:48:28.000] [INFO] Initializing RTL-SDR Source (rtl_sdr_source) [05/07/2023 06:48:28.000] [INFO] Initializing RTL-TCP Source (rtl_tcp_source) [05/07/2023 06:48:28.000] [INFO] Initializing Radio (radio) [Resamp] predec: 8192, interp: 25, decim: 6, inacc: 0.000000%, taps: 1900 [Resamp] predec: 4, interp: 96, decim: 125, inacc: 0.000000%, taps: 9500

RtApiPulse::DeviceInfo pa_context_connect() failed: Connection refused

[Resamp] predec: 32, interp: 5000, decim: 7813, inacc: 0.000000%, taps: 593750 [Resamp] predec: 8192, interp: 125, decim: 24, inacc: 0.000000%, taps: 9500 [Resamp] predec: 4, interp: 96, decim: 125, inacc: 0.000000%, taps: 9500 [Resamp] predec: 4, interp: 96, decim: 125, inacc: 0.000000%, taps: 9500 [05/07/2023 06:48:28.000] [WARN] Demod switch took 46779 us [05/07/2023 06:48:28.000] [INFO] RtAudio stream open [05/07/2023 06:48:28.000] [INFO] Initializing Recorder (recorder) [05/07/2023 06:48:28.000] [INFO] Initializing Rigctl Server (rigctl_server) [05/07/2023 06:48:28.000] [INFO] Initializing SDR++ Server Source (sdrpp_server_source) [05/07/2023 06:48:28.000] [INFO] Initializing SDRplay Source (sdrplay_source) [05/07/2023 06:48:28.000] [INFO] Initializing SoapySDR Source (soapy_source) [INFO] [UHD] linux; GNU C++ version 11.3.0; Boost_107400; UHD_4.1.0.5-0-unknown [INFO] Opening HackRF One #0 f75461dc284d76c3... [05/07/2023 06:48:29.000] [INFO] Setting sample rate to 1000000.000000 [05/07/2023 06:48:29.000] [INFO] New DSP samplerate: 1000000.000000 (source samplerate is 1000000.000000) [05/07/2023 06:48:29.000] [INFO] Initializing SpyServer Source (spyserver_source) [05/07/2023 06:48:29.000] [INFO] Loading color maps [05/07/2023 06:48:29.000] [INFO] Loading /usr/share/sdrpp/colormaps/smoke.json [05/07/2023 06:48:29.000] [INFO] Loading /usr/share/sdrpp/colormaps/classic.json [05/07/2023 06:48:29.000] [INFO] Loading /usr/share/sdrpp/colormaps/gqrx.json [05/07/2023 06:48:29.000] [INFO] Loading /usr/share/sdrpp/colormaps/vivid.json [05/07/2023 06:48:29.000] [INFO] Loading /usr/share/sdrpp/colormaps/turbo.json [05/07/2023 06:48:29.000] [INFO] Loading /usr/share/sdrpp/colormaps/inferno.json [05/07/2023 06:48:29.000] [INFO] Loading /usr/share/sdrpp/colormaps/viridis.json [05/07/2023 06:48:29.000] [INFO] Loading /usr/share/sdrpp/colormaps/greyscale.json [05/07/2023 06:48:29.000] [INFO] Loading /usr/share/sdrpp/colormaps/plasma.json [05/07/2023 06:48:29.000] [INFO] Loading /usr/share/sdrpp/colormaps/classic_green.json [05/07/2023 06:48:29.000] [INFO] Loading /usr/share/sdrpp/colormaps/electric.json [05/07/2023 06:48:29.000] [INFO] Loading /usr/share/sdrpp/colormaps/websdr.json [05/07/2023 06:48:29.000] [INFO] Loading /usr/share/sdrpp/colormaps/magma.json [05/07/2023 06:48:29.000] [INFO] Loading /usr/share/sdrpp/colormaps/temper_colors.json [05/07/2023 06:48:30.000] [INFO] New DSP samplerate: 2000000.000000 (source samplerate is 2000000.000000) [05/07/2023 06:48:30.000] [INFO] HackRFSourceModule 'HackRF Source': Menu Select! [05/07/2023 06:48:30.000] [INFO] New DSP samplerate: 2000000.000000 (source samplerate is 2000000.000000)

RtApiPulse::DeviceInfo pa_context_connect() failed: Connection refused

[Resamp] predec: 4, interp: 96, decim: 125, inacc: 0.000000%, taps: 9500 [05/07/2023 06:48:30.000] [INFO] RtAudio stream open [05/07/2023 06:48:30.000] [INFO] HackRFSourceModule 'HackRF Source': Tune: 100000000.000000! [05/07/2023 06:48:30.000] [INFO] Running post-init for Airspy Source [05/07/2023 06:48:30.000] [INFO] Running post-init for AirspyHF+ Source [05/07/2023 06:48:30.000] [INFO] Running post-init for Audio Sink [05/07/2023 06:48:30.000] [INFO] Running post-init for Audio Source [05/07/2023 06:48:30.000] [INFO] Running post-init for BladeRF Source [05/07/2023 06:48:30.000] [INFO] Running post-init for File Source [05/07/2023 06:48:30.000] [INFO] Running post-init for Frequency Manager [05/07/2023 06:48:30.000] [INFO] Running post-init for HackRF Source [05/07/2023 06:48:30.000] [INFO] Running post-init for Hermes Source [05/07/2023 06:48:30.000] [INFO] Running post-init for LimeSDR Source [05/07/2023 06:48:30.000] [INFO] Running post-init for Network Sink [05/07/2023 06:48:30.000] [INFO] Running post-init for PlutoSDR Source [05/07/2023 06:48:30.000] [INFO] Running post-init for RFspace Source [05/07/2023 06:48:30.000] [INFO] Running post-init for RTL-SDR Source [05/07/2023 06:48:30.000] [INFO] Running post-init for RTL-TCP Source [05/07/2023 06:48:30.000] [INFO] Running post-init for Radio [05/07/2023 06:48:30.000] [INFO] Running post-init for Recorder [05/07/2023 06:48:30.000] [INFO] Running post-init for Rigctl Server [05/07/2023 06:48:30.000] [INFO] Running post-init for SDR++ Server Source [05/07/2023 06:48:30.000] [INFO] Running post-init for SDRplay Source [05/07/2023 06:48:30.000] [INFO] Running post-init for SoapySDR Source [05/07/2023 06:48:30.000] [INFO] Running post-init for SpyServer Source [05/07/2023 06:48:30.000] [INFO] Ready. Segmentation fault moe@radioshack:~$

Dane-Law commented 10 months ago

Any dev-conclusion why, so many HackRF H2+ (portapack Mayhem OS) had problems in connecting with newer "SDR++ builds", and the very old prerelease version worked fine?

AlexandreRouma commented 10 months ago

The hackrf code hasn't changed in years. Something changed on your end, likely firmware version.

Dane-Law commented 10 months ago

As you can see it's just not me, it's all the people in this thread, that got the exact same issue and couldnt connect and some people got more than 1 HackRF just like you Alexandre. The moment you tried to connect and run it, the software would hard close and it happen on multiple different tablets from Lenovo/Xiaoxin to Samsung etc. People then found the prerelease version from years back, and that weirdly enough worked fine, so people are just using that, but it's an old version that likely lacks some of the things the newer version got.

I still have the prerelease version on my tablet to use with my HackRF (you can see all the board pictures and details above) and was simply wondering if you the dev had concluded what differed from the prerelease version to the version that we all had problem with, and would hardclose over and over, when connecting , and if the latest SDR++ perhaps had that part sorted.

Dane-Law commented 10 months ago

But will try to install the latest SDR++ apk on another tablet and give it a fresh shot from the bow but the very old prerelease verso. worked fine https://i.imgur.com/8EYK9BA.

AlexandreRouma commented 7 months ago

Have had no adidtional reports since then and never been able to replicated on any device using any of my hackrfs. I have no choice but to close this and wait to see if someone else reports an issue similar.