Questions tagged [iio]

Industrial I/O is a Linux kernel framework that provides uniform access to sensors and other ADC/DAC-based devices.

The main purpose of the Industrial I/O subsystem (IIO) is to provide support for devices that in some sense perform either analog-to-digital conversion (ADC) or digital-to-analog conversion (DAC) or both. The aim is to fill the gap between the somewhat similar hwmon and input subsystems. Hwmon is directed at low sample rate sensors used to monitor and control the system itself, like fan speed control or temperature measurement. Input is, as its name suggests, focused on human interaction input devices (keyboard, mouse, touchscreen). In some cases there is considerable overlap between these and IIO.

Devices that fall into this category include:

  • analog to digital converters (ADCs)
  • accelerometers
  • capacitance to digital converters (CDCs)
  • digital to analog converters (DACs)
  • gyroscopes
  • inertial measurement units (IMUs)
  • color and light sensors
  • magnetometers
  • pressure sensors
  • proximity sensors
  • temperature sensors

Usually these sensors are connected via SPI or I2C. A common use case of the sensors devices is to have combined functionality (e.g. light plus proximity sensor).

Links:

  1. https://wiki.analog.com/software/linux/docs/iio/iio

  2. https://www.kernel.org/doc/htmldocs/iio/

73 questions
0
votes
1 answer

Too many open files: /dev/spidev0.0

I have been trying to read a channel by interfacing MCP3008 with Raspberry Pi zero w through SPI. I am using the Adafruit blinka lib to do so. After giving data for some time it shows the error [Errno 24] Too many open files: '/dev/spidev0.0' I have…
Ax111_
  • 9
  • 4
0
votes
0 answers

Encountering an I2C error 121 when interfacing an MPU6050 with a Raspberry Pi using Python

I am attempting to use an MPU6050 sensor with a Raspberry Pi, for the purpose of dectecting hte pitch, roll, and yaw of a DIY drone I'm building. The MPU has worked in the past, somehow I've managed to change something in software, and I am now…
Mblizzard
  • 171
  • 1
  • 1
  • 8
0
votes
1 answer

cross compiling C code with external libraries

Host system: x86-64 Linux, Ubuntu 20.04 Target system: aarch64 Linux, Debian 11, arm architecture: Cortex A53 I develop for an aarch64 based Linux system on matlab/simulink. This toolchain is currently worked out for Linux and Windows hosts. However…
owndampu
  • 55
  • 8
0
votes
0 answers

IIO Linux: notify another driver when samples are ready

I have a driver for the LSM6DSOX provided by ST which can be configured to use hardware interrupts and read data. I see that IIO interface is exposed to the user space but I need this data in the another driver. I think that implementation of the…
0
votes
0 answers

Reading/Writing to LSM6DSOX via SPI from Raspberry Pi

I'm having trouble reading and writing to my Adafruit LSM6DSOX IMU from my Raspberry Pi 4 running Ubuntu 20.04. I need to do it via SPI since I require the bandwidth, but I can only seem to read the WHO_AM_I register successfully. Reading/writing to…
0
votes
0 answers

ADIS16507-1 on Raspberry Pi 4, spi_bcm2835: disagrees about version of symbol

I want to use my ADIS16507-1 sensor on my Raspberry Pi 4 but I can't see my sensor. I explain you step by step. To use my sensor I have to compile the Analog Devices kernel by modifying the configuration file as indicated by the manufacturer so that…
Dimi
  • 1
  • 2
0
votes
0 answers

Python and Rasbperry MCP3008 sampling

I am trying to use MCP3008 for sampling. I want obtain 8000 samples/second, but i really can't obtain much than 1000 samples/second. This is my code: spi = busio.SPI(clock = board.SCK, MISO=board.MISO, MOSI=board.MOSI) cs =…
Mihai
  • 3
  • 1
0
votes
0 answers

Losing data bit when reading from GPIO by libgpiod on Linux

I am using Debian (8.3.0-6) on an embedded custom board and working on the dht11 sensor. Briefly, I need to read 40 bits from a GPIO pin and each bit can take a max 70 microseconds. When bit-level is high for max 28us or 70us, it means is logic 0…
Zafer SEN
  • 105
  • 1
  • 12
0
votes
0 answers

How to transfer data from kernel to applicaiton?

I have an ADC device, I wrote a driver for it, the driver works well. I want to send the sample data from the driver to the application. I choose fasync way, using a SIGIO signal to notify the application can read data from the driver. But I found…
gaosiy
  • 3
  • 3
0
votes
0 answers

Linux kernel shutdown can cause driver to leave an I2C bus jammed

I'm using ST's own driver for the LSM6DS[ML] IMU. If that driver is in the middle of accessing an IMU register at kernel shutdown, the I2C bus can be left jammed, with SCL pulled low: This means that the final I2C write (to a PMU chip, hooking into…
fadedbee
  • 42,671
  • 44
  • 178
  • 308
0
votes
0 answers

jumping indices of values in buffer

I am currently testing some things with an accelerometer and its iio buffer and there is something that confuses me. The sensor does have four different scan elements: x, y, z and a timestamp. The indices of those values are: x = 0, y = 1, z = 2 and…
creolo
  • 318
  • 1
  • 8
0
votes
0 answers

Using libiio trigger to propagate IRQ to userspace

I browsed most of that litterature already and the kernel side of it is very much covered, understood and assimilated. However my question is basically: How can I be alerted, for example through a callback function, when an interruption occurs in…
0
votes
0 answers

GNU Radio Companion: No Module Named iio; import iio shows fine

I have been working to install GRC on my Windows 10 hosted, VMWare Ubuntu 20.04 machine. I have tracked my efforts here: Ubuntu 20.04 Could NOT find MPIR during gr-iio cmake. After much trouble, I was able to install GRC 3.8 with dependencies and…
James Hayek
  • 643
  • 3
  • 10
  • 35
0
votes
1 answer

PlutoSDR AttributeError: module 'iio' on Ubuntu 20.04

When attempting to run flow graph in GNU Radio Companion, I get the following error: AttributeError: module 'iio' has no attribute 'pluto_source' I am running a new VMWare environment, on Windows, for Ubuntu 20.04. I first installed the drivers and…
James Hayek
  • 643
  • 3
  • 10
  • 35
0
votes
1 answer

Linux IIO driver - write/read complete configuration to the chip

What is the best option to write/read complete configuration to the chip, if I'm using a IIO driver? With 'complete configuration' I mean a file (e.g chip_config.cfg) where are the values of all registers of that chip in some specific format. What…
Juraj
  • 96
  • 4