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
0 answers

i2c_smbus_write_byte_data not working on the Raspberry Pi 3

I am trying to access the mpu6050 with a C program in userspace and I have 2 helper functions to let this take place: unsigned char readMPU(unsigned char reg) { unsigned char res; /* Using SMBus command */ res =…
0
votes
0 answers

Why do I get an "sh: write error: Invalid argument" when configuring the current_trigger for an iio_sysfs_trigger?

I keep getting an sh: write error: Invalid argument when I try to configure the current_trigger for an iio device, which is for the mpu6050. I am using Yocto Kirkstone for an rpi3. Here are the steps I take: cd…
isch
  • 1
  • 3
0
votes
1 answer

How to include MPU6050 driver into Yocto image from kernel-space?

I am stuck on trying to include the MPU6050 driver into Yocto. I am using a Raspberry Pi 3, and I am on the kirkstone branch. I've done the following steps to include the MPU6050 driver: Include a fragmentation file for the MPU6050 under…
isch
  • 1
  • 3
0
votes
0 answers

Linux permission issue, when accessing I2C - Jetson Nano

I am building a small Jetson Nano robot and have done everything myself so far, from the battery pack up to spare parts for 12 V reduced engines, a Lidar, a night vision camera and an ADC to measure battery power. The script below I wrote to have a…
ntropy
  • 1
  • 1
0
votes
0 answers

Incorrect BME688 Gas reistance values

We are using the already built driver for BME680 sensor from the Linux kernel v5.10. But we need BME688 so we compared the datasheet and got to know that T,P,H calculations and registers are same for both BME680 and BME688. The only difference we…
0
votes
0 answers

Issue in Reading data from already created device under iio for st_lsm6dsox for step count

I have already enabled driver for st_lsm6dsox embedded features which created 9 devices with accel and gyro , magnetometer raw data along with step count and tilt detection features .I can read raw data from accel and gyro raw data but couldnt read…
0
votes
0 answers

Raspberry Python & Java - No input MISO

At the moment I am running a python script to get the temperature from a PT1000 sensor via MAX31865 with my Raspberry Pi 3B+. With the python code everything works fine: #!/usr/bin/python import time, math import RPi.GPIO as GPIO class Max31865(): …
Lukas
  • 1
  • 5
0
votes
0 answers

Linux MAX11122 SPI driver - extra 300uS delay before pulling up CS

I am trying to get data from a SPI ADC on a Linux v5.10 (imx8mp, no preempt RT patch). First, I used shell commands and spitools to interact with the chip and find out the configuration that suits my needs. Example of command line: printf…
Martin
  • 877
  • 8
  • 20
0
votes
0 answers

Can I modify regmap_config parameters, such as the .val_bits of regmap_config, in userspace?

I would like to know if it is possible to modify the regmap_config parameters, such as the .val_bits field, from user space. I am aware that the regmap_config structure is typically used by kernel drivers to describe the hardware characteristics,…
kimedia
  • 1
  • 1
0
votes
1 answer

How to Map Optional GPIO to IIO Driver Under Linux Device Tree

I'm interfacing with an Analog Devices AD9850 DDS IC via SPI on a Xilinx Zynq-7020 SoC running embedded Linux (Yocto). The SPI interface is via an AXI SPI IP core - this only supports up to 32 bits per transaction, whereas the AD9850 requires 40…
0
votes
1 answer

How do I make Yocto include the `iiod` package?

I have added the libiio library to my Yocto image with the libiio recipe from meta-oe, and while the library files are added to the image, iiod is not. This part of the recipe says there should be a file added to sbin, and there is…
0
votes
2 answers

Yocto PACKAGECONFIG option not being applied

I am trying to add libiio to my Yocto image, and I'm using the libiio recipe from meta-oe. The library seems to be added, however I can't seem to enable the python bindings. In that recipe, there are the lines PACKAGECONFIG ??= " \ usb_backend…
0
votes
0 answers

Linux IIO device : How to configure interrupt register 0x3F of lis2dw12 vai sysfs?

I have an IIO device, lis2dw12 and I can read its raw value via sysfs calls. cat /sys/bus/../in_accel_x.raw etc.. for all the channels. I want to enable interrupts now but I do not have sysfs attribute for it. How can one able to set a specific…
0
votes
1 answer

Yocto ad7768-1 device driver not creating device file

I am trying to create a custom Linux image with Yocto, for use with de10-nano and cn0540. However, after loading the correct device tree and enabling the device driver, no device file is created. dmesg shows nothing related to ad7768-1 or iio. The…
0
votes
1 answer

How to send data to two iio channels syncroniously?

I'm using AD9361 on FMCOMMS-3 board to control some optical setup. To do so I need to send one signal to the first device (x-axis acousto-optical deflector) and another signal to the second device (y-axis AOD). It is crucial, that the signals for x…
totikom
  • 181
  • 8