signalwareltd / AndroidDvbDriver

Android driver framework for USB TV tuners
GNU General Public License v2.0
187 stars 65 forks source link

DVB-T2 not working, SDR works #44

Closed anonimo82 closed 1 year ago

anonimo82 commented 2 years ago

Hello everyone. I bought a USB DVB-T2 Stick, which is actually detected, but I get an error telling I need an empowered OTG cable. I tried plugging the stick with a USB HUB (one with its own power source), but still getting that error. SDR Touch works perfectly by the way. Unfortunately, I don't know my device' manufacturer or model, and neither its chipset, but it gets detected well, so I guess it's not that my issue.

Edit: Here is my purchase: https://www.wish.com/product/5d560916e2e4b625b34ebfac According to Device Info HW App it's a Astrometa

Thanks for any help.

anonimo82 commented 2 years ago

@martinmarinov

anonimo82 commented 2 years ago

P.S.: I'd actually point out the same hardware works as a FM radio, but not as a DVB-T2 TV Tuner

SM-G965F device with stock Android Q here

anonimo82 commented 2 years ago

lsusb return this:

Bus 001 Device 007: ID 15f4:0131 HanfTek Astrometa DVB-T/T2/C FM & DAB receiver [RTL2832P]

anonimo82 commented 2 years ago

@martinmarinov any help?

anonimo82 commented 1 year ago

@martinmarinov help?

martinmarinov commented 1 year ago

Hello I'm afraid it's not clear why this is happening. This hardware should be supported. Can you try it on a different Android device (ex. your friend's phone) to eliminate the possibility of your Android device having some weird hardware issue? It is indeed puzzling that everything works fine with SDR Touch but not Aerial TV.

Maybe you can try firing the DVB-T driver app and using its test interface to tune to a local frequency and sending the log.

anonimo82 commented 1 year ago

Hello. Tried on my sister's device right now, same result.

martinmarinov commented 1 year ago

Hey the latest release of the driver contains a bug fix that could have impacted some Android devices or some specific tuners. Can you try updating the app and trying again?

anonimo82 commented 1 year ago

Tried, same result. =(

anonimo82 commented 1 year ago

I tried again some minutes ago, this is the result: Screenshot_20221114-135838_Aerial TV

anonimo82 commented 1 year ago

@signalwareltd look at the attached screenshot

martinmarinov commented 1 year ago

@anonimo82 can you try launching the DVB Driver standalone app? It has a test interface that allows you to tune your device to a local frequency. If you know your local DVB-T transmitter frequency try tuning on that one, otherwise put any random frequency. Given this seems to be some sort of connection problem it should show clearly what the problem is.

anonimo82 commented 1 year ago

@martinmarinov here is the output from such operation

Please give more information about the crash here. We can't promise to respond to every email but your input is very valuable to us and will help improve the driver!

 Stack trace and exception (DO NOT EDIT): Cannot send USB control message. Error code -1

info.martinmarinov.drivers.DvbException: Cannot send USB control message. Error code -1
    at info.martinmarinov.drivers.usb.rtl28xx.Rtl28xxDvbDevice.ctrlMsg(Rtl28xxDvbDevice.java:89)
    at info.martinmarinov.drivers.usb.rtl28xx.Rtl28xxTunerType$14.getSlave(Rtl28xxTunerType.java:155)
    at info.martinmarinov.drivers.usb.rtl28xx.Rtl28xxTunerType.detectSlave(Rtl28xxTunerType.java:198)
    at info.martinmarinov.drivers.usb.rtl28xx.Rtl2832DvbDevice$1.run(Rtl2832DvbDevice.java:94)
    at info.martinmarinov.drivers.tools.I2cAdapter$I2GateControl.runInOpenGate(I2cAdapter.java:107)
    at info.martinmarinov.drivers.usb.rtl28xx.Rtl2832DvbDevice.readConfig(Rtl2832DvbDevice.java:90)
    at info.martinmarinov.drivers.usb.DvbUsbDevice$1.run(DvbUsbDevice.java:106)
    at info.martinmarinov.drivers.tools.Retry$1.call(Retry.java:32)
    at info.martinmarinov.drivers.tools.Retry$1.call(Retry.java:29)
    at info.martinmarinov.drivers.tools.Retry.retry(Retry.java:42)
    at info.martinmarinov.drivers.tools.Retry.retry(Retry.java:29)
    at info.martinmarinov.drivers.usb.DvbUsbDevice.open(DvbUsbDevice.java:102)
    at info.martinmarinov.dvbdriver.DeviceController.run(DeviceController.java:67)

 Last Device: null
Build.MANUFACTURER: samsung
Build.MODEL: SM-G965F
Build.PRODUCT: star2ltexx
Build.VERSION.SDK_INT: 29
Build.VERSION.RELEASE: 10
Driver versionName: 1.4
Driver versionCode: 18

 --------------------------- 
martinmarinov commented 1 year ago

This could be an indication that a different app is trying to use the USB tuner.

I would recommend disconnecting and connecting the tuner back again after being used for SDR before using it for DVB-T. If you have any apps that automatically start the tuner in SDR mode as soon as the tuner is plugged in make sure to disable them.

If the tuner is already put into SDR mode, the DVB Driver may fail to put it back into DVB-T mode. The SDR mode is a special "debug" mode for the chip so it may not be possible to put it back to normal operation. Even if it's possible the rtl-sdr library never had to do it as normally in most set ups on Desktop you cannot have both SDR and DVB-T drivers installed at the same time.

The exception you see is an indication that the tuner is not responding to commands send from Android. This is usually an indication that tuner is in a bad state. I've seen this with some combination of USB-C to USB-A converters as well so it might be this but given SDR works it's unlikely that the cable is the issue.

anonimo82 commented 1 year ago

I tried removing SDR Touch and its driver, disabling USB Debug and resetting the DVB Driver App (in combinations), but same result. Yes, I'm using a USB-C to USB-A adapter, I couldn't connect the tuner otherwise. See attached pic. 20221116_070329

martinmarinov commented 1 year ago

Hello I'm afraid at this stage it's not clear to me what could be causing the issue. It's possible that this device has some new hardware that has some incompatibilities with the driver.

Unfortunately I'll only be able to order myself this device from Wish in early 2023. I'll leave this issue open in the meantime if you find any solution please feel free to post here.

ROW4 commented 1 year ago

I just found this issue and I have the exact same error messages. I have just bought the same Tuner, but from AliExpress. I have also tried 3 different android devices. SDR Touch works fine. My Tuner uses the RTL2832P, R828D and CXD2837ER. The USB ID on my Tuner is 15f4:0131. The vendor is astrometadvbt2. I found more information on: https://linuxtv.org/wiki/index.php/Astrometa_DVB-T2 The Astrometa Clones from 2018 use the Sony CXD2837ER chipset. This chipset does not seem to be supported on the current kernel.

signalwareltd commented 1 year ago

I have purchased the device mentioned above via Wish and will test once it arrives. Hopefully will have updates in the upcoming weeks.

anonimo82 commented 1 year ago

Hello. Any update on this?

anonimo82 commented 1 year ago

Hey, any update?

signalwareltd commented 1 year ago

Hello I have no updates right now. The device has arrived it's just a matter of finding time to test and debug. However I can't comment when I would get time to do so.

signalwareltd commented 1 year ago

I have an update: It appears that this device is using the CXD2837ER (already mentioned in this thread) demodulator which is currently not supported in the driver. I will be working on adding support for this demodulator and keep you updated.

anonimo82 commented 1 year ago

Thanks so much, I greatly appreciate your work on this!!!

signalwareltd commented 1 year ago

Good news - managed to get CXD2837ER working in latest head of the code. After some testing I would be pushing a new version with official CXD2837ER. Will let you know when this happens.

In the meantime you can pull latest changes and compile locally to test.

signalwareltd commented 1 year ago

I have just published a new version of the driver with support for

You can download the latest API from the release page: https://github.com/signalwareltd/AndroidDvbDriver/releases/tag/v1.42

Google Play and Amazon updates should be live in the next 24h.

Once you test can you confirm if this issue is now resolved?

anonimo82 commented 1 year ago

Hey, the hardware gets detected right, but no TV channel is found. Here's a screenshot Screenshot_20230427-123332_Aerial TV I'm using an indoor antenna

martinmarinov commented 1 year ago

Hello, this is likely an unrelated issue (hence I will close the thread).

But for completeness you can try the following:

Also I would recommend doing a full band scan instead of picking a country when you're struggling to pick service.

anonimo82 commented 1 year ago

No, you're wrong: See the attached screenshots, I've been able to tune some channels with the same tuner in XUbuntu and Kaffeine, same tuner and same antenna. Screenshot_2023-05-02_13-19-16 Screenshot_2023-05-02_13-19-53

martinmarinov commented 1 year ago

Can you try running the driver app in debug mode and tune to one of the frequencies that you have confirmed works in XUbuntu? Don't forget to also pick DVBT2 from the drop-down and it the bandwidth is not the standard 8 MHz.

Then post a screenshot here.

anonimo82 commented 1 year ago

Unsure about how to enter Debug mode, here is the screenshot Screenshot_20230502-190839_Aerial TV

anonimo82 commented 1 year ago

Nevermind. Screenshot_20230502-192513_DVB-T Driver