Git Product home page Git Product logo

labbrick_digital_attenuator's Introduction

Labbrick_Digital_Attenuator

Control Tool to use the digital attenuator from Labbrick in your WiFi experiments under Linux.

This is a small tool to use the LabBrick Digital Atenuator from Vaunix under Linux. It is tested and validated with the USB LDA-602 attenuator (http://vaunix.com/products/digital-attenuators/overview/) under Ubuntu 14.04.

alt tag

As the Code of Vaunix is not open source it will not be included in this repository so that everyone who wishes to use this program needs to download their source and include it into the folder in order to build the tool with the provided makefile.

A typical experimental setup, where the digital anttenuator is connecto to a Laptop via USB looks like:

alt tag

How to compile ?

  1. clone or download this resository to your local linux machine
  2. request the Linux Library from Vaunix Lab brick via Email
  3. copy the files: "LDAhid.h LDAhid.c" from Lab Bricks SDK into the src folder
  4. ensure that you have the libusb-dev package installed in your system
  5. build the tool via "make all"
  6. [optional] install the tool and its man page with "make install"
  7. use the compiled "attenuator_lab_brick" tool to instruct the digital attenuator in your experiments

How to use our tool ?

  1. start our tool with "sudo attenuator_lab_brick -h" to get a list of supported commands
  2. either you set the attenuation level directly or for more complex attenuation patters via a csv file
  3. You can get the attenuator frequency resolution with "sudo attenuator_lab_brck -i". We do support 0.25dB steps

Additional information about each command can be found in the man page

Example usage with a csv file

For a better user experience and understanding, some .csv files are provided in the examples folder. The provided files are in the format: first row = step time (to be specified as seconds, milliseconds or microseconds in command execution), second row = attenuation in dB.

To read the attenuation.csv file continiously with milliseconds step time, you can use:

"sudo attenuator_lab_brick ms -r -f attenuation.csv -l att_log.txt > /dev/null"

The min_max_att.csv in the examples folder will set attenuation to 0dB followed by 63dB two times.

"sudo attenuator_lab_brick s -q -f min_max_att.csv -l att_log.txt"

The 2_sided_ramp.csv generates an attenuation starting from 0dB increasing to 63dB in 1dB steps and vice versa.

"sudo attenuator_lab_brick s -f 2_sided_ramp.csv"

Example usage with a generated sawtooth signal

To create a sawtooth signal starting at 0dB increasing in 2dB steps every 50 microseconds and repeat it eight times, you can use:

"sudo attenuator_lab_brick -ramp -start 0 -end 60 -step 2 -t 50 us -rr 8"

For a more enhanced usage example of our tool within your wireless experiments look at the "run-experiment.sh" shell script.

More (specific) usage examples

Set 40dB attenuation to single device (automatically detected) for 20 seconds

"sudo attenuator_lab_brick s -a 40 -t 20"

Set 40dB attenuation to specific device (detected by serial number) for 20 milliseconds

"sudo attenuator_lab_brick ms -a 40 -t 20 -n 12655"

Create a sawtooth signal starting at 0dB increasing in 2dB steps every 50 microseconds and repeat it 8 times

"sudo attenuator_lab_brick -ramp -start 0 -end 60 -step 2 -t 50 us -rr 8 -n 12655"

Set attenuation to specific device (detected by serial number) using csv file

"sudo attenuator_lab_brick s -n 12655 -f test1.csv"

Multi-device handling (automatically detected)

"sudo attenuator_lab_brick -md test1.csv test2.csv test3.csv"

Multi-device handling (detected by serial numbers)

"sudo attenuator_lab_brick -mds 12655.csv 12656.csv 10314.csv"

Notes

Calling application with -t 0 will not reset attenuation to 0

For multi-device support, -md (or -mds) option should be used without any other options

CSV file format: "step time (mandatory)","attenuation in dB (mandatory)","time unit s|ms|us" e.g.: 2,5 2,5,ms

Using -mds option, filename should be formatted in the following way: "serial number" + .csv e.g: 12655.csv

labbrick_digital_attenuator's People

Contributors

ikstream avatar neoben avatar thuehn avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

labbrick_digital_attenuator's Issues

Labbrick: file read on -md doesn't use correct values

If the -md flag is used with multiple devices connected and an equal number of files provided, the software seems not to stick with a single file.
for example
file 1: file 2:
10, 0 10, 60
10, 60 10, 0
10, 0 10, 60
10, 60 10,0

could lead to
dev1 -> 0dB
dev2 -> 60dB
dev1 -> 0dB
dev2 -> 0dB
.
.
.

only one usage of a wrong attenuation was observed so far

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.