GrovePI firmware update issue

Hi there,

I can’t use buttons nor encoders on my GroovePI, I suspect it comes from the firmware.
My GroovePI firmware version is 1.2.2, and I want to upgrade to 1.4.0

When I run the script sudo bash firmware_update.sh from /home/pi/Dexter/GrovePi/Firmware, I get the an error saying:
gpio/direction: No such file or directory

Full script output below:

pi@raspberrypi:~/Dexter/GrovePi/Firmware $ sudo bash firmware_update.sh
Updating the GrovePi firmware
=============================
 http://www.dexterindustries.com/grovepi 
 Run this program: 
 sudo ./firmware_update.sh
 
=============================
Do you want to update the firmware? [y,n]y
Make sure that GrovePi is connected to Raspberry Pi
Firmware found
Press any key to start firmware update
. . .
gpio/direction: No such file or directory

avrdude done.  Thank you.

gpio/direction: No such file or directory

avrdude done.  Thank you.

gpio/direction: No such file or directory

avrdude done.  Thank you.

gpio/direction: No such file or directory

avrdude done.  Thank you.

pi@raspberrypi:~/Dexter/GrovePi/Firmware $

I started from a fresh install using the recommanded RaspOS version, eg 2023-05-03-raspios-buster-armhf
I enabled SPI and I2C with raspi-config.

Any clue?

2 Likes

@jimrh is the only person to guide you on this topic. Perhaps a forum search with avrdude will find his posts.

1 Like

I will need to know which raspberry pi version are you using, what operating system, and which version of the GrovePi you are using.

  • What version of the Raspberry Pi are you using?

    • Pi-2 or earlier?
    • Pi-3?
    • Pi-4?
    • Something else?
       
  • Which operating system have you downloaded to your SD card?

    • Raspbian for Robots?
    • GoPiGo O/S?
    • Something direct from the Raspberry Pi site?
       
  • Which version of the GrovePi board are you using?

    • An “Original” GrovePi board?
    • A GrovePi+?

This can make a really big difference in what works and what doesn’t.

========================================

Update:

I need to learn to wear my glasses when I’m reading these forums! :man_facepalming:

In order to flash the grove firmware you will need:

  1. The latest Raspbian for Robots software flashed to an 8gig minimum sized SD card.
    https://www.dexterindustries.com/download/r4r_stretch

  2. A Raspberry Pi-3 or earlier.&nbsp: (A Pi-3/3+ is recommended though a Pi-2 will also work.)
    Note that you cannot use a Pi-4 to update firmware! [1] [2]

  3. The Grove board attached to the Raspberry Pi device.

You will then go into the control panel applet on the desktop and select “update firmware”.  (P.S.  I am doing this from memory, I haven’t flashed firmware on ANYTHING in years!)

If you run into trouble, let me know.

==================== Footnotes =====================

  1. The really-and-truly authorized software for the GrovePi/GrovePi+ is Raspbian for Robots.  You can try working with other self-installed versions, but they may or may not work depending on the positions of individual planets, stars, constellations, etc.  In other words:  Your Mileage May Vary.

  2. If you want to try using Raspbian for Robots (and a GrovePi/GrovePi+), with a Pi-4, there is an “experimental” version of Raspbian for Robots based on Buster that should work on the Pi-4.
    https://www.dexterindustries.com/download/r4r_buster
    Note that you still should not attempt to re-flash the firmware using a Pi-4 because it can “brick” your GrovePi board.  Even if it seems to allow it, DON’T!
     
    (There’s some interesting history about these releases if you or anyone else is interested.)

1 Like

Thanks, I’ll try with this distribution and I’ll keep you posted.
For reference, I tried with a Rasp 1 model B and a Rasp 3 model B, with a Groove Pi+, and with the distribution I mentioned in my first post.

2 Likes

I am assuming it’s a “home-brew” (curl’d) install and sometimes they have problems.  If your firmware is really as old as you say, once you get it updated it might work with the version you originally tried.

It will be interesting to see what happens when you get the correct version of the firmware installed.

2 Likes

Hi @jimrh
I’ve been able to update the firmware, thank you SO much!!
From the Raspbian for Robots distrib, I was able to upgrade from version 1.2.2 to 1.3.0
Then I upgraded to the latest 1.4.0 firmware.

I made some quick tests. The grove button which did not work with 1.2.2 works great, but not the encoder. The script starts, but it does not detect any change (I checked the port).

If anyone has any idea?

2 Likes

Tell me what you did.

I don’t remember the Grove board having a motor interface.  How did you hook it up?

1 Like

The encoder is this one: Grove-Encoder | Seeed Studio Wiki

And this is the code I’m trying to run: GrovePi/Software/Python/grove_encoder_read.py at master · DexterInd/GrovePi · GitHub

2 Likes

What port do you have it connected to?

What is the result of:

i2cdetect -y 1

I think the encoder should appear as 0x36 (but Google AI could be wrong…)

1 Like

@cyclicalobsessive the encoder is connected to port D2.

Output is:

$> i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          03 04 -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- 3e -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- 62 -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --               

(2 other devices are connected to i2c-1 and i2c-2)

2 Likes

Personally, I know nothing about the GrovePi+, or the encoder.

Sorry - bad advice. I don’t have a clue.

1 Like

I finally made it work, thanks to the Raspbian for Robots distrib, plus GrovePi+ firmware upgraded to 1.4.0, and latest GrovePi scripts from github.

2 Likes

Great job and excellent detective work!

Care to elaborate on the specific details of what you did?  This way the next poor sod who has this problem can learn from your efforts.

Thanks!!

1 Like

[SOLVED]
To update the GrovePI firmware, you have to use the official Raspbian for Robots distribution, with a Raspberry 3 (or less).
Don’t use a patched Raspbian.

2 Likes