ExtIO_RTLSDR# - custom ExtIO for RTLSDR

Main forum to discuss RTL-SDR related topics.
qrp
Posts: 23
Joined: Wed May 22, 2019 11:16 pm

ExtIO_RTLSDR# - custom ExtIO for RTLSDR

Post by qrp » Wed May 22, 2019 11:20 pm

Hi guys, I just wrote custom ExtIO driver for RTLSDR dongle, may be it will be interested for someone.
It has integrated DC remove filter and allows to setup any possible sample rate.
This ExtIO works through librtlsdr.dll from OSMOCOM (librtlsdr.dll should be renamed to rtlsdr.dll).

I wrote it because existing ExtIO_RTLSDR for some reason doesn't works in Direct Sampling mode with SDRUno. So, there is no way to receive MF and HF stations (0-14 MHz) with SDRUno and RTLSDR. This ExtIO works ok in such mode. Also I added DC remove filter, because it is missing from SDRUno.ExtIO, you can enable/disable it from ExtIO settings window.

It is written in C#, so I named it ExtIO_RTLSDR# :)
Also it means, that it requires .NET Framework Runtime 4.0. Usually it is already present on windows operating system, but if it is not, it should be installed from this page: https://dotnet.microsoft.com/download/d ... work/net40

Bug reports and suggestions are welcome.
This is 32 bit version, if you're needs 64 bit ExtIO version, please let me know, I will complile it for 64 bit.
Since I don't know 64 bit software which uses ExtIO, I don't know how to test it. Please let me know about such software.

I included rtlsdr.dll compiled from OSMOCOM source (librtlsdr + libusb v1.0.22-rc4).
But you can replace it with other versions, just rename librtlsdr.dll to rtlsdr.dll and place near ExtIO_RTLSDR_u8.dll.

For HDSDR, you're need to place this file near HDSDR.exe, also rtlsdr.dll should be placed near ExtIO_RTLSDR_u8.dll.
For SDRUno, you're need to place it into My Documents folder.

You can use several ExtIO drivers, just place it together and HDSDR/SDRUno will ask which one should be opened at startup.

PS: also I wrote similar ExtIO for HPSDR protocol (to use it with Hermes transceiver), but it is still a little buggy. If you're interested, I can share it.

UPDATE: the latest version is 1.1.1.7 is here: viewtopic.php?f=1&t=4710&p=11796#p11796
Attachments
ExtIO_RTLSDR_u8-1.0.0.1.zip
ExtIO for RTLSDR, works with SDRUno Direct Sampling, includes DC remove filter
(80 KiB) Downloaded 363 times
Last edited by qrp on Mon Aug 05, 2019 7:13 pm, edited 5 times in total.

qrp
Posts: 23
Joined: Wed May 22, 2019 11:16 pm

Re: ExtIO_RTLSDR# - custom ExtIO for RTLSDR

Post by qrp » Sun May 26, 2019 5:52 pm

A little update v1.0.0.2:
- fixed RTL device initialization (previously it has some uninitialized state at startup)
- changed level scale to be equal with 8 bit ExtIO mode (this ExtIO uses FLOAT sample format in order to support DC filter)
- reduced DC filter damping factor for a little (for better DC filtering with fast changing signal)
Attachments
ExtIO_RTLSDR_u8-1.0.0.2.zip
ExtIO_RTLSDR# v1.0.0.2
(80.01 KiB) Downloaded 169 times

19ac728
Posts: 7
Joined: Thu Dec 31, 2015 8:55 am

Re: ExtIO_RTLSDR# - custom ExtIO for RTLSDR

Post by 19ac728 » Sun Jun 02, 2019 7:40 am

Thank you for sharing this!

I have one litte problem whit your extio.
When i set the tuner gain (for example) to 40DB i have a noise floor 133db.
When i switch form FM mode to AM , the noise floor go down to 155DB.
When i go back to FM mode the nf is still 155DB.
When i move the tuner gain a little bit up or down the nf came back to 133db.
With the extio i now using i have this problem not.
I use HDSDR version 2.76

SDRuno v1.22 i do not have this problem!

(hope this is clear for you. my English is not that good :oops: )

alanzfq
Posts: 51
Joined: Thu Oct 04, 2018 11:18 am

Re: ExtIO_RTLSDR# - custom ExtIO for RTLSDR

Post by alanzfq » Sun Jun 02, 2019 4:15 pm

I suggest you try HDSDR v2.80.
Then report if it still has a problem.
Alan

