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
1
vote
1 answer

How can I get i2c values from a Rapsberry with Python?

I use an ads1115 to get values from an analogic sensor to a raspberry pi 3 but I'm having a hard time figuring out how to get them from python. I use the SMBus library to get the i2c values but I can't find how to actually get the analog 0 AIN0…
1
vote
0 answers

Implementing AD7606 driver for Raspberry Pi 4b

I am trying to implement ADC AD7606 device driver for Linux on Raspberry Pi 4B+ to make possible to read data from all channels as fast as it possible via SPI. The kernel version is v5.10.83 and the kernel was compiled and installed with support…
Aro Math
  • 11
  • 2
1
vote
0 answers

BMP280 Temperature reading 0x000FFFF0

I have a BMP280 (GYBMP280 datasheet) connected to a Raspberry Pi 3 using the IC2 interface (address 0x76). The GYBMP280 is connected to the 3.3V (Pin 1). The Pressure readings seem to be fine - it fluctuates ever so slightly as expected. However,…
Stefan
  • 21
  • 2
1
vote
0 answers

MSP432 Launchpad Board using the same pins for two different devices

I am currently doing a Smart Metering device that uses NFC technology to communicate with a mobile phone. This device consists of 3 parts: An MSP432P401R launchpad. A TRF7970 (tag sensor) device connected to J1 and J2 pin arrays A temperature or…
1
vote
0 answers

Is it possible to create a udev rule that matches an I2C address?

I have many instances of the same device (an I2C-based IIO sensor) with the same I2C address behind a couple of I2C multiplexers. I would like to symlink the iio:deviceX to a more meaningful name based on a deterministic path (e.g., device = 0x29,…
mallwright
  • 1,670
  • 14
  • 31
1
vote
0 answers

How to define an IIO device in kernel in order to call the probe of the corresponding driver?

My development board is an x86 based Intel Joule 570x. I have a BMM150 sensor connected on /dev/i2c-4 bus at address 0x13. I am able to communicate to this sensor using i2cget. Now I want to make use of the driver which is already present in IIO…
Naveen
  • 7,944
  • 12
  • 78
  • 165
1
vote
0 answers

what IIO channel type in Linux kernel driver is appropriate for the LED current regulator?

while implementing linux kernel driver for proximity and luminosity sensing semiconductor having LED current regulator allowing adjust distance measurement effectiveness against environmental light disturbance, would like to support…
Oleg Kokorin
  • 2,288
  • 2
  • 16
  • 28
1
vote
1 answer

IIO: can't open file /sys/bus/iio/devices/iio\:device1/in_voltage_1

I'm trying to use the raw value from an ADC channel. In my application I do: open("/sys/bus/iio/devices/iio\:device1/in_voltage_1", O_RDONLY); That returns errno 2 "No such file or directory", the file is there though since if I do: $> cat…
evading
  • 3,032
  • 6
  • 37
  • 57
1
vote
1 answer

not able to read iio file from userspace

I am trying to read following file from C code. file: /sys/bus/iio/devices/iio\:device0/in_voltage7_raw but file pointer I am getting is -1. Using cat command it is able to read the file. But I am trying to read the same from my code as…
1
vote
2 answers

Linux Kernel IIO events sysfs files only readable

I have the problem that I registered IIO events for rising and falling thresholds. I can see the sysfs files in events subfolder and can read them, but when I try to write a new threshold it says "permission denied". following setup: static const…
lobi
  • 58
  • 8
1
vote
1 answer

Reading IIO device data from User Space

I am using MPU-9250 Invensense sensor and have taken its driver from android kernel and integrated with linux kernel. The driver is working fine with some modifications to the kernel and node, /dev/iio:\device0, and files under sys file system are…
Vamsee
  • 55
  • 1
  • 6
1
vote
1 answer

Communication between different subsystem drivers(For ex: IIO and Charging driver)

I wrote a driver for ADC module which is the part of IIO subsystem. It read voltages of various hardware peripherals connected to specific channel, and these voltages can be read only from sysfs. My problem is that, my charging driver also want to…
1
vote
2 answers

*Linux Driver Development* Is there a way to expose extra settings through sysfs using the IIO framework?

The driver I'm developing has a number of settings I want the user to be able to change that don't really fit into the IIO framework. For example, using the IIO_CHAN_INFO_SAMP_FREQ enum in my read function exposes a variable in…
z470
  • 361
  • 1
  • 2
  • 7
1
vote
0 answers

How to get RAW IMU data from the Google Glass?

I am trying to get RAW acceleration and gyroscope data from the Google Glass IMU module. I tried aSensormanager module in the NDK, but it sometimes gives output with some wierd bias adjustment. So I tried to read from the driver's virtual…
0
votes
0 answers

have any one used plutoSDR via python

I'm trying to detect UAVs using RF signal.. so I just bought ADALM-PLUTO SDR. I think I need to use adi library to use this on python, but the thing that makes me confused is sdr.rx() method. this method returns the complex value like -3+24j, but I…