Giter Site home page Giter Site logo

analogdevicesinc / pyadi-iio Goto Github PK

View Code? Open in Web Editor NEW
135.0 36.0 100.0 75.22 MB

Python interfaces for ADI hardware with IIO drivers (aka peyote)

Home Page: https://analogdevicesinc.github.io/pyadi-iio

License: Other

Python 99.83% MATLAB 0.03% Makefile 0.14%
python adi hardware iio libiio hacktoberfest hacktoberfest2022

pyadi-iio's Introduction

PyADI-IIO Logo

Build Status PyPI version Codacy Badge Python Version

GitHub Pages EngineerZone Analog Wiki


pyadi-iio: Analog Devices python interfaces for hardware with Industrial I/O drivers

pyadi-iio is a python abstraction module for ADI hardware with IIO drivers to make them easier to use. The libIIO interface although extremely flexible can be cumbersome to use due to the amount of boilerplate code required for even simple examples, especially when interfacing with buffers. This module has custom interfaces classes for specific parts and development systems which can generally make them easier to understand and use. To get up and running with a device can be as simple as a few lines of code:

import adi

# Create device from specific uri address
sdr = adi.ad9361(uri="ip:192.168.2.1")
# Get data from transceiver
data = sdr.rx()

Currently supported hardware

Supported parts and boards

Dependencies

Installing from source

tcollins@jeeves:~$ git clone https://github.com/analogdevicesinc/pyadi-iio.git
tcollins@jeeves:~$ cd pyadi-iio
tcollins@jeeves:~$ (sudo) pip install .

Installing from pip

tcollins@jeeves:~$ (sudo) pip install pyadi-iio

To get optional dependency for JESD debugging

tcollins@jeeves:~$ (sudo) pip install pyadi-iio[jesd]

Building doc

Install necessary tools

tcollins@jeeves:~$ (sudo) pip install -r requirements_doc.txt

Build actual doc with sphinx

tcollins@jeeves:~$ cd doc
tcollins@jeeves:~$ make html

Developing

Install necessary tools

tcollins@jeeves:~$ (sudo) pip install -r requirements_dev.txt

Running pre-commit checks

tcollins@jeeves:~$ pre-commit run --all-files

pyadi-iio's People

Contributors

adisuciu avatar adrimbarean avatar amiclaus avatar buha avatar ciprianregus avatar cristina-suteu avatar darshiltrivedi avatar hmdechavez avatar hrosete avatar jansunil avatar jpineda3 avatar jsanbuen avatar kister-jimenez avatar liambeguin avatar machschmitt avatar mc-so avatar mhennerich avatar mihaiolteanu avatar mphalke avatar mthoren-adi avatar nsacut avatar nunojsa avatar ranechita avatar rbolboac avatar ribdp avatar saikirangudla avatar tagoylo avatar tfcollins avatar trishaange01 avatar wsapia-adi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyadi-iio's Issues

libiio: ProcessLookupError: [Errno 3] No such process

I'm having this error when I try to initialize an adrv9009 device with pyadi-iio

$ sudo python3.7
Python 3.7.6 (default, May 25 2020, 13:57:06)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.

import adi
import iio
iio.version
(0, 19, 'v0.19')
sdr=adi.adrv9009()
ERROR: Unable to find host: Temporary failure in name resolution
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/adi/context_manager.py", line 56, in init
self._ctx = iio.Context(self._uri_auto)
File "/home/zynqmp/libiio/bindings/python/iio.py", line 736, in init
self._context = _new_uri(_context.encode('ascii'))
File "/home/zynqmp/libiio/bindings/python/iio.py", line 33, in _checkNull
raise OSError(err, _strerror(err))
ProcessLookupError: [Errno 3] No such process

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3.7/site-packages/adi/adrv9009.py", line 48, in init
context_manager.init(self, uri, self._device_name)
File "/usr/lib/python3.7/site-packages/adi/context_manager.py", line 62, in init
raise Exception("No device found")
Exception: No device found

``

What steps should I take to debug this? How is the device initialized/found?

Wish: conda package for pyadi-iio (windows)

Hi

It would be very helpful with a conda package for pyadi-iio including the dependency libiio as it seems quite difficult to get this integrated in python as a user on windows.

see conda-forge for more info on conda packaging

Thanks!

Import fails without fs installed

should be either added to the regular requirements in setup.py or not imported by default

It is listed as an extras require, but I expected the package to work without it since it was extra.

OSError when pushing the buffer using the latest pyadi-iio and libiio python bindings

Dear Developers,

We were recently revisiting some scripts that we had working with ADALM-Pluto one year and half ago. However, after installing the latest version of PyADI-IIO following the tutorials on https://wiki.analog.com/resources/tools-software/linux-software/pyadi-iio. We were getting OS error when pushing a buffer. The error would occur even if we are simply using the example code provided on: https://github.com/analogdevicesinc/pyadi-iio/blob/master/examples/pluto.py

We are not sure what may be causing this and attached below is a screenshot of the error message:
pluto_tx_error_message

It is worth noting that we have the libiio, libm2k already installed in the system (essentially have our code running normally with ADALM-2000). I then followed the guideline on https://wiki.analog.com/resources/tools-software/linux-software/pyadi-iio to install the libiio(via installer), pylibiio(via pip) and pyadi-iio(via pip). My recollection was that one year and half ago we had the pyadi working with pluto while also having the libm2k package installed. So I suspect there's any conflict occurring here.

I'll also reinstall the Windows OS and go through https://wiki.analog.com/resources/tools-software/linux-software/pyadi-iio again and see if that works.

Thanks in advance for any insights you could offer regarding the OS error issue!

IIO Scanner Seg Faults

IIO Scanner utility seems to keep seg faulting randomly. Jenkins log:

============================= test session starts ==============================

platform linux -- Python 3.7.3, pytest-6.0.1, py-1.9.0, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /jenkins/workspace/dev-jenkins-classes/pyadi-iio
plugins: cov-2.10.1
collecting ... Fatal Python error: Segmentation fault
Current thread 0xb6f95ad0 (most recent call first):
  File "/usr/local/lib/python3.7/dist-packages/iio.py", line 1507 in scan_contexts
  File "/jenkins/workspace/dev-jenkins-classes/pyadi-iio/test/iio_scanner.py", line 180 in scan_all
  File "/jenkins/workspace/dev-jenkins-classes/pyadi-iio/test/iio_scanner.py", line 235 in find_device
  File "/jenkins/workspace/dev-jenkins-classes/pyadi-iio/test/test_adis16460_attr.py", line 19 in check_dev
  File "/jenkins/workspace/dev-jenkins-classes/pyadi-iio/test/test_adis16460_attr.py", line 27 in <module>
  File "/usr/local/lib/python3.7/dist-packages/_pytest/assertion/rewrite.py", line 170 in exec_module

Maybe switching to the pytest-libiio plugin will help here?

Interpreter exit error

When not explicitly deleting a rx_tx based class with rx and tx buffers, del is not correctly called by the interpreter on Windows.

You get an error like:

Exception ignored in: <function Buffer.__del__ at 0x000002497A680318>
Traceback (most recent call last):
  File "C:\Users\tcollins\AppData\Local\Programs\Python\Python37\lib\site-packages\iio.py", line 1030, in __del__
OSError: exception: access violation writing 0x0000000000000024

Not all devices with "altvoltageX" channels are DDS devices

I have a pulse-capture device for Lidar, that looks like this,

iio:device5: 7c700000.axi-pulse-capture
		1 channels found:
			altvoltage0:  (output)
			3 channel-specific attributes found:
				attr  0: en value: 0
				attr  1: frequency value: 50000
				attr  2: pulse_width_ns value: 20
		6 device-specific attributes found:
				attr  0: sequencer_auto_cfg value: 0 1 2 3
				attr  1: sequencer_en value: 0
				attr  2: sequencer_manual_chsel value: 0 0 0 0
				attr  3: sequencer_mode value: auto
				attr  4: sequencer_mode_available value: auto manual
				attr  5: sequencer_pulse_delay_ns value: 248
		1 debug attributes found:
				debug attr  0: direct_reg_access value: 0x10061

In implementing a class for this device, I want to inherit from the tx class. The constructor for the tx class also does a dds.__init__(self) since it inherits from dds. So far so good. The dds constructor then searches for all altvoltageX channels and sets the frequency, scale, phase and raw attributes for each of them. I'm assuming that this naming convention is seen on DDS devices (whatever those are) so you are assuming what type of device you have based on the channel names.

In the case of the pulse-capture device from above, on the other hand, there is indeed an altvoltage0 channel, but only the frequency attribute is present and the rest of the attributes, scale, phase and raw are missing so I get a KeyError for all of these attributes. The setting of frequency actually fails, too, with an invalid argument error string, since 0 is not a valid value to set the frequency to.

ZCU102-ADRV9009 tests fail on 4.19 with JESD FSM

I planned to reuse the zcu102 - adrv9009 unit tests in the current package as a sanity check during custom board development.

On the latest master of pyadi-iio I see the following output:

-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================================================================================================== short test summary info ==========================================================================================================
FAILED test_adrv9009_p.py::test_adrv9009_sfdr[45-param_set0-0-adi.adrv9009] - AssertionError
FAILED test_adrv9009_p.py::test_adrv9009_sfdr[45-param_set1-0-adi.adrv9009] - AssertionError
FAILED test_adrv9009_p.py::test_adrv9009_sfdr[45-param_set2-0-adi.adrv9009] - AssertionError
FAILED test_adrv9009_p.py::test_adrv9009_dds_gain_check_agc[0.9-0-22-param_set0-0-adi.adrv9009] - AssertionError
FAILED test_adrv9009_p.py::test_adrv9009_dds_gain_check_agc[0.9-0-22-param_set1-0-adi.adrv9009] - AssertionError
FAILED test_adrv9009_p.py::test_adrv9009_dds_gain_check_agc[0.9-0-22-param_set2-0-adi.adrv9009] - AssertionError
FAILED test_adrv9009_p.py::test_adrv9009_dds_gain_check_vary_power[param_set0-0.5-20-60-0-adi.adrv9009] - TypeError: gain_check() missing 1 required positional argument: 'max_rssi'
FAILED test_adrv9009_p.py::test_adrv9009_dds_gain_check_vary_power[param_set0-0.5-20-60-1-adi.adrv9009] - TypeError: gain_check() missing 1 required positional argument: 'max_rssi'
FAILED test_adrv9009_p.py::test_adrv9009_dds_gain_check_vary_power[param_set0-0.5-20-60-2-adi.adrv9009] - TypeError: gain_check() missing 1 required positional argument: 'max_rssi'
FAILED test_adrv9009_p.py::test_adrv9009_dds_gain_check_vary_power[param_set0-0.5-20-60-3-adi.adrv9009] - TypeError: gain_check() missing 1 required positional argument: 'max_rssi'
FAILED test_adrv9009_p.py::test_adrv9009_dds_gain_check_vary_power[param_set1-0.5-0-15-0-adi.adrv9009] - TypeError: gain_check() missing 1 required positional argument: 'max_rssi'
FAILED test_adrv9009_p.py::test_adrv9009_dds_gain_check_vary_power[param_set1-0.5-0-15-1-adi.adrv9009] - TypeError: gain_check() missing 1 required positional argument: 'max_rssi'
FAILED test_adrv9009_p.py::test_adrv9009_dds_gain_check_vary_power[param_set1-0.5-0-15-2-adi.adrv9009] - TypeError: gain_check() missing 1 required positional argument: 'max_rssi'
FAILED test_adrv9009_p.py::test_adrv9009_dds_gain_check_vary_power[param_set1-0.5-0-15-3-adi.adrv9009] - TypeError: gain_check() missing 1 required positional argument: 'max_rssi'
FAILED test_adrv9009_p.py::test_adrv9009_iq_loopback[param_set0-0-adi.adrv9009] - OSError: [Errno 5] Input/output error
FAILED test_adrv9009_p.py::test_adrv9009_iq_loopback[param_set0-1-adi.adrv9009] - OSError: [Errno 5] Input/output error
FAILED test_adrv9009_p.py::test_adrv9009_iq_loopback[param_set0-2-adi.adrv9009] - OSError: [Errno 5] Input/output error
FAILED test_adrv9009_p.py::test_adrv9009_iq_loopback[param_set0-3-adi.adrv9009] - OSError: [Errno 5] Input/output error
FAILED test_adrv9009_p.py::test_adrv9009_iq_loopback[param_set1-0-adi.adrv9009] - OSError: [Errno 5] Input/output error
FAILED test_adrv9009_p.py::test_adrv9009_iq_loopback[param_set1-1-adi.adrv9009] - OSError: [Errno 5] Input/output error
FAILED test_adrv9009_p.py::test_adrv9009_iq_loopback[param_set1-2-adi.adrv9009] - OSError: [Errno 5] Input/output error
FAILED test_adrv9009_p.py::test_adrv9009_iq_loopback[param_set1-3-adi.adrv9009] - OSError: [Errno 5] Input/output error
FAILED test_adrv9009_p.py::test_adrv9009_iq_loopback[param_set2-0-adi.adrv9009] - OSError: [Errno 5] Input/output error
FAILED test_adrv9009_p.py::test_adrv9009_iq_loopback[param_set2-1-adi.adrv9009] - OSError: [Errno 5] Input/output error
FAILED test_adrv9009_p.py::test_adrv9009_iq_loopback[param_set2-2-adi.adrv9009] - OSError: [Errno 5] Input/output error
FAILED test_adrv9009_p.py::test_adrv9009_iq_loopback[param_set2-3-adi.adrv9009] - OSError: [Errno 5] Input/output error