qrp
Posts: 23
Joined: Wed May 22, 2019 11:16 pm

Re: ExtIO_RTLSDR# - custom ExtIO for RTLSDR

Post by qrp » Mon Jun 03, 2019 6:28 am

19ac728 wrote:
Sun Jun 02, 2019 7:40 am
Thank you for sharing this!

I have one litte problem whit your extio.
When i set the tuner gain (for example) to 40DB i have a noise floor 133db.
When i switch form FM mode to AM , the noise floor go down to 155DB.
Thanks for feedback, this is a bug related to settings processing. I reworked code and fixed it.
Check new version v1.1.1.3

Whats new:
- fixed save/apply settings
- a little scale fix to match with 8 bit ExtIO signal level (previous version has a small difference)
- added readme with short info
Attachments
ExtIO_RTLSDR_u8-1.1.1.3.zip
ExtIO_RTLSDR# v1.1.1.3
(85.36 KiB) Downloaded 144 times

19ac728
Posts: 7
Joined: Thu Dec 31, 2015 8:55 am

Re: ExtIO_RTLSDR# - custom ExtIO for RTLSDR

Post by 19ac728 » Mon Jun 03, 2019 7:58 pm

The problem is solved.

Can I also request an extra option?
You could also make the bias-t in it?

regards, Michiel

19ac728
Posts: 7
Joined: Thu Dec 31, 2015 8:55 am

Re: ExtIO_RTLSDR# - custom ExtIO for RTLSDR

Post by 19ac728 » Mon Jun 03, 2019 8:00 pm

alanzfq wrote:
Sun Jun 02, 2019 4:15 pm
I suggest you try HDSDR v2.80.
Then report if it still has a problem.
Alan
I dont like some future`s from 2.80.
2.76 is a stable version.

qrp
Posts: 23
Joined: Wed May 22, 2019 11:16 pm

Re: ExtIO_RTLSDR# - custom ExtIO for RTLSDR

Post by qrp » Wed Jun 05, 2019 3:12 am

19ac728 wrote:
Mon Jun 03, 2019 7:58 pm
You could also make the bias-t in it?
nice idea, I will look how to do it.
But this operation may be unsafe, since enable bias-t for magnetic loop antenna may leads to hardware malfunction. So, there is need additional check for enable it.

I've realized that trying to use scale for calibration is not good idea, it leads to problem with determining ADC dBFS value.
So, I replaced scale to use 0 dBFS of ADC as full scale. New ExtIO provides float samples in range -1..+1.
When level is near to 0 dB, it means that ADC is near to overload and there is need to add attenuator on the RTLSDR input.
Here is a new version v1.1.1.4, it allows to see when ADC is near to overload level.
Attachments
ExtIO_RTLSDR_u8-1.1.1.4.zip
ExtIO_RTLSDR# v1.1.1.4 (fixed dBFS scale for HDSDR)
(85.43 KiB) Downloaded 108 times

qrp
Posts: 23
Joined: Wed May 22, 2019 11:16 pm

Re: ExtIO_RTLSDR# - custom ExtIO for RTLSDR

Post by qrp » Wed Jun 05, 2019 5:45 am

Here is update with BIAS TEE check box :)

I added a new function to librtlsdr:

Code: Select all

int rtlsdr_get_bias_tee(rtlsdr_dev_t *dev)
it needs in order to get current state of bias tee.
Later I will submit changes to librtlsdr sources.
But you can also use old rtlsdr.dll with this ExtIO, it just will not be able to get current state of bias tee at startup and checkbox will be in undetermined state. You can still use it if rtlsdr.dll contains function rtlsdr_set_bias_tee

I added warning window with confirmation for enable BIAS TEE.
Please check that your antenna is not DC short circuit (for example magnetic loop), otherwise do not enable BIAS TEE. Read RTLSDRv3 documentation for details.
Attachments
ExtIO_RTLSDR_u8-1.1.1.5.zip
ExtIO_RTLSDR# v1.1.1.5 (added BIAS TEE checkbox)
(86.79 KiB) Downloaded 434 times

19ac728
Posts: 7
Joined: Thu Dec 31, 2015 8:55 am

Re: ExtIO_RTLSDR# - custom ExtIO for RTLSDR

Post by 19ac728 » Mon Jun 10, 2019 2:03 pm

Hi Alex .
So far no problems:-)
It`s nice to work with WRplus again whitout a dc spike.
Iàm verry happy with it.

I must say that i must got used to it that the noise floor is higer.
But after correcting this , it works fine.

Thanks for sharing !!!

Post Reply