Re: Linux Missing IIO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 26, 2020 at 9:38 PM Matt Wyatt <matt@xxxxxxxxxxxx> wrote:
>
> Hello,
>
> I am using a Raspberry Pi 3 and I am attempting to set up an ADC to
> the GPIO with I2C. I am following this
> tutorial:https://wiki.seeedstudio.com/4-Channel_16-Bit_ADC_for_Raspberry_Pi-ADS1115/
> for setup and the iio kernel seems to be missing because I cannot find
> the directory when running cd /sys/bus/iio/devices/iio\:device0/
>
> When running lsmod | grp adc I do not see anything related to iio
> either when the tutorial shows as such.
>

So, using RPi 3 with IIO is sometimes tricky to setup.
Every once in a while, it takes me a few hours just to remember the
debug steps with it.
Reason is: a lot of failures are silent, so there is no clear
indication of what & where it went wrong.

1. What version of the RPi distro are you using?
    Hopefully that's pretty recent.

2. Check i2c is working; either the wires are flaky or they're not
connected correctly.
    No idea.
    To do that, maybe disable the overlays in config.txt first so that
it isn't reserved by the kernel,
    and run i2cdetect -y 0 ( or 1 or 2); I can't remember which one it is.
    This will do a scan over the I2C bus and if the device is there,
it should show up.
    You can search for a few i2cdetect examples online, and also a few
catered for RPi.
    Notice that when i2cdetect shows a UU entry, that means it's
typically reserved by the kernel,
    which doesn't always mean that there is a device physically there.
    A double-dash entry -- means nothing is there, and not reserved by
the kernel.
    A numerical value means that there is a device there and isn't
reserved by the kernel.

3. RPi device-tree overlays are also tricky. When they fail, they're
also pretty silent most of the times.
   Make sure the file is present in /boot/overlays [when mounting the SD-card].
   It should be 'ads1115.dto'  or something like that.
   Now, I'll admit I haven't used IIO on the vanilla/official RPi kernel.
   We've typically rebuilt the kernel with IIO as builtin versus kernel-module.
   I have a vague recollection that i2c drivers may have had some
issues to probe as kmods.
   This may have been fixed.
   Check the dmesg log with grep to see that the device tried to
initialize but failed.
   [ example:  dmesg | grep ads11  ]


> I am new to this and would really appreciate some help!
>
> Thanks!
>
> --
> Matt Wyatt
> Manufacturing Systems Engineer
> matt@xxxxxxxxxxxx
> (703) 474-0933
>
> --
> bio*MASON*®
>
>
>
> *This message contains confidential information and is
> intended only for the individual named. If you are not the named addressee
> you should not disseminate, distribute or copy this e-mail. Please notify
> the sender immediately by e-mail if you have received this e-mail by
> mistake and delete this e-mail from your system. E-mail transmission cannot
> be guaranteed to be secure or error-free as information could be
> intercepted, corrupted, lost, destroyed, arrive late or incomplete, or
> contain viruses. The sender therefore does not accept liability for any
> errors or omissions in the contents of this message, which arise as a
> result of e-mail transmission. If verification is required please request a
> hard-copy version. bioMASON Inc., PO Box 110345, Durham, NC 27709,
> www.biomason.com <http://www.biomason.com/>*




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux