Multiple grove boards Errno121 Remote I/O error

Hi.

This code:

import grovepi3 
moisture = 0 #Moisture Sensor in A0
grovepi3.pinMode(moisture,"INPUT")
grovepi3.analogRead(moisture)

Results in this error:

grovepi3.analogRead(moisture)
 File "/usr/local/lib/python2.7/dist-packages/grovepi3-0.0.0-py2.7.egg/grovepi3.py", line 165, in analogRead
IOError: [Errno 121] Remote I/O error

Analogous code with the same sensor on the other grove pi (default configured (4)) works ok without error.

Any clues?

Thanks.

Hi @wdjong,

I donā€™t think we have a GrovePi3 board yet.

So, can you tell us what itā€™s grovepi3 module made of?
Iā€™m asking this because our module is called grovepi.

Also, please tells the following:

  • Are you using Raspbian For Robots or have you installed all these on a fresh Jessie image?

  • How is the GrovePi board connected to your Raspberry Pi - a photo should do the job.

  • Can you run the GrovePi's troubleshooter and post here the output file?

Thank you!

Hi Robert,
My friend wdjong has been helping me with troubleshooting on my project
So I am responding to your request for information regarding the above issue
Iā€™ve updated the firmware on my GrovePi board since Iā€™m using multiple boards to I2C address 03
Iā€™ve been using the grovepi3 for addressing the ports on this board as per the DexterInd site
https://www.dexterindustries.com/GrovePi/programming/using-multiple-grovepis-together/
However, the analog ports A0//1/2 are giving me errors.
The digital and I2C ports seem to be fine.
As instructed Iā€™ve run the troubleshooting complete_test.sh & generated the attached log.txt fyi
Iā€™ve also attached an image of my setup.
I have four ModMyPi relay boards connected directly to my RaspberryPi board and then connect my Grove boards via a ribbon cable

Check space left
================
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        28G  4.6G   22G  18% /
devtmpfs        458M     0  458M   0% /dev
tmpfs           462M     0  462M   0% /dev/shm
tmpfs           462M  6.4M  456M   2% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           462M     0  462M   0% /sys/fs/cgroup
/dev/mmcblk0p6   65M   21M   45M  33% /boot
tmpfs            93M     0   93M   0% /run/user/1000
/dev/mmcblk0p5   30M  449K   28M   2% /media/pi/SETTINGS

Check for dependencies
======================
python 2.7.9-1 install ok installed
python-pip 1.5.6-5 install ok installed
git 1:2.1.4-2.1+deb8u3 install ok installed
libi2c-dev 3.1.1+svn-2 install ok installed
python-serial 2.6-1.1 install ok installed
python-rpi.gpio 0.6.3~jessie-1 install ok installed
i2c-tools 3.1.1+svn-2 install ok installed
python-smbus 3.1.1+svn-2 install ok installed
arduino 2:1.0.5+dfsg2-4 install ok installed
minicom 2.7-1+deb8u1 install ok installed
scratch 1.4.0.6~dfsg1-5 install ok installed

wiringPi Found
wiringPi Found
I2C still in blacklist (ERR)
SPI still in blacklist (ERR)


Check for addition in /modules
==============================
I2C-dev already there
i2c-bcm2708 already there
spi-dev already there


Hardware revision
=================
gpio version: 2.36
Copyright (c) 2012-2015 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty

Raspberry Pi Details:
  Type: Pi 3, Revision: 02, Memory: 1024MB, Maker: Sony 
  * Device tree is enabled.
  *--> Raspberry Pi 3 Model B Rev 1.2
  * This Raspberry Pi supports user-level GPIO access.


Check the /dev folder
=====================
i2c-1
ttyAMA0

USB device status
=================
Bus 001 Device 007: ID 0eef:0001 D-WAV Scientific Co., Ltd eGalax TouchScreen
Bus 001 Device 006: ID 045e:00cb Microsoft Corp. Basic Optical Mouse v2.0
Bus 001 Device 005: ID 1c4f:0002 SiGma Micro Keyboard TRACER Gamma Ivory
Bus 001 Device 004: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/5p, 480M
        |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=smsc95xx, 480M
        |__ Port 2: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
            |__ Port 3: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
            |__ Port 4: Dev 7, If 0, Class=Vendor Specific Class, Driver=usbtouchscreen, 1.5M
            |__ Port 2: Dev 5, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
            |__ Port 2: Dev 5, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
Raspbian for Robots Version
===========================
cat: /home/pi/di_update/Raspbian_For_Robots/Version: No such file or directory


Hostname
========
raspberrypi


Checking for Atmega chip
========================


avrdude: Version 5.10, compiled on Jun 18 2012 at 12:38:29
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/etc/avrdude.conf"
         User configuration file is "/root/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : unknown
         Using Programmer              : gpio
         AVR Part                      : ATMEGA328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65     5     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : GPIO
         Description     : Use sysfs interface to bitbang GPIO lines

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x000100
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
         Double check chip, or use -F to override this check.

avrdude done.  Thank you.


Checking I2C bus for devices
============================

Checking I2C bus 0
==================
Error: Could not open file `/dev/i2c-0' or `/dev/i2c/0': No such file or directory

Checking I2C bus 1
==================
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          03 -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         

