Doh! Broken USR button!

The official PYBD running MicroPython, and its accessories.
Target audience: Users with a PYBD
Post Reply
kesterlester
Posts: 21
Joined: Sat Nov 17, 2018 10:04 pm

Doh! Broken USR button!

Post by kesterlester » Sun Feb 07, 2021 1:21 pm

I don't know how or when I was clumsy, but somehow I broke my user button. See picture showing how the black rubber bit has come half out of the metal frame. I only need to use the button for one purpose: the magic combination of presses that allows me to dfu-util refresh to a newer version of micropython.

Ideas for a workaround?

(I don't want to press hard on the pybd because it's mounted on hone soldered wbus connectors whose strength I don't want to test .....)
082E982F-0708-4795-93BB-40B724EA255D.jpeg
082E982F-0708-4795-93BB-40B724EA255D.jpeg (103.38 KiB) Viewed 154 times

kesterlester
Posts: 21
Joined: Sat Nov 17, 2018 10:04 pm

Re: Doh! Broken USR button!

Post by kesterlester » Sun Feb 07, 2021 1:22 pm

Ps .. i should add that the device is in hard to reach position (upside down in a ceiling void) and difficult to remove!

User avatar
Roberthh
Posts: 2462
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Doh! Broken USR button!

Post by Roberthh » Sun Feb 07, 2021 1:28 pm

If you still have access to REPL, you can activate the dfu mode with:

import pyb
pyb.bootloader()

kesterlester
Posts: 21
Joined: Sat Nov 17, 2018 10:04 pm

Re: Doh! Broken USR button!

Post by kesterlester » Sun Feb 07, 2021 1:36 pm

No problem with access to REPL. Indeed, the button may have been broken for months for all I know. So I'll try your suggestion . Great to know that such a nice-sw only method is possible. I had no idea. Thank you!

kesterlester
Posts: 21
Joined: Sat Nov 17, 2018 10:04 pm

Re: Doh! Broken USR button!

Post by kesterlester » Sun Feb 07, 2021 1:46 pm

That was perfect. Worked a treat! I wonder if it would be a good idea to add a tiny comment mentioning this other method of flashing on https://micropython.org/download/pybd/ ? I took the instructions there to be the definitive ones for pybd firmware flashing, but they only mention the existence of the Vulcan death grip button presses.

In fact, the docs there say
you must enter the mboot DFU bootloader by holding down the USR button, pressing and releasing the RST button ...
(emphasis added by me) which is apparently not true! :D I guess it should really instead say something like:
if you have no access to the REPL you must enter the mboot DFU bootloader by holding down [TEXT ABOUT BUTTON PRESSES] ..... otherwise you can simply [INSERT TEXT ABOUT SIMPLE pyb.bootloader() METHOD]

Post Reply