Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: RTl_SDR v3 bias tee power on/off

  1. #1
    Passenger
    Join Date
    Apr 2018
    Posts
    4

    RTl_SDR v3 bias tee power on/off

    Does any body know how to invoke bias tee On/off software commande in startup script for V3 of the rtl-sdr?
    When using terminal ttrl.sdr is being "used" can not activate the bias tee, need to do it before dongle is being used på 1090 software.
    does anybod know where to invoce script
    like power on ./rtl_biast -b 1 or power off ./rtl_biast -b 0

  2. #2
    Passenger
    Join Date
    Apr 2018
    Posts
    4

    RTl_SDR v3 bias tee power on/off Raspberry pi

    Quote Originally Posted by claar View Post
    Does any body know how to invoke bias tee On/off software commande in startup script for V3 of the rtl-sdr?
    When using terminal ttrl.sdr is being "used" can not activate the bias tee, need to do it before dongle is being used på 1090 software.
    does anybod know where to invoce script
    like power on ./rtl_biast -b 1 or power off ./rtl_biast -b 0
    This is A raspberry pi with latest "noob light" and Fr24 install script installed, with minimun effort... just to test the rtl-sdr v3 dongle, but want to test a LNA with filter and see difference...

  3. #3
    Captain abcd567's Avatar
    Join Date
    Sep 2013
    Location
    Toronto CYYZ
    Posts
    2,723
    Last edited by abcd567; 2018-04-21 at 13:57.

  4. #4
    Passenger
    Join Date
    Apr 2018
    Posts
    4
    have changed to FR24 pi image instead
    where is best place to insert "~/rtl_biast/build/src/rtl_biast -b 1" before system claims the rtl-sdr device?
    want to keep it simple ..... if possible

  5. #5
    Captain abcd567's Avatar
    Join Date
    Sep 2013
    Location
    Toronto CYYZ
    Posts
    2,723
    Sorry, I dont know for sure. This is only a guess:

    In file fr24feed.service, by inserting a line above "ExecStart=/usr/bin/fr24feed".

    The new line inserted should start with ExecStartPre= , followed by your bias-t command.

    This method is untested, as I don't have RTL-SDR V3 dongle.

    EDIT
    April 23, 2018: I have indirectly tested it (WITHOUT RTL-SDR V3). Please see my Post #6 below.

    Code:
    sudo nano /etc/systemd/system/multi-user.target.wants/fr24feed.service

    The above command will open the file fr24feed.service which has following text, in which I have added line in RED for bias-t:

    Code:
    [Unit]
    Description=Flightradar24 Decoder & Feeder
    After=network-online.target
    
    [Service]
    Type=simple
    Restart=always
    LimitCORE=infinity
    ExecStartPre=-/usr/lib/fr24/install_dump1090.sh
    ExecStartPre=-/usr/lib/fr24/unregister_kernel_modules.sh
    ExecStartPre=-/usr/lib/fr24/create_missing_directories.sh
    ExecStartPre=/home/pi/rtl_biast/build/src/rtl_biast -b 1
    ExecStart=/usr/bin/fr24feed
    User=fr24
    Group=fr24
    PermissionsStartOnly=true
    StandardOutput=null
    
    [Install]
    WantedBy=multi-user.target
    Last edited by abcd567; 2018-04-23 at 13:32.

  6. #6
    Captain abcd567's Avatar
    Join Date
    Sep 2013
    Location
    Toronto CYYZ
    Posts
    2,723
    @claar:
    My guess seems to be correct.
    Since I do not have RTL-SDR V3, I cannot test it on rtl_biast package.
    Instead I tested my method on rtl_test package. The rtl_test is set to start first, grabs DVBT and tests it, finishes test within few seconds and releases DVBT. Only after this fr24feed is started, which in turn starts dump1090-mutability which grabs the DVBT already freed by rtl_test.

    Following are the details of my test/trial:

    Code:
    cd ~/
    
    sudo mkdir test-dir
    sudo chmod a+rwx test-dir
    
    cd test-dir
    
    sudo touch test-output.txt
    sudo chmod a+rwx test-output.txt
    
    sudo touch test-script.sh
    sudo chmod +x test-script.sh

    Code:
    sudo nano test-script.sh

    Contents of Test Script test-script.sh:
    Code:
    #!/bin/bash
    rtl_test -t  &> /home/pi/test-dir/test-output.txt


    Code:
    sudo nano /etc/systemd/system/multi-user.target.wants/fr24feed.service
    The RED line of code is added by me for script test-script.sh which will run rtl_test
    Please note that it has been added BEFORE line ExecStart=/usr/bin/fr24feed, so that it runs before fr24feed starts (which in turn starts dump1090-mutability).
    Code:
    [Unit]
    Description=Flightradar24 Decoder & Feeder
    After=network-online.target
    
    [Service]
    Type=simple
    Restart=always
    LimitCORE=infinity
    ExecStartPre=-/usr/lib/fr24/install_dump1090.sh
    ExecStartPre=-/usr/lib/fr24/unregister_kernel_modules.sh
    ExecStartPre=-/usr/lib/fr24/create_missing_directories.sh
    ExecStartPre=/home/pi/test-dir/test-script.sh
    ExecStart=/usr/bin/fr24feed
    User=fr24
    Group=fr24
    PermissionsStartOnly=true
    StandardOutput=null
    
    [Install]
    WantedBy=multi-user.target

    Code:
    sudo reboot


    Below is the output of rtl_test which proves that at reboot, the rtl_test did grab DVBT before dump1090-mutability could grab it, conducted the test, and then released DVBT for dump1090-mut.

    Same way rtl_biast will start, grab DVB-T, enable bias-t and after this release the DVBT
    Code:
    cat test-dir/test-output.txt
    
    Found 1 device(s):
      0:  Realtek, RTL2832U, SN: 00000000
    
    Using device 0: Generic RTL2832U
    Found Rafael Micro R820T tuner
    Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 
    
    32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6
    [R82XX] PLL not locked!
    Sampling at 2048000 S/s.
    No E4000 tuner found, aborting.
    Now ran command top, which shows dump1090-mutability, fr24feed, piaware, pfclient, rbfeeder are all runnung normally.
    Code:
    top
    
    top - 01:44:16 up 3 min,  1 user,  load average: 0.43, 0.25, 0.10
    Tasks: 127 total,   1 running, 126 sleeping,   0 stopped,   0 zombie
    %Cpu(s):  8.2 us,  3.0 sy,  0.0 ni, 88.4 id,  0.0 wa,  0.0 hi,  0.4 si,  0.0 st
    KiB Mem :   949584 total,   576304 free,    76360 used,   296920 buff/cache
    KiB Swap:        0 total,        0 free,        0 used.   809008 avail Mem
    
      PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
      566 fr24      20   0   25736   7196   2108 S  26.8  0.8   0:46.95 dump1090-mutabi
      611 piaware   20   0   13208   9700   6256 S   7.5  1.0   0:12.58 fa-mlat-client
      541 fr24      20   0   95348   3384   2280 S   2.6  0.4   0:04.00 fr24feed
      454 root      20   0   51104   2228   1744 S   2.3  0.2   0:03.74 pfclient
      731 pi        20   0    8104   3292   2804 R   2.0  0.3   0:00.26 top
      426 piaware   20   0   21672  10112   5436 S   1.0  1.1   0:02.99 piaware
      427 root      20   0  101048   6476   5220 S   1.0  0.7   0:02.21 rbfeeder
    Last edited by abcd567; 2018-04-23 at 02:22.

  7. #7
    Captain abcd567's Avatar
    Join Date
    Sep 2013
    Location
    Toronto CYYZ
    Posts
    2,723
    OK, I did a closer test:
    Build & used package rtl_biast.
    Dongle used was still DVB-T, as I do not have RTL-SDR V3, hence cannot check with a Voltmeter.
    The log file however showed that the rtl_biast did get hold of the Dongle under command rtl_biast -b 1.
    Finally dump1090-mutability found working OK (checked by command top).


    STEP-1:
    Build package rtl_biast
    Code:
    #First installed Packages needed to build and to fulfill dependencies
    sudo apt-get install git
    sudo apt-get install cmake
    sudo apt-get install libusb-1.0
    
    #Now build rtl_biast
    git clone https://github.com/rtlsdrblog/rtl_biast
    cd rtl_biast
    mkdir build
    cd build
    cmake ..
    make
    
    
    #TEST-1
    cd src
    ./rtl_biast -b 1
    
    usb_claim_interface error -6
    
    
    #TEST-2
    sudo systemctl stop fr24feed
    sudo systemctl stop dump1090-mutability
    
    ./rtl_biast -b 1
    Found Rafael Micro R820T tuner

    STEP-2:
    Created a script containing:
    (a) Red color part - Command to switch on bias-t
    (b) Green color part - Command to redirect output (stdout + stderr) to a log file biast.log to see what is happening.
    Code:
    cd rtl_biast/build/src
    sudo touch biast-start.sh
    sudo chmod +x biast-start.sh
    
    #Opened file for editing
    sudo nano biast-start.sh
    
    #Added following code in the blank file
    
    #!/bin/bash
    /home/pi/rtl_biast/build/src/rtl_biast -b 1  &> /home/pi/biast.log
    
    #Saved file (Ctrl+o) and closed (Ctrl+x)


    STEP-3:
    Edited file fr24feed.service and ADDED line shown in red, above the line ExecStart=/usr/bin/fr24feed

    Code:
    sudo nano /etc/systemd/system/multi-user.target.wants/fr24feed.service
    
    [Unit]
    Description=Flightradar24 Decoder & Feeder
    After=network-online.target
    
    [Service]
    Type=simple
    Restart=always
    LimitCORE=infinity
    ExecStartPre=-/usr/lib/fr24/install_dump1090.sh
    ExecStartPre=-/usr/lib/fr24/unregister_kernel_modules.sh
    ExecStartPre=-/usr/lib/fr24/create_missing_directories.sh
    ExecStartPre=/home/pi/rtl_biast/build/src/biast-start.sh
    ExecStart=/usr/bin/fr24feed
    User=fr24
    Group=fr24
    PermissionsStartOnly=true
    StandardOutput=null
    
    [Install]
    WantedBy=multi-user.target

    STEP-4:
    Tested by rebooting, then checking contents of log file ~/biast.log
    Code:
    sudo reboot
    
    #After reboot, check log file
    cd ~/
    cat biast.log
    Found Rafael Micro R820T tuner
    
    #BINGO! SUCCESS
    STEP-5:
    Checked dump1090-mutability and fr24feed are running OK. FOUND OK
    Code:
    top
    
    top - 15:23:59 up 31 min,  1 user,  load average: 0.54, 0.46, 0.38
    Tasks: 124 total,   1 running, 123 sleeping,   0 stopped,   0 zombie
    %Cpu(s):  7.7 us,  2.5 sy,  0.0 ni, 89.6 id,  0.0 wa,  0.0 hi,  0.2 si,  0.0 st
    KiB Mem :   949584 total,   693520 free,    83192 used,   172872 buff/cache
    KiB Swap:        0 total,        0 free,        0 used.   801736 avail Mem
    
      PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
      557 fr24      20   0   26608   7984   2032 S  26.5  0.8   8:07.10 dump1090-mutabi
      613 piaware   20   0   13208   9712   6268 S   7.8  1.0   2:19.65 fa-mlat-client
      535 fr24      20   0   95348   5856   2300 S   2.3  0.6   0:43.09 fr24feed
      448 root      20   0   51368   2808   2140 S   2.0  0.3   0:39.29 pfclient
      905 pi        20   0    8104   3244   2732 R   2.0  0.3   0:00.43 top
      418 root      20   0  101988   7772   5532 S   1.3  0.8   0:23.19 rbfeeder
      417 piaware   20   0   21672  10200   5524 S   1.0  1.1   0:20.61 piaware
    Last edited by abcd567; 2018-04-28 at 20:43. Reason: corrected file name: biast-start.sh

  8. #8
    Passenger
    Join Date
    Apr 2018
    Posts
    4
    Have tried, work exelent thx, will now try to put LNA with antenna on roof ( in a IP65 box) and feed in with aprox 7-8 meter good coax) have measured LNA ( RTL-SDR Blog ADS-B Triple Filtered LNA Bias Tee Powered) to 45dB, not 27dB as spec said, one again thx for all help to put scripts where it belong...

  9. #9
    Captain abcd567's Avatar
    Join Date
    Sep 2013
    Location
    Toronto CYYZ
    Posts
    2,723
    F I N A L

    In my previous post there are several steps.
    Actually only following two steps are needed to switch-on the bias-t
    Others steps were meant to test the success WITHOUT actually using a RTL-SDR V3 and measuring Voltage avaialbility.

    For normal use with RTL-SDR V3, only following 2 steps are required:

    Please note that STEP-2 below is different from similar steps in my previous posts.
    The STEP-2 below does NOT start a script to switch-on the bias-t. Instead it uses direct command to switch-on the bias-t.


    STEP-1:
    Build package rtl_biast

    Code:
    #First installed Packages needed to build and to fulfill dependencies
    sudo apt-get install git  
    sudo apt-get install cmake   
    sudo apt-get install libusb-1.0   
    
    #Now build rtl_biast
    git clone https://github.com/rtlsdrblog/rtl_biast   
    cd rtl_biast   
    mkdir build   
    cd build    
    cmake .. -DDETACH_KERNEL_DRIVER=ON
    make   
    
    
    #TEST-1
    cd src   
    ./rtl_biast -b 1   
    
    usb_claim_interface error -6
    
    
    #TEST-2
    sudo systemctl stop fr24feed   
    sudo systemctl stop dump1090-mutability   
    
    ./rtl_biast -b 1   
    Found Rafael Micro R820T tuner

    STEP-2:
    Configure fr24feeder to switch-on bias-t of RTL-SDR V3, BEFORE starting fr24feed (which will start dump1090-mutability).

    (a) Edit file fr24feed.service and ADD line shown in red, above the line ExecStart=/usr/bin/fr24feed
    (b) Reboot Pi.
    (c) After reboot, DC Voltage will be available at RTL-SDR V3 for LNA

    Code:
    sudo nano /etc/systemd/system/multi-user.target.wants/fr24feed.service  
    
    [Unit]
    Description=Flightradar24 Decoder & Feeder
    After=network-online.target
    
    [Service]
    Type=simple
    Restart=always
    LimitCORE=infinity
    ExecStartPre=-/usr/lib/fr24/install_dump1090.sh
    ExecStartPre=-/usr/lib/fr24/unregister_kernel_modules.sh
    ExecStartPre=-/usr/lib/fr24/create_missing_directories.sh
    ExecStartPre=/home/pi/rtl_biast/build/src/rtl_biast -b 1    
    ExecStart=/usr/bin/fr24feed
    User=fr24
    Group=fr24
    PermissionsStartOnly=true
    StandardOutput=null
    
    [Install]
    WantedBy=multi-user.target
    Last edited by abcd567; 2019-07-25 at 01:38.

  10. #10
    Captain abcd567's Avatar
    Join Date
    Sep 2013
    Location
    Toronto CYYZ
    Posts
    2,723
    O P T I O N A L

    Logging Bias-T Start:

    If you do not want to log the bias-t start events, then method given in my post #9 above (Titled: FINAL) is good for you.


    However if someone want to log the bias-t start events, then DO NOT ADD following line given in my post #9 above
    Code:
    ExecStartPre=/home/pi/rtl_biast/build/src/rtl_biast -b 1
    Instead, ADD this line:
    Code:
    ExecStartPre=/bin/bash -c "date >> /var/log/biast.log && /home/pi/rtl_biast/build/src/rtl_biast -b 1 >> /var/log/biast.log 2>&1"  

    You can check the log file by command given below.

    Code:
    cat /var/log/biast.log
    
    Mon 30 Apr 11:29:47 EDT 2018
    Found Rafael Micro R820T tuner
    Mon 30 Apr 11:34:35 EDT 2018
    Found Rafael Micro R820T tuner
    Mon 30 Apr 11:45:17 EDT 2018
    Found Rafael Micro R820T tuner
    Mon 30 Apr 11:53:07 EDT 2018
    Found Rafael Micro R820T tuner
    Note:
    (1) I have intentionally restarted fr24feed several times in half an hour period to create the sample log above.
    (2) On rebooting Pi, the log is cleared, and a fresh log with single entry at last reboot remains.
    (3) All entries at manual restart of fr24feed are stored as shown above, till Pi is rebooted, which clears all the previous logs.
    Last edited by abcd567; 2018-04-30 at 18:33.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •