Badger unresponsive after installation of badger2040-v1.19.6-micropython

I think I’m going to have to confess myself defeated for the moment by badger and thonny. With badger2040 USB type C connected into my laptop (running Ubuntu 22.04.1) I get the Clock/Fonts/eBook screen. The LED is illuminated.

Holding down badger’s boot button and pressing its reset button attaches badger as a storage device RPI-RP2. I’ve downloaded the latest pimoroni-badger2040-v1.19.6-micropython.uf2 and I copy this across to the root of RPI-RP2 and hit the badger’s boot button. The RPI-RP2 drive disconnects (as expected) and I’m left with badger’s Clock/Fonts/eBook screen and the illuminated LED.

Expected behaviour: Badger’s a b and c buttons should take me into Clock, Fonts, eBook respectively. Actual behaviour: the buttons do nothing. Pressing the reset button switches off the LED but on release there’s no change of state. Power-cycling: same result.

Holding down the boot button and pressing the reset button puts the badger back into storage mode and RPI-RP2 reappears as a drive.

====Getting Started with Badger 2040

USING BADGER OS
You can navigate around the launcher using the up and down arrows, and select an example by pressing A, B, or C. To return to the launcher when you’re done with an example, press buttons A and C at the same time.

Hold BOOT whilst pressing up or down to adjust the font size, or hold BOOT whilst pressing A to toggle dark mode

====

None of this does anything. Badger’s buttons remain inert. I’ve tried
connecting with thonny but:

Unable to connect to /dev/ttyACM0: [Errno 13] could not open port /dev/ttyACM0: [Errno 13] Permission denied: '/dev/ttyACM0'

Try adding yourself to the 'nfsnobody' group:
> sudo usermod -a -G nfsnobody <username>
(NB! You may need to reboot your system after this!)

Backend terminated or disconnected. Use 'Stop/Restart' to restart.

I can’t make any sense of the nfsnobody instruction. Presumably it applies to badger’s operating system (the nfsnobody group is unknown by Ubuntu) but the thonny display area marked “shell” seems not to accept commands.

Helpful suggestions would be very welcome.


Chris

Try 1.19.7! I think there was a bug in 1.19.6 where the Badger with Badger OS image didn’t have the built in examples.

I got that error too when first using a Pico board with Ubuntu - I think it’s to do with how Linux handles permissions on USB devices. Running the suggested command in the Ubuntu terminal sorted it for me.

Thanks, @hel. Updating to 1.19.7 fixed the badger. And using Windows I was able to update the badge text using thonny.

However, the thonny problem in Ubuntu persists. To make the usermod command make sense, I of course had to create a new user group called “nfsnobody” (the documention could usefully be edited to reflect this, if indeed this is the solution. But see below.). But even after a system reboot I get the same error when launching thonny:

Unable to connect to /dev/ttyACM0: [Errno 13] could not open port /dev/ttyACM0: [Errno 13] Permission denied: '/dev/ttyACM0'

Try adding yourself to the 'nfsnobody' group:
> sudo usermod -a -G nfsnobody <username>
(NB! You may need to reboot your system after this!)

Backend terminated or disconnected. Use 'Stop/Restart' to restart.

As /dev/ttyACM0 belongs to root and the group dialout I’m not clear how creating the group nfsnobody is intended to help.

flatpak installed apps aren’t intended to be run as sudo but you can get away with running su -i and then /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=thonny --file-forwarding org.thonny.Thonny.

There must be a more elegant fix, surely?

LATER THAT SAME DAY

Something I hate has happened. A fix seems to have appeared out of the blue.

I uninstalled the flatpak version 3.3.13 of thonny in order to explore the apt version, that happens to be 3.3.14. In subsequent messing I removed the apt version and reinstalled the flatpak version.

Which now seems to run with no fuss whatsoever without resorting to sudo -i, I have no idea what’s going on here.

( I should add that my testing so far goes no further than being able to switch the badger.led on and off. I’m assuming that’s enough to verify that the connection is working properly.)


Chris

1 Like