Checking for firmware version
=============================
Traceback (most recent call last):
  File "/home/pi/Desktop/GrovePi/Software/Python/grove_firmware_version_check.py", line 40, in <module>
    print("GrovePi has firmware version: %s" %grovepi.version())
  File "/home/pi/Desktop/GrovePi/Software/Python/grovepi.py", line 265, in version
    return "%s.%s.%s" % (number[1], number[2], number[3])
TypeError: 'int' object has no attribute '__getitem__'

Hi @Greg_Norvill,


Could you use one GrovePi at a time and check each of them (again, one at a time) if they are functional?
By dividing the test into smaller components, we can determine if thereā€™s a hardware issue with one of the GrovePis.

So, basically, Iā€™m suggesting you run the troubleshooter for each individual GrovePi and then post here the result.


By the way, I cannot see any photo of your setup.
Maybe you can take a look at your post and see where the photo was lost.


Thank you!

1 Like

Thanks Robert,
I have run the complete_test.sh on both boards separately as suggested & generated log3 for the grovepi3 and log4 for the grovepi(default address 04)
Iā€™ve attached an image of my setup with both boards stacked & connected to my RPi via a ribbon cable off the top of 4 ModMyPi relay boards which I;m using for outputs.
I noticed in the grovepi3 log that the ā€˜Checking for firmware versionā€™ delivered an error. Does this mean the board is damaged & if so is it repairable.
Thanks Greg
PS Iā€™ve included only 1 attachment as I get a post error
IMG_0082

Log files as referenced
log3.txt (6.8 KB)

log files attached
log4.txt (6.4 KB)

Hi @Greg_Norvill,

Iā€™ve tested 2 GrovePis stacked together on a Raspberry Pi and it worked using the code youā€™ve been having issues with.

I noticed in the grovepi3 log that the ā€˜Checking for firmware versionā€™ delivered an error. Does this mean the board is damaged & if so is it repairable.

Your board is fine. The reason you got this message is because the firmware checker only checks at address 0x04 and not 0x03.

I think we should try something else:

  • The GrovePi that is found at address 0x04 (and which works with the code youā€™ve shown us), please reflash it so that it points to address 0x03.

  • The GrovePi that is found at address 0x03 (and which doesnā€™t work with the code youā€™ve provided), please reflash it so that it points to address 0x04.

By doing it so, we can rule out the hardware issue.
If the other board will fail at address 0x03, then it means the multi_grovepi_installer didnā€™t install correctly. In contrast, mine worked.

Thank you!

Robert, as requested I reflashed the GrovePi 03/04 boards as suggested.
I also set up the boards on an independent RPi without any of my ModMyPi relay boards to eliminate this component as well.
I ran the script below again with moisture sensors on A1 on both boards & got the attached error
Thanks G

import time
import grovepi #GrovePi with address 4
import grovepi3 #GrovePi with address 3

# Connect the Grove Moisture Sensor to analog port A1 on both grovepi/grovepi3
moisture = 1

# set pin mode to input
grovepi.pinMode(moisture,"INPUT")
grovepi3.pinMode(moisture,"INPUT")

# read moisture value from moisture sensor
while True:
    grovepi.analogRead(moisture)
    # Read the value on the moisture sensor on the grovepi with addr 4
    grovepi3.analogRead(moisture)
    # Read the value on the moisture sensor on the grovepi3 with addr 3
    time.sleep(2)

    # print the values from either moisture sensor on grovepi/grovepi3
    try:
        print grovepi.analogRead(moisture)
        print grovepi3.analogRead(moisture)

    except KeyboardInterrupt:
        print "Error"
    except TypeError:
        print "Error"
    except IOError:
        print "Error"
IOError
Traceback (most recent call last):
  File "moisture.py", line 15, in <module>
    grovepi.analogRead(moisture)
  File "/home/pi/Desktop/GrovePi/Software/Python/grovepi.py", line 227, in analogRead
    return number[1] * 256 + number[2]
TypeError: 'int' object has no attribute '__getitem__'

Hi @Greg_Norvill,

Can you confirm me that in your ā€œexperimentsā€ you switched the addresses of the GrovePis? Like the one that was at address 0x03 was changed to 0x04 and vice-versa for the other GrovePi board.
If this is what you did, then we can proceed to the next paragraphs.


It looks like the hardware is alright since now itā€™s the other way around.
I think some step was missed at some point or something didnā€™t get through - I say this because my setup works and because your GrovePi boards are fine.


Hereā€™s what I think we need to do:

  1. Start clean again. Like flash another micro SD Card with Raspbian For Robots on it. Also, make sure to have the latest updates on Raspbian For Robots. Youā€™ll need to use the DI Update tool (itā€™s found on the Desktop) and update the GrovePi software.

  2. Use the multi installer tutorial again, but walk-through it with more care. Tell us every step you did and how you did it.
    The target is narrowing down the possibilities as much as we can.

  3. Run i2cdetect -y 1 and tell us what you see.

  4. Run the following code snippet (and then show us the output):

import grovepi
import grovepi3

try:
    fw = grovepi.version()
except TypeError:
    fw = 0

try:
    fw3 = grovepi3.version()
except TypeError:
    fw3 = 0

print("grovepi firmware check: {}".format(fw))
print("grovepi3 firmware check: {}".format(fw3))


Letā€™s see what we get out of this.
Also, we appreciate a lot having lots of details posted on here.
Even details that might seem obvious to you, to some other it might not. I think the word Iā€™m looking for is excruciating detail.

Thank you!