AnsweredAssumed Answered

Null Pointer When Instantiating ad7298 Buffer Using libiio Python Bindings

Question asked by Jonathan_Eidsness on Nov 11, 2016
Latest reply on Nov 23, 2016 by pcercuei

I'm trying to instantiate a buffer for an ad7298 using the libiio python bindings.


ctx = iio.Context()
ad7298 = ctx.find_device(b'ad7298')

buf = iio.Buffer(ad7298, 8000)
Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/usr/lib/python3.4/site-packages/", line 457, in __init__
        self._buffer = _create_buffer(device._device, samples_count, cyclic)
    File "/usr/lib/python3.4/site-packages/", line 27, in _checkNull
        raise Exception("Null pointer")
Exception: Null pointer


The problem seems to be that ad7298.sample_size returns 0.

How can I correct this?