Part of it is due to me having loopback only on Tx2-Rx2, but I'm wonderig about the OSError. Do you have any tips?

Envvironments:
On target:

  • I'm using the latest and greatest ad-linux 4.19 (commit 61293bbe4a5b912d5f5913c3209bf2fb19a9ee63 (origin/adi-4.19.0) with the new JESD204 FSM device tree.

On host and target

  • libiio master
  • pyadi-iio master
  • pytest-libiio master

Currently I execute commands on host ubuntu20.10 with 5.8.0-34-generic #37-Ubuntu SMP Thu Dec 10 18:01:14 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux.

Syntax Error in adi/rx_tx.py

Trying to import adi causes this error message:

File "/usr/local/lib/python3.5/dist-packages/adi/rx_tx.py", line 44
_ctrl: iio.Device = []
^
Kernel:
4.14.0-g622ceadf5354-dirty #8 SMP PREEMPT Thu Aug 8 18:10:14 EDT 2019 armv7l armv7l armv7l GNU/Linux

iio: 0.18 (git tag: c0012d0)

Accept floating point value or improve error message

frequency should be specified as int, which prevents to specify it with exponentiation syntax, i.e.:

$ PYTHONPATH=~/Sources/Git/github.com/pyadi-iio python3 library/py/cxi/pluto/plutotx2.py
Traceback (most recent call last):
  File "library/py/cxi/pluto/plutotx2.py", line 14, in <module>
    sdr.rx_lo = 915e6
  File "/Users/eblot/Sources/Git/github.com/pyadi-iio/adi/ad9361.py", line 144, in rx_lo
    self._set_iio_attr("altvoltage0", "frequency", True, value)
  File "/Users/eblot/Sources/Git/github.com/pyadi-iio/adi/attribute.py", line 56, in _set_iio_attr
    raise ex
  File "/Users/eblot/Sources/Git/github.com/pyadi-iio/adi/attribute.py", line 54, in _set_iio_attr
    channel.attrs[attr_name].value = str(value)
  File "/usr/local/lib/python3.7/site-packages/iio.py", line 388, in <lambda>
    value = property(lambda self: self.__read(), lambda self, x: self.__write(x),
  File "/usr/local/lib/python3.7/site-packages/iio.py", line 404, in _Attr__write
    _c_write_attr(self._channel, self._name_ascii, value.encode('ascii'))
  File "/usr/local/lib/python3.7/site-packages/iio.py", line 44, in _checkNegative
    raise OSError(-result, _strerror(-result))
OSError: [Errno 22] Invalid argument

I'm not sure if it would be legit to accept a float (and round it). However it would be nice to test the value to ensure it is a valid integer (isinstance(value, int)), as the traceback is not straightforward to understand.

Issues with importing adi in Python after install

Sorry to bring this up again..

I worked with the folks in the Gnuradio slack chat and got everything installed properly finally with all necessary packages. Everything seems to be good to go now, however when I try to import adi in python I get the following error:

jake@jake-Blade:~/pyadi-iio$ python3
Python 3.6.9 (default, Nov 7 2019, 10:44:02)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import iio
import adi
Traceback (most recent call last):
File "", line 1, in
File "/home/jake/pyadi-iio/adi/init.py", line 34, in
from adi.ad936x import *
File "/home/jake/pyadi-iio/adi/ad936x.py", line 35, in
from adi.rx_tx import rx_tx
File "/home/jake/pyadi-iio/adi/rx_tx.py", line 43, in
class phy(attribute):
File "/home/jake/pyadi-iio/adi/rx_tx.py", line 44, in phy
_ctrl: iio.Device = []
AttributeError: module 'iio' has no attribute 'Device'
exit()
[1]+ Killed import adi

Seems that iio is missing some attribute device. Is it possible there is a version issue with libraries where iio did not support "device" or perhaps something along that sort? You can see I successfully imported iio but seems to still be missing stuff...

Thank you as always.

Jake

Namespace Collision with gr-iio. Cannot import adi in python3.

In #55 there is some discussion that having gr-iio installed (for GNU Radio) which normally imports as iio prevents pyadi-iio from working correctly. This issue still exists:

In [1]: import adi
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-1-1bef210865df> in <module>
----> 1 import adi

~/.local/lib/python3.6/site-packages/adi/__init__.py in <module>
     32 # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     33
---> 34 from adi.ad936x import *
     35
     36 from adi.fmcomms5 import *

~/.local/lib/python3.6/site-packages/adi/ad936x.py in <module>
     33
     34 from adi.context_manager import context_manager
---> 35 from adi.rx_tx import rx_tx
     36
     37

~/.local/lib/python3.6/site-packages/adi/rx_tx.py in <module>
     41
     42
---> 43 class phy(attribute):
     44     _ctrl: iio.Device = []
     45

~/.local/lib/python3.6/site-packages/adi/rx_tx.py in phy()
     42
     43 class phy(attribute):
---> 44     _ctrl: iio.Device = []
     45
     46     def __del__(self):

AttributeError: module 'iio' has no attribute 'Device'

I believe this occurs since the libiio python bindings are installed to the same namespace as gr-iio. This namespace issue has occured in many other other projects (gr-sigmf & sigmf) and should be resolved by renaming one of the offending packages.

It makes sense to me that libiio should be used in python like import libiio.

If a proposed solution includes modifying $PATH or $PYTHONPATH, it is a bad solution.

Let me know if I overlooked something. Using pybombs installed GNU Radio 3.8 & Python 3.6.9.

Add support of xo-correction value

Support for the xo_correction value for pluto devices would be useful.
Although I understand that it could lead to requests for support of all the other device end points as well.
On ad936x.py:

@property
def xo_correction(self):
    return self._get_iio_dev_attr("xo_correction")

@xo_correction.setter
def xo_correction(self, value):
    self._set_iio_dev_attr_str("xo_correction", value)

Typo in example?

In index.rst, the comment does not seem to match the code:

 # Get both complex channel back
 sdr.rx_enabled_channels = [0]

It seems there is only one channel (i?) here.

ADAR1000 fails when labels do not exist

ADAR1000 class cycles through the different driver labels to pull out the selected devices. However, IIO drivers are not guaranteed to have labels and will break if you try to pull one out.

Example code not working

I have installed adi through pip on Python 3.6.9 and I have libiio 0.18 (git tag f69d201).
There are two specific issues when I try to execute the following code:

import adi (success)
sdr = adi.ad9361()
Fails, with:
ERROR: Unable to find host: Name or service not known
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/adi/context_manager.py", line 56, in init
self._ctx = iio.Context(self._uri_auto)
File "/usr/local/lib/python3.6/dist-packages/iio.py", line 736, in init
self._context = _new_uri(_context.encode('ascii'))
File "/usr/local/lib/python3.6/dist-packages/iio.py", line 33, in _checkNull
raise OSError(err, _strerror(err))
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.6/dist-packages/adi/ad9361.py", line 48, in init
context_manager.init(self, uri, self._device_name)
File "/usr/local/lib/python3.6/dist-packages/adi/context_manager.py", line 62, in init
raise Exception("No device found")
Exception: No device found

Circumvented using:

sdr = adi.ad9361('local:')

Then when I try to change an attribute, say

sdr.rx_rf_bandwidth = 4000000, it fails with:

Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.6/dist-packages/adi/ad9361.py", line 117, in rx_rf_bandwidth
self._set_iio_attr_int("voltage0", "rf_bandwidth", False, value)
File "/usr/local/lib/python3.6/dist-packages/adi/attribute.py", line 71, in _set_iio_attr_int
self._set_iio_attr(channel_name, attr_name, output, value, _ctrl)
File "/usr/local/lib/python3.6/dist-packages/adi/attribute.py", line 57, in _set_iio_attr
raise ex
File "/usr/local/lib/python3.6/dist-packages/adi/attribute.py", line 55, in _set_iio_attr
channel.attrs[attr_name].value = str(value)
File "/usr/local/lib/python3.6/dist-packages/iio.py", line 376, in
value = property(lambda self: self.__read(), lambda self, x: self.__write(x),
File "/usr/local/lib/python3.6/dist-packages/iio.py", line 392, in _Attr__write
_c_write_attr(self._channel, self._name_ascii, value.encode('ascii'))
File "/usr/local/lib/python3.6/dist-packages/iio.py", line 39, in _checkNegative
raise OSError(-result, _strerror(-result))
OSError: [Errno 22] Invalid argument

Please advise if you can.

Get/set kernel buffer count of ADALM-Pluto via Pyadi

Dear Developer,

Is there any way we could get/set the number of kernel buffers for ADALM-Pluto using Pyadi? I know such functions exist in libiio but I am not sure how I could do that via Pyadi after getting my context from "sdr = adi.Pluto()". Is there any command like "sdr.kernel_buffers_count = 32"?

In addition, previously when I was working with ADALM-2000, there was a very nice documentation page that included all available APIs: https://analogdevicesinc.github.io/libm2k/annotated.html
Is there a similar page for PyADI? If not, would it be better for us to program directly using libiio if we would like to have access to more APIs in order to configure ADALM-Pluto as needed?

Thank you in advance for your help!
Steven

transmission not stopped, after python application closed

i am using raw python API, using buffers in cyclic mode

    self.txbuf = iio.Buffer(self.txdac, self.samples_per_channel, False)
     ...
    self.txbuf.write(bytearray(iq_table))
    self.txbuf.push()

after the application closed a tone transmission still continue, how can i stop the transmission before the application exit

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.