Git Product home page Git Product logo

uhdbindings.jl's Introduction

JuliaTelecom/README.md

This file does not appear to be displayed on "home" page as is the case with personal accounts.

⚠️ Note

Resources listed on this page have not necessarily been tested/used by members of JuliaTelecom. They are provided simply as a starting point to help with development.

Telecom-related packages of interest

Circuit-related packages of interest

Simulation

Plotting/data analysis

Instrument control

Other Julia "groups" of interest

JuliaHub searches

Purpose: Provide search terms that will not yield too many unrelated results.

GitHub "topic" searches

Purpose: Try to find packages of interest (written in any programming language).

Other interesting resources

uhdbindings.jl's People

Contributors

dd0 avatar rgerzaguet avatar sjkelly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

sclel016 sjkelly dd0

uhdbindings.jl's Issues

Documentation for full_sec_delay: timestamp or time delta?

Hi, me again :) I wanted to expand the documentation for functions in Rx.jl a bit to include the new check_errors option and explain the arguments to uhd_usrp_create_stream (and others that don't have docstrings). Before I do that, I wanted to check one thing:

The parameters full_sec_delay and frac_sec_delay make it seem like the command will be issued after full_sec_delay + frac_sec_delay, relative to when the function was called, but in practice (at least with a X300), they are used as a timestamp for when the streaming should start. It seems to me that this is just an unfortunate name choice inherited from the documentation for time_spec_t, which is not fully clear about the meaning, and that the function's docstring should state that it's the actual time.

(I don't think changing the argument name is worth the backwards compatibility headache, a note in the docstring sounds like it's enough)

I see that these are used with a constant delay when opening a radio in MIMO mode, but it doesn't matter there because the clock is reset immediately before. I just wanted to check first if this all sounds correct before making any changes to the docs -- I only used the SDR in a single-device configuration and don't know if there are any differences in the behaviour there.

Unsafe usage of pointers

I noticed that there are several instances where pointers obtained from unsafe_convert are used without preserving the underlying object from garbage collection.

E.g. in the uhd_usrp_create_stream function.

I’m pretty new to Julia myself, but my understanding is that this can lead to bugs when the garbage collector removes an object before the pointer is used.

Error checking in recv

The high-level recv! function does not check the error code in received packet metadata. Because of this, overflows will silently drop samples: the C library prints an O as a warning, but the Julia program does not find out about this.

Some applications that continuously receive samples from the SDR might not care about this, but it causes significant issues if we want to request a fixed number of samples. For example:

n = 1000000
UHDBindings.restartStreamer(radio.rx, UHDBindings.LibUHD.UHD_STREAM_MODE_NUM_SAMPS_AND_DONE, num_samps = n)
s = Vector{ComplexF32}(undef, n)
UHDBindings.recv!(s, radio)

If a sample is dropped due to overflow, the buffer will never be filled to the end and recv! ends up in an infinite loop.

I think it would be good to raise an exception in this case (as well as for other error types). I'd be happy to submit a PR, but I wanted to ask for your opinion first -- raising exceptions by default might break existing continuous-streaming applications. Maybe behind a flag in the UHDRx object or by default only if the streamer is not in continuous mode?

Any interest in a Mid-Level API to UHD?

I noticed this project when I wanted to interface with a USRP.
However, I found that the high-level has some restrictions (e.g. I didn’t see a way to add time_specs to receive operations),
and at the same time found the low level API a hassle to use with all the raw pointers.

I therefore started writing what I’d call a Mid-Level API, where all the functionality from the C-API is available but without having to deal with pointers.
The current work can be found here.
It’s not fully finished yet (some parts regarding sensors and subdev specs are still missing) and I didn’t get around to writing any documentation. But it should already be useable. And most of it is just wrappers around the Clang generated stuff, so it shouldn’t be too hard to use for someone familiar with the C or C++ API.

Is there any interest in integrating this code into this package?

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

Boost Error

Hi,

I'm trying out the library and getting an error during the initialization of the radio object. Looks like an error with Boost version on my system. Before trying with Julia and UHDBindings.jl I used the Fedora uhd package which has a dependency on some Boost 1.75 libraries. Is it possible to modify the UHDBindings.jl module to prioritize libUHD.so in the system path instead?

Distro: Fedora 34
Julia: 1.6.1
Boost: 1.75

Error:

ERROR: could not load library "/home/<user>/.local/share/julia/artifacts/95ad926e1c215f57d98d15df1c28ddf72873a990/libuhd.so"
libboost_date_time.so.1.65.1: cannot open shared object file: No such file or directory
Stacktrace:
 [1] macro expansion
   @ ~/.local/share/julia/packages/UHDBindings/zrWMV/src/common.jl:97 [inlined]
 [2] openUHD(carrierFreq::Float64, samplingRate::Float64, gain::Int64, antenna::String; args::String)
   @ UHDBindings ~/.local/share/julia/packages/UHDBindings/zrWMV/src/UHDBindings.jl:90
 [3] openUHD (repeats 2 times)
   @ ~/.local/share/julia/packages/UHDBindings/zrWMV/src/UHDBindings.jl:88 [inlined]
 [4] top-level scope
   @ REPL[8]:1

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.