Giter Club home page Giter Club logo

rtl_tcp_andro-'s People

Contributors

dandelionsprout avatar enthusiastic-coder avatar martinmarinov avatar rtlsdrblog avatar signalwareltd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rtl_tcp_andro-'s Issues

F-Droid cannot build recent versions

The latest version on F-Droid is 2.2, dated December 2014. They disabled 3.01 (which seems to be the first one after the AS migration) as there seem to have been some gradle/JNI issues:

https://f-droid.org/wiki/page/marto.rtl_tcp_andro

Any chance you can sort this out? F-Droid is the main distribution channel for all those who don’t want to (or cannot) use Google Play. The maintainers are usually happy to receive contributions from app developers, and will gladly help you sort out any issues.

Using HackRF amplifier

Hello,
i'm trying to use at same spot, dump1090 works fine on my computer).

My guess is that the internal hackRF amplifier should be activated, but I can't figure out how to do it from android, would it be possible to have a "config file mode" to force some hackrf settings not handled by sdrTcpArguments ?

regards

CM11 hp touchpad - LIBUSB_ERROR_OTHER

Hello,

Running latest rtl-sdr driver from the market, CyanogenMod 11 (android 4.4.4) on hp touchpad, usb otg is enabled, y cable is in place, additional power is provided, can connect mouse and keyboard and they are recognized.

When trying to run "rtl-sdr driver" with rtl-sdr dongle connected getting LIBUSB_ERROR_OTHER:

Starting service with device rtl-sdr /dev/bus/usb/001/002
Opening fd 51
Closed service due to exception SdrException: libusb exception LIBUSB_ERROR_OTHER

NRSC5 / HD Radio Success

I've been able compile a native Android nrsc5 binary to decode HD Radio streams and play them with this driver via the Termux command line.

Alternatively, you can install a proot, Linux on Android distro and decode the audio from there with a very nice GUI such as this one:
https://github.com/markjfine/nrsc5-dui

Instructions to do all of the above can be found here: theori-io/nrsc5#277

USB permission - targetSdk 33

You can reproduce the error as following:
Fresh Installation of RTL SDR Driver

  1. Connect the USB Dongle
  2. Android is asking to choose the application for the USB device
  3. Dismiss this window
  4. In adavnced Mode - press the START STREAM button
  5. Android is asking you if you want to give USB permission
  6. Accept the permission

Error then is the following:

onStart
RtlSdr: found 1 device opening options
HackRF: found 0 device opening options
Only 1 option available, no need to ask user. Opening rtl-sdr /dev/bus/usb/001/003
Closing service
Queueing
Arguments SdrTcpArguments{gain=24, samplerateHz=1024000, frequencyHz=91800000, address='0.0.0.0', port=14423, ppm=0}
Starting service with device rtl-sdr /dev/bus/usb/001/003
Got a permission for an unexpected device NULL. Expected UsbDevice[mName=/dev/bus/usb/001/003,mVendorId=3034,mProductId=10296,mClass=0,mSubclass=0,mProtocol=0,mManufacturerName=Realtek,mProductName=RTL2838UHIDIR,mVersion=1.00,mSerialNumberReader=android.hardware.usb.IUsbSerialReader$Stub$Proxy@38a97ae, mHasAudioPlayback=false, mHasAudioCapture=false, mHasMidi=false, mHasVideoCapture=false, mHasVideoPlayback=false, mConfigurations=[
UsbConfiguration[mId=1,mName=USB2.0-Bulk&Iso,mAttributes=128,mMaxPower=250,mInterfaces=[
UsbInterface[mId=0,mAlternateSetting=0,mName=Bulk-In, Interface,mClass=255,mSubclass=255,mProtocol=255,mEndpoints=[
UsbEndpoint[mAddress=129,mAttributes=2,mMaxPacketSize=512,mInterval=0]]
UsbInterface[mId=1,mAlternateSetting=0,mName=Bulk-In, Interface,mClass=255,mSubclass=255,mProtocol=255,mEndpoints=[]]].
Caught exception RuntimeException: Could not get a connection
-> RtlSdrDevice -> RtlSdrDevice$1
Closed service due to exception RuntimeException: Could not get a connection
ERROR STARTING! Reason: unknown_error

Most likely reason is in
UsbPermissionObtainer.java
UsbDevice device = intent.getParcelableExtra(UsbManager.EXTRA_DEVICE);

UsbDevice device = intent.getParcelableExtra(UsbManager.EXTRA_DEVICE); if (device != null && device.equals(usbDevice)) { if (intent.getBooleanExtra(UsbManager.EXTRA_PERMISSION_GRANTED, false)) { if (!manager.hasPermission(device)) { Log.appendLine("Permissions were granted but can't access the device"); task.setDone(null); } else { Log.appendLine("Permissions granted and device is accessible"); task.setDone(manager.openDevice(device)); } } else { Log.appendLine("Extra permission was not granted"); task.setDone(null); } context.unregisterReceiver(this); } else { Log.appendLine("Got a permission for an unexpected device %s. Expected %s.", device == null ? "NULL" : device, usbDevice); task.setDone(null); }

see
[https://developer.android.com/reference/android/content/Intent]
This method was deprecated in API level 33. Use the type-safer getParcelableArrayListExtra(java.lang.String, java.lang.Class) starting from Android Build.VERSION_CODES#TIRAMISU.

Strange results compared to local rtl_tcp implementation.

I've been experimenting with the source code and stumbled upon strange data coming from android application. It's almost only two bytes 0x7f and 0x80. I believe this is an issue with the gain setting, but looks like changing gain does not help at all.
Here is a summary picture with the histogram of two files. One from the archlinux with ./rtl_tcp -f 1090000000 -s 2000000 another from your app with the same arguments. Same dongle of course.
Maybe you've seen something like this before and have any tips about what am I doing wrong?

Add support for RTL-SDR Blog V4

Hi, just wanted to get in touch to see what the best way would be to add support for the RTL-SDR Blog V4? This is a new RTL-SDR dongle i'm releasing for sale, but unfortunately the hardware changes mean that it's not compatible with the current drivers. https://www.rtl-sdr.com/rtl-sdr-blog-v4-dongle-initial-release/

Basically there needs to be three main changes:

  1. Set R828D dongles to use a 28.8 MHz LO instead of 16 MHz (can maintain compatibility with existing R828D dongles by checking an EEPROM string in V4 dongles)
  2. Activate the appropriate R828D RF inputs based on frequency
  3. Automatically upconvert the frequency when tuned to HF signals (as there is a built in upconverter)

These changes are implemented at https://github.com/rtlsdrblog/rtl-sdr-blog-minimal

Are you accepting PR's? If you like I can do a PR on your code with the necessary changes.

Error on New Android devices because of new target api

onStart
RtlSdr: found 1 device opening options
HackRF: found 0 device opening options
Only 1 option available, no need to ask user. Opening rtl-sdr /dev/bus/usb/001/003
Closing service
Queueing
Arguments SdrTcpArguments{gain=24, samplerateHz=1024000, frequencyHz=91800000, address='0.0.0.0', port=14423, ppm=0}
Starting service with device rtl-sdr /dev/bus/usb/001/003
Caught exception IllegalArgumentException: marto.rtl_tcp_andro: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
-> PendingIntent -> UsbPermissionObtainer -> RtlSdrDevice -> RtlSdrDevice$1
Closed service due to exception IllegalArgumentException: marto.rtl_tcp_andro: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
ERROR STARTING! Reason: unknown_error

@Override public void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode != 1234) return; // This is the requestCode that was used with startActivityForResult if (resultCode == RESULT_OK) { // Connection with device has been opened and the rtl-tcp server is running. You are now responsible for connecting. int[] supportedTcpCommands = data.getIntArrayExtra("supportedTcpCommands"); startTcp(supportedTcpCommands); // Start your TCP client, see section below } else { // something went wrong, and the driver failed to start String errmsg = data.getStringExtra("detailed_exception_message"); showErrorMessage(errmsg); // Show the user why something went wrong }

Probably me being stupid

Hey, quick question... I'm trying to compile this code with and run it on my samsung gs4. I pulled from your commit on Aug 04 before I noticed that you added "Nothing works". The rtl_tcp_andro binary that is checked in works perfectly, but when I try to compile it myself, I get a link error at run-time saying "CANNOT LINK EXECUTABLE: cannot locate symbol "stpcpy" referenced by /data/data/marto.rtl_tcp_andro_files/rtl_tcp_andro".

This seems weird to me because it doesn't look like stpcpy is even being used. There is one call for strcpy though. I'm assuming I'm having it build against the wrong platform, but I can't seem to get it right. Do you have any suggestions?

Thanks,
Jon

direct sampling for rtl_tcp

i could be wrong but..
i tested this more times, and it doesn't work as it should..
I set direct sampling, but all i get is static noise with a peak in the middle from 100khz till cca 25MHz.
It may be that driver is using I, instead of Q sampling mode.

Maybe this is the issue at librtlsdr.c:
/* only enable In-phase ADC input */
r |= rtlsdr_demod_write_reg(dev, 0, 0x08, 0x4d, 1);

/* swap I and Q ADC, this allows to select between two inputs */
r |= rtlsdr_demod_write_reg(dev, 0, 0x06, (on > 1) ? 0x90 : 0x80, 1);

Error from RTL-SDR driver - not enough power from OTG.

I have a built long time ago simple power injector for my RTL-SDR DIY kit. When I try to connect it, including additional power from powerbank, to my Redmi 9 I'm getting an error message "Your Android device does not provide enough power to the dongle. You must use an externally powered USB hub or an externally powered USB OTG cable."

Crash on Android 12 - Reason --> BinaryRunnerService.java

Since you updated the Target API

I think you should start a foregroundservice instead of startservice.

public void startWithDevice(SdrDevice sdrDevice, SdrTcpArguments sdrTcpArguments) { Check.isNotNull(sdrDevice); Check.isNotNull(sdrTcpArguments); addWork(sdrDevice, sdrTcpArguments); if (!isRunning) { Intent intent = new Intent(getApplicationContext(), BinaryRunnerService.class); startService(intent); } else { closeService(); } }

so i think this would help
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { startForegroundService(intent); } else startService(intent);

Additonal you should add in your AndroidManifest.xml

<service android:name="com.sdrtouch.rtlsdr.BinaryRunnerService" android:foregroundServiceType="connectedDevice" android:exported="false" />

How to run continuously?

Hi!
I want to run as a server in Android box, but I cannot reconnect after the connection has ended. How to running always?

Thank you!

Nexus 7 Android 5.02 not seeing device

Does the driver support Android 5.02?

It reports device not found. The device works with a PC and the OTG cable works with dongles and hard drives.

I also have a Nexus 5, but it is also running 5.02. My old Samsung is probably not powerful enough...

Peter

device_filter.xml uses hex values

The product-id and vendor-id values are supposed to be in decimal format, not hex.

I see that you convert them from hex to decimal internally however, so the app is working.

Still, this file should be portable to other projects which are expecting the standard format.

Wrong arguments were supplied! Please, check the sdr_tcp manual!

I'm working on the next version of welle.io. Most of time welle.io gets the message Wrong arguments were supplied! Please, check the sdr_tcp manual! when trying to use the rtl-sdr driver. Sometimes it is also working.

What can be the cause? Which arguments are wrong?

Rtl-sdr driver gives the following output.

onStart
RtlSdr: found 1 device opening options
Only 1 option available, no need to ask user. Opening rtl-sdr /dev/bus/usb/001/003
Closing service
Queueing
Arguments SdrTcpArguments{gain=24, samplerateHz=2048000, frequencyHz=100000000, address='127.0.0.1', port=1234, ppm=0}
Starting service with device rtl-sdr /dev/bus/usb/001/003
Opening fd 58
Set sampling rate to 2048000
Tuner gain set to 2.400000 dB
SdrTcp: Closing sdrtcp due to sdrtcp_open_socket seeing state 2 and success 0
SdrTcp: Closing from state 0
Closed service due to exception SdrException: Wrong arguments were supplied! Please, check the sdr_tcp manual!
Closing service

Tested with Android One 9.0.

Allow use on chromeOS

Just putting in my vote for allowing this driver to be used on chromeOS. I have a chromebox and would love to use SDR Driver on it to set up rtl_tcp. I don't think there are any relevant differences in the underlying android OS so this might be as simple as allowing chromeOS within the app packaging?

I've been wrong before, though.

Note that while ChromeOS now has native linux functionality and the RTL device can be seen inside crostini, there's no reasonable way to NAT or bridge the internal linux network interface back to the external.

version 3.02 not pushed to F-droid

Hi, as user of f-droid, while trying the version in the fdroid repo (2.2) the RF analyzer software is not working with the driver. with the 3.02 release you gently put on github, this is working correctly.
Is it possible tu push this 3.02 version to fdroid repo ?

Regards.

Integrate 'libusb' and 'rtl-sdr' library modifications with original projects

Dear mr. Marinov,

I very appreciate the changes you made in 'libusb' and 'rtl-sdr' to let it work at an Android device!

I would really like it when you are able to get your modifications integrated in the original projects. Or at least rebase your modifications on the master-branche of the 'libusb' and 'rtl-sdr' projects.

In the original 'libusb'-project there is even Android-support included. Maybe you can use that lib without modifications?

Thanks in advance!

Many greetings,
Vincent

As reference, these are the locations of the original projects:
https://github.com/libusb/libusb.git
https://github.com/keenerd/rtl-sdr.git

A break bug:java.lang.UnsatisfiedLinkError

Hello,
we recently tested your app rtl_tcp by an automated Android GUI testing tool developed by our team, and we found a bug that the app will break when we click.Here is the trace.

  1. click the "Enable advanced mode" button;
    2.choose the "Force root" checkbox;
    3.click the "Start stream" button, and the app will break immediately.
    Here is the log we dumped:
    E/AndroidRuntime(16257): FATAL EXCEPTION: main
    E/AndroidRuntime(16257): Process: a3e.process, PID: 16257
    E/AndroidRuntime(16257): java.lang.UnsatisfiedLinkError: Couldn't load RtlTcp from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/umd.troyd-1.apk", zip file "/data/app/marto.rtl_tcp_andro-1.apk"],nativeLibraryDirectories=[/data/app-lib/umd.troyd-1, /data/app-lib/marto.rtl_tcp_andro-1, /vendor/lib, /system/lib]]]: findLibrary returned null
    E/AndroidRuntime(16257): at java.lang.Runtime.loadLibrary(Runtime.java:358)
    E/AndroidRuntime(16257): at java.lang.System.loadLibrary(System.java:526)
    E/AndroidRuntime(16257): at marto.rtl_tcp_andro.core.RtlTcp.(RtlTcp.java:45)
    E/AndroidRuntime(16257): at marto.rtl_tcp_andro.tools.BinaryRunnerService.start(BinaryRunnerService.java:89)
    E/AndroidRuntime(16257): at marto.rtl_tcp_andro.DeviceOpenActivity$1.onServiceConnected(DeviceOpenActivity.java:77)
    E/AndroidRuntime(16257): at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1103)
    E/AndroidRuntime(16257): at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1120)
    E/AndroidRuntime(16257): at android.os.Handler.handleCallback(Handler.java:733)
    E/AndroidRuntime(16257): at android.os.Handler.dispatchMessage(Handler.java:95)
    E/AndroidRuntime(16257): at android.os.Looper.loop(Looper.java:136)
    E/AndroidRuntime(16257): at android.app.ActivityThread.main(ActivityThread.java:5135)
    E/AndroidRuntime(16257): at java.lang.reflect.Method.invokeNative(Native Method)
    E/AndroidRuntime(16257): at java.lang.reflect.Method.invoke(Method.java:515)
    E/AndroidRuntime(16257): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
    E/AndroidRuntime(16257): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:611)
    E/AndroidRuntime(16257): at dalvik.system.NativeStart.main(Native Method)
    Here is the suspicious code snippet:
    screen shot 2016-04-11 at 3 47 24 pm
    Could you please take a look and confirm this bug? Thanks a lot!
    ywm0822 AT gmail DOT com

NooElec

Did someone got it working with NooElec Donges?
I have tried the Nooelec NESDR Mini 2 and the Nooelec NESDR SMArt XTR but both would not get recognized.

support for Omnia SDR

Dear Martin.

I wonder whether you would kindly implement a support for the Omnia SDR transceiver into your rtlsdr driver.

The Omnia SDR
www.omnia-sdr.com

is a short wave HAM radio SDR transceiver, implementing an USB hub, USB audio class device and a libusb low speed communication port for controlling an internal VFO, band pass filters etc. The Omnia firmware could be changed to let the USB audio class device identify itself as something different than an USB audio device as to avoid the stock Linux USB driver to open it, so I suppose it should be then possible to implement an audio like driver using the libusb interface by porting a Linux USB audio kernel driver to libusb in a similar way it has been done for the rtlsdr.

Once there is a driver for the Omnia, I suppose one would be able to use your stock sdrtouch Android application for receive. A transmit function would be cool as well :-)

Thanks for consideration,
Vojtech

Not starting correctly

Please can you help me with following problem. I connect SDR to OTG, but the driver does not start correctly. I've enabled all the permissions I can on Xiaomi Redmi Note 10S. Here is the log:

onStart
RtlSdr: found 1 device opening options
HackRF: found 0 device opening options
Only 1 option available, no need to ask user. Opening rtl-sdr /dev/bus/usb/001/030
Closing service
Queueing
Arguments SdrTcpArguments{gain=24, samplerateHz=2048000, frequencyHz=100000000, address='127.0.0.1', port=1234, ppm=0, biast=0}
Starting service with device rtl-sdr /dev/bus/usb/001/030
Opening fd 96
Set sampling rate to 2048000
Tuner gain set to 2.400000 dB
SdrTcp: Listening on 127.0.0.1:1234
Device was open. Closing the prompt activity.
SdrTcp: Waiting for client...
The rtl-tcp implementation is running and is ready to accept clients
Acquired wake lock. Will keep the screen on.
rtlsdr_read_async failed
rtlsdr_read_async finished successfully
SdrTcp: Requested sdrtcp stop asynchroneously
Closed service due to exception SdrException: Unknown error!
Wake lock released
Closing service
SdrTcp: TCP server shutting down.
SdrTcp: Closing sdrtcp due to main thread finishing
SdrTcp: Closing from state 0
SdrTcp: Server thread shut down
UsbDelegate USB attached: /dev/bus/usb/001/037
UsbDelegate no activity found for SDR handling

Get Error in welle.io

Hi, I'm using welle.io on Android and after some time I get this error message:
"SdrTcp: serveClient cannot send to client"
This is issued in sdrtcp.c at line 148. To me it looks like that the return code of select() in line 139 is not handled correctly. According the manual pages the select function returns the total number of socket handles that are ready and contained in the fd_set structures, zero if the time limit expired, or SOCKET_ERROR (-1) if an error occurred. If the return value is SOCKET_ERROR, WSAGetLastError (errno) can be used to retrieve a specific error code....

Shouldn't line 141 the be the following?
if(r > 0 && obj->state == STAGE_CLIENT_SERVING) {....
and the if-block in line 147-150 inside of the previous if(), so before line 145?

Please have a look.

Missing android.permission.sec.MDM_APP_MGMT

The driver app does not request the required permissions properly with the latest version from the google play store. (Testing on a SM-T533 with Android 5.1.1)

RtlSdr: found 1 device opening options
Only 1 option available, no need to ask user. Opening rtl-sdr /dev/bus/usb/001/002
Queueing
Arguments SdrTcpArguments{gain=24, samplerateHz=1024000, frequencyHz=100000000, address='127.0.0.1', port=60187, ppm=0}
Starting service with device rtl-sdr /dev/bus/usb/001/002
Caught exception SecurityException: Admin  does not have android.permission.sec.MDM_APP_MGMT
 -> Parcel  -> IUsbManager$Stub$Proxy  -> UsbManager  -> UsbPermissionObtainer  -> RtlSdrDevice  -> RtlSdrDevice$1
Closed service due to exception SecurityException: Admin  does not have android.permission.sec.MDM_APP_MGMT
Closing service

Implementation to your Project in my app

Hallo i would like to implement your project into my app so you dont need to install one extra application. What are the stepps to do that?

thank you for your help!

Proxy mode

I have rtl_tcp running on another computer.

Would it be possible to implement a simple "proxy mode" in this application ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.