Coder Social home page Coder Social logo

CLI: Add -e <cmd> support about bladerf HOT 3 CLOSED

nuand avatar nuand commented on August 16, 2024
CLI: Add -e support

from bladerf.

Comments (3)

smagruder1 avatar smagruder1 commented on August 16, 2024

Adding the ability to set the frequency, bandwidth, samplerate, etc. to bladeRF-cli or similar would be a great feature.

For example one might execute "bladeRF-cli -f 350000000 -b 1500000 -s 3000000" to set the frequency to 350 MHz with a bandwidth of 1.5MHz and a sample rate of 3 MHz.

-or-

"bladeRF-cli -f 350000000 -b 1500000 -s 3000000 -config bin -file sample.bin -n 10000" to tune the rx and output samples to a specified file using bin format.

I believe this would streamline the process, improve efficiency and increase user experience.

In the interim, I've written a very basic wrapper script for bladeRF-cli. It currently does not include an argument to specify an output file or format. By default it is set to .csv and samples.csv. Feel free to customize - I'll probably update at a later time along with --help or usage.

NOTE: Currently drops you into interactive mode where all you have to execute is rx start. I've been having difficulties passing this through the script - bladeRF-cli will hang in my case. Feel free to uncomment those lines to give it a shot, and please post your results.

This will help you get started and is as follows:

#!/bin/bash

### VARIABLES ###


### MAIN BODY START ###

touch config.txt
chmod 777 config.txt

while getopts f:b:s:n: option
do
        case "${option}"
        in
                f) frequency=${OPTARG};;
                b) bandwidth=${OPTARG};;
                s) samplerate=${OPTARG};;
                n) numofsamples=${OPTARG};;
        esac
done

echo "set frequency $frequency" >> config.txt
echo "set bandwidth $bandwidth" >> config.txt
echo "set samplerate $samplerate" >> config.txt
echo "rx config file=samples.csv format=csv n=$numofsamples" >> config.txt
#echo "set lnagain bypass" >> config.txt
#echo "set rxvga1 20" >> config.txt
#echo "set rxvga2 20" >> config.txt
echo "rx" >> config.txt
#echo "rx start" >> config.txt
#echo "exit" >> config.txt

sudo ./bladeRF-cli -s config.txt
#sudo ./bladeRF-cli -s config.txt -b
### MAIN BODY END ###


###CLEAN UP
rm config.txt
echo "Done."

from bladerf.

 avatar commented on August 16, 2024

Added as a test thing people can use to test out the bladeRF after install procedure..
http://forum.nuand.com/forums/viewtopic.php?f=9&t=2992&p=3842#p3842

from bladerf.

jynik avatar jynik commented on August 16, 2024

Better late than never? Pushed in e0f6ee0!

from bladerf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.