How to build USB URI without iio_info

Hi, for some reason, I have configured a docker container and installed libiio and pyadi-iio. 

Modules are properly loaded in Python. 

I have a Pluto board connected with USB on the host computer and it is visible from the docker guest. For example, in the docker instance, I can properly reach the Pluto board and log with the serial connection /dev/ttyACM0. It can also be listed with the lsusb command. 

But for some reasons, iio_info is not working. I did not take the time to dig into the problem. 

Before going deeper into darkness, I just wanted to know if the USB URI can be constructed from some system information (lsusb results or some info from /sys/bus/usb/devices/) ? 

Parents Reply
  • 0
    •  Analog Employees 
    on Jun 24, 2020 4:31 PM 7 months ago in reply to drdang

    This is more an Docker/Avahi limitation. In v0.21 the IIO tools added support for zeroconf (Avahi) which requires more configuration within a Docker container since standard containers have limited network interface privileges. Hence the error:

    # root@40fbb2ee1832:~# iio_attr -a -C
    # ERROR: Unable to create Avahi DNS-SD client :Daemon not running
    # Scanning for IIO contexts failed: Text file busy

    The auto flag (-a) supports all backends now, so if you don't want this error you will need to re-configure Docker or explicitly define the context to use, and not rely on auto. 

    -Travis

Children
No Data