signalwareltd / rtl_tcp_andro-

rtl_tcp and libusb-1.0 port for Android modified to support opening devices from Linux file descriptors
GNU General Public License v2.0
339 stars 119 forks source link

Strange results compared to local rtl_tcp implementation. #7

Closed yekm closed 8 years ago

yekm commented 8 years ago

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?

yekm commented 8 years ago

According to this code it should turn on some automatic gain control.

    if (0 == gain) {
        if (rtlsdr_set_tuner_gain_mode(device, 0) < 0)
            LOGI("WARNING: Failed to enable automatic gain");
    } else {

I do not quite sure what it actually do, but apparently agc is not turned on. I've added rtlsdr_set_agc_mode(device, 0); and everything seems to be fine now.