FuriLabs / issue-tracker

FuriOS issue tracker
2 stars 0 forks source link

Feature Request: rtlsdr support/enabled #59

Open Crsarmv7l opened 2 weeks ago

Crsarmv7l commented 2 weeks ago

Did some tests with an rtlsdr:

I made some attempts to install and use one of my dongles (RTL2838U) on the FLX1:

  1. I started by installing the typical rtlsdr stuff: libusb-1.0-0-dev, and rtl-sdr pacakges. No issues.

    – rtl_test returned the expected results

  2. Installed rtl_433 (which also installed the libsoapy driver). Rtl_433 recognized the rtlsdr and attempted to start but self killed after establishing the bit buffers.

  3. Removed all rtlsdr stuff, and installed build requirements for rtl_433 in accordance with their build directions.

  4. Built with both rtl-sdr and with the soapy driver (two separate builds)

    – Each test resulted in a failure as stated in 2 (no error it just says setting up bit buffer and then the next line says “killed”)

Conclusion: The sw is installed and the hw is recognized (rtl_test). So it looks to be an issue elsewhere maybe kernel?

FakeShell commented 1 week ago

i am not familiar with that type of equipment myself but a quick look at our kernel leads me to this: 2838 and 2832 use the same driver and our makefiles have

ifdef CONFIG_DVB_RTL2832_SDR ccflags-y += -I$(srctree)/drivers/media/usb/dvb-usb-v2 endif obj-$(CONFIG_DVB_RTL2830) += rtl2830.o obj-$(CONFIG_DVB_RTL2832) += rtl2832.o obj-$(CONFIG_DVB_RTL2832_SDR) += rtl2832_sdr.o

but we don't add any of the DVB drivers to the kernel for obvious reasons (not really needed on a phone) one way is to build the kernel with these modules enabled and that should fix your issues.

Crsarmv7l commented 1 week ago

i am not familiar with that type of equipment myself but a quick look at our kernel leads me to this: 2838 and 2832 use the same driver and our makefiles have

ifdef CONFIG_DVB_RTL2832_SDR ccflags-y += -I$(srctree)/drivers/media/usb/dvb-usb-v2 endif obj-$(CONFIG_DVB_RTL2830) += rtl2830.o obj-$(CONFIG_DVB_RTL2832) += rtl2832.o obj-$(CONFIG_DVB_RTL2832_SDR) += rtl2832_sdr.o

but we don't add any of the DVB drivers to the kernel for obvious reasons (not really needed on a phone) one way is to build the kernel with these modules enabled and that should fix your issues.

Yeah some enterprising hackers back circa 2011 discovered dvb tuners could be repurposed as software defined radios. For about $25 you have a very capable RX only SDR up to about 1100mhz and they are very widely used.

Typically when using an rtl-sdr the dvb drivers are blacklisted and in debian and librtlsdr is installed wth apt, and libusb https://osmocom.org/projects/rtl-sdr/wiki

So I don't think it is a drivers issue as those installed fine

That said I am certainly willing to give it a try. Do you have build instructions for your kernel?

FakeShell commented 1 week ago

you can clone the kernel from our github and do

mkdir $(pwd)/packages -p
docker run --rm -v $(pwd)/packages:/buildd -v $(pwd)/linux-android-furiphone-krypton:/buildd/sources -it quay.io/furilabs/build-essential:trixie-amd64 bash

when inside,

apt-get update && apt-get install linux-packaging-snippets -y && cd /buildd/sources/&& RELENG_HOST_ARCH=arm64 releng-build-package

that should build the kernel and give packages in ../ from current directory in the container (which will be the packages directory created by mkdir on host)