JuliaTelecom / SoapySDR.jl

Julia Wrappers for SoapySDR
https://juliatelecom.github.io/SoapySDR.jl/dev/
Other
15 stars 3 forks source link

UHD error when running `Devices()` #19

Closed mbaz closed 3 years ago

mbaz commented 3 years ago

On Arch Linux, Julia 1.6.2 and SoapySDR.jl main.

It seems this error happens only when displaying a SoapySDR.Channel, and the device is actually operational.

$ julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.6.2 (2021-07-14)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using SoapySDR, SoapyUHD_jll, Gaston

julia> channel = Devices()[1].tx[1]
[INFO] [UHD] linux; GNU C++ version 7.1.0; Boost_107600; UHD_4.1.0.HEAD-0-gf633b497
[INFO] [B200] Loading firmware image: /home/miguel/.julia/artifacts/aab01fd35ab3a7c6bbe0e50f3ae32adc1b8487c0/lib/uhd/utils/usrp_b200_fw.hex...
[INFO] [b200_impl.cpp:420] [B200] Detected Device: B200
[INFO] [B200] Detected Device: B200
[INFO] [b200_iface.cpp:568] [B200] Loading FPGA image: /home/miguel/.julia/artifacts/aab01fd35ab3a7c6bbe0e50f3ae32adc1b8487c0/lib/uhd/utils/usrp_b200_fpga.bin...
[INFO] [B200] Loading FPGA image: /home/miguel/.julia/artifacts/aab01fd35ab3a7c6bbe0e50f3ae32adc1b8487c0/lib/uhd/utils/usrp_b200_fpga.bin...
[INFO] [b200_impl.cpp:467] [B200] Operating over USB 3.
[INFO] [B200] Operating over USB 3.
[INFO] [b200_impl.cpp:522] [B200] Detecting internal GPSDO....
[INFO] [B200] Detecting internal GPSDO....
[INFO] [gps_ctrl.cpp:243] [GPS] No GPSDO found
[INFO] [GPS] No GPSDO found
[INFO] [b200_impl.cpp:618] [B200] Initialize CODEC control...
[INFO] [B200] Initialize CODEC control...
[INFO] [b200_impl.cpp:687] [B200] Initialize Radio control...
[INFO] [B200] Initialize Radio control...
[INFO] [b200_impl.cpp:1099] [B200] Performing register loopback test...
[INFO] [B200] Performing register loopback test...
[INFO] [b200_impl.cpp:1108] [B200] Register loopback test passed
[INFO] [B200] Register loopback test passed
[INFO] [b200_impl.cpp:815] [B200] Setting master clock rate selection to 'automatic'.
[INFO] [B200] Setting master clock rate selection to 'automatic'.
[INFO] [b200_impl.cpp:1149] [B200] Asking for clock rate 16.000000 MHz...
[INFO] [B200] Asking for clock rate 16.000000 MHz...
[INFO] [b200_impl.cpp:1162] [B200] Actually got clock rate 16.000000 MHz.
[INFO] [B200] Actually got clock rate 16.000000 MHz.
TX Channel #1 on B200
  Selected Antenna [TX/RX]: TX/RX
  Bandwidth [ 200 kHz .. 56 MHz ]: 56.0 MHz
  Frequency [ Error showing value of type SoapySDR.Channel:
ERROR: MethodError: no method matching print_hz_range(::IOBuffer, ::StepRangeLen{Unitful.Quantity{Float64, 𝐓^-1, Unitful.FreeUnits{(Hz,), 𝐓^-1, nothing}}, Base.TwicePrecision{Unitful.Quantity{Float64, 𝐓^-1, Unitful.FreeUnits{(Hz,), 𝐓^-1, nothing}}}, Base.TwicePrecision{Unitful.Quantity{Float64, 𝐓^-1, Unitful.FreeUnits{(Hz,), 𝐓^-1, nothing}}}})
Closest candidates are:
  print_hz_range(::IO, ::Intervals.Interval{var"#s13", Intervals.Closed, Intervals.Closed} where var"#s13") at /home/miguel/.julia/packages/SoapySDR/1PDAa/src/highlevel.jl:208
Stacktrace:
  [1] sprint(f::Function, args::StepRangeLen{Unitful.Quantity{Float64, 𝐓^-1, Unitful.FreeUnits{(Hz,), 𝐓^-1, nothing}}, Base.TwicePrecision{Unitful.Quantity{Float64, 𝐓^-1, Unitful.FreeUnits{(Hz,), 𝐓^-1, nothing}}}, Base.TwicePrecision{Unitful.Quantity{Float64, 𝐓^-1, Unitful.FreeUnits{(Hz,), 𝐓^-1, nothing}}}}; context::Nothing, sizehint::Int64)
    @ Base ./strings/io.jl:105
  [2] sprint(f::Function, args::StepRangeLen{Unitful.Quantity{Float64, 𝐓^-1, Unitful.FreeUnits{(Hz,), 𝐓^-1, nothing}}, Base.TwicePrecision{Unitful.Quantity{Float64, 𝐓^-1, Unitful.FreeUnits{(Hz,), 𝐓^-1, nothing}}}, Base.TwicePrecision{Unitful.Quantity{Float64, 𝐓^-1, Unitful.FreeUnits{(Hz,), 𝐓^-1, nothing}}}})
    @ Base ./strings/io.jl:101
  [3] (::SoapySDR.var"#2#6")(x::StepRangeLen{Unitful.Quantity{Float64, 𝐓^-1, Unitful.FreeUnits{(Hz,), 𝐓^-1, nothing}}, Base.TwicePrecision{Unitful.Quantity{Float64, 𝐓^-1, Unitful.FreeUnits{(Hz,), 𝐓^-1, nothing}}}, Base.TwicePrecision{Unitful.Quantity{Float64, 𝐓^-1, Unitful.FreeUnits{(Hz,), 𝐓^-1, nothing}}}})
    @ SoapySDR ~/.julia/packages/SoapySDR/1PDAa/src/highlevel.jl:223
  [4] iterate
    @ ./generator.jl:47 [inlined]
  [5] _collect
    @ ./array.jl:691 [inlined]
  [6] collect_similar(cont::Vector{StepRangeLen{Unitful.Quantity{Float64, 𝐓^-1, Unitful.FreeUnits{(Hz,), 𝐓^-1, nothing}}, Base.TwicePrecision{Unitful.Quantity{Float64, 𝐓^-1, Unitful.FreeUnits{(Hz,), 𝐓^-1, nothing}}}, Base.TwicePrecision{Unitful.Quantity{Float64, 𝐓^-1, Unitful.FreeUnits{(Hz,), 𝐓^-1, nothing}}}}}, itr::Base.Generator{Vector{StepRangeLen{Unitful.Quantity{Float64, 𝐓^-1, Unitful.FreeUnits{(Hz,), 𝐓^-1, nothing}}, Base.TwicePrecision{Unitful.Quantity{Float64, 𝐓^-1, Unitful.FreeUnits{(Hz,), 𝐓^-1, nothing}}}, Base.TwicePrecision{Unitful.Quantity{Float64, 𝐓^-1, Unitful.FreeUnits{(Hz,), 𝐓^-1, nothing}}}}}, SoapySDR.var"#2#6"})
    @ Base ./array.jl:606
  [7] map(f::Function, A::Vector{StepRangeLen{Unitful.Quantity{Float64, 𝐓^-1, Unitful.FreeUnits{(Hz,), 𝐓^-1, nothing}}, Base.TwicePrecision{Unitful.Quantity{Float64, 𝐓^-1, Unitful.FreeUnits{(Hz,), 𝐓^-1, nothing}}}, Base.TwicePrecision{Unitful.Quantity{Float64, 𝐓^-1, Unitful.FreeUnits{(Hz,), 𝐓^-1, nothing}}}}})
    @ Base ./abstractarray.jl:2294
  [8] show(io::IOContext{Base.TTY}, #unused#::MIME{Symbol("text/plain")}, c::SoapySDR.Channel)
    @ SoapySDR ~/.julia/packages/SoapySDR/1PDAa/src/highlevel.jl:223
  [9] (::REPL.var"#38#39"{REPL.REPLDisplay{REPL.LineEditREPL}, MIME{Symbol("text/plain")}, Base.RefValue{Any}})(io::Any)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:220
 [10] with_repl_linfo(f::Any, repl::REPL.LineEditREPL)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:462
 [11] display(d::REPL.REPLDisplay, mime::MIME{Symbol("text/plain")}, x::Any)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:213
 [12] display(d::REPL.REPLDisplay, x::Any)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:225
 [13] display(x::Any)
    @ Base.Multimedia ./multimedia.jl:328
 [14] #invokelatest#2
    @ ./essentials.jl:708 [inlined]
 [15] invokelatest
    @ ./essentials.jl:706 [inlined]
 [16] print_response(errio::IO, response::Any, show_value::Bool, have_color::Bool, specialdisplay::Union{Nothing, AbstractDisplay})
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:247
 [17] (::REPL.var"#40#41"{REPL.LineEditREPL, Pair{Any, Bool}, Bool, Bool})(io::Any)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:231
 [18] with_repl_linfo(f::Any, repl::REPL.LineEditREPL)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:462
 [19] print_response(repl::REPL.AbstractREPL, response::Any, show_value::Bool, have_color::Bool)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:229
 [20] (::REPL.var"#do_respond#61"{Bool, Bool, REPL.var"#72#82"{REPL.LineEditREPL, REPL.REPLHistoryProvider}, REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::Any, ok::Bool)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:798
 [21] #invokelatest#2
    @ ./essentials.jl:708 [inlined]
 [22] invokelatest
    @ ./essentials.jl:706 [inlined]
 [23] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
    @ REPL.LineEdit /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/LineEdit.jl:2441
 [24] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
    @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:1126
 [25] (::REPL.var"#44#49"{REPL.LineEditREPL, REPL.REPLBackendRef})()
    @ REPL ./task.jl:411

julia>
sjkelly commented 3 years ago

I think this should be fixed. Please reopen if not.