Closed HeyLlama closed 3 years ago
https://github.com/pybricks/pybricksdev/blob/master/README_dfu.rst This saved me. Thank you π
Thanks for sharing this.
What happened when you tried a short press (~half a second)? Did Pybricks come on straight away? Or did nothing happen at all?
If you ever feel like trying this again, it would be great to know what happens if you power on by plugging in USB, instead of pressing any buttons. The expected result is the same as a short press, so stock firmware.
For your information, we intend to implement the DFU recovery step in our online app so users won't have to install anything. That's why the Prime Hub / Inventor Hub is not in beta just yet for now.
I'll try again tonight now I know how to restore the stock OS :)
Half a second short press didn't boot up anything. Nor does plugging in USB.
One red flag was after flashing Pybricks, my hub rebooted Pybricks instead of stock firmware. I'll let you know if I could reproduce this behaviour.
Cheers
I can confirm this. Thanks a lot for highlighting this issue.
I think we will update that installation guide with a link to a fixed version that is known to work, instead of the latest build, just in case.
I'm rolling back a few changes to make one that works.
Thank you!
Can you try it with [this build]? EDIT: link removed. Working link below.
That would be super helpful - thanks!
When you open the new file, you should see the version in the comments at the top. Just to make sure, the new version is:
# Version: v3.0.0a13-7-g97e3745a
Will do! I'll let you know
Cheers
Unfortunately, the build you provided did not work either. Same behaviour, no reboot at all this time after the bluetooth light blinked pink-green-blue. No reaction from plugging in USB cable nor short press. Long press does boot Pybricks tho. I'm starting to suspect if this has anything to do with the newest firmware update from MINDSTORMS. Perhaps they changed the bootloader?
This was the console output from the app.
Thanks for looking into this. This is interesting. This build did work for me, so Iβd have to dig a bit deeper to see what could cause it.
Good reason to expedite the work on the easy installer and recovery from within our online app π
Can't wait for the beta release! Thank you for the hard work π
I ran the download program again and this showed up in the console. Looks like there was an error before the installation program.
This is the expected output for the download program. Itβs a lot of data that doesnβt do anything by itself.
The installer then reads it as a text file. Line by line instead of all at once to avoid that memory error.
Gotcha. Thank you!
To get a taste of the easier recovery, check out this page.
For vendor ID, choose 0x0694
:
Put the hub in DFU mode:
Click connect. Then select this one from the popup:
After connecting, choose this from the given options:
You can use the default for everything else. Then select the firmware file (You can find them here) and click download.
The only caveat is that some sort of USB driver must already be installed or access to the USB device must be given. For Windows this one works.
Hello, my name is Daniel. I am a beginner and I flash the pybricks firmware on my lego inventor hub with the original lego software for use in Linux. The dual boot dosn't work any more with the new firmware from pybricks. Can you tell me easy and exact steps to flash a new firmware on the inventor hub with dual boot, or restore the original lego firmware. Thank you!
Thanks Daniel. Yes, weβll give you step by step instructions. Specifically which OS do you have?
Iβm also going to temporarily close the beta on the dual boot, until we document the restore step a bit better. Thank you both for highlighting this.
Hello, my name is Daniel. I am a beginner and I flash the pybricks firmware on my lego inventor hub with the original lego software for use in Linux. The dual boot dosn't work any more with the new firmware from pybricks. Can you tell me easy and exact steps to flash a new firmware on the inventor hub with dual boot, or restore the original lego firmware. Thank you!
Hi Daniel, I'm running MacOS so if you have other unix based system this method should work too.
Follow the steps to install pybricksdev https://github.com/pybricks/pybricksdev
Make sure poetry and pyenv are installed. And you'd need dfu-util too. Iβd recommend homebrew for installing these packages: https://brew.sh/
Pick a newer firmware (1.0ish) from the firmware folder and download (.bin), rename to a simpler name if you will https://github.com/gpdaniels/spike-prime
This shows you how to get into DFU mode https://github.com/gpdaniels/spike-prime/blob/master/firmware/README.md
To check if your hub is connected, use this command: sudo dfu-util --list
Finally, to restore the stock firmware: https://github.com/pybricks/pybricksdev/blob/master/README_dfu.rst
Remark: remember to cd into pybricksdev before calling the restore command
Thanks for helping out @HeyLlama --- much appreciated.
If you want to try it, I'm curious to hear if the web page above works on Mac. I've confirmed it on Windows and Linux.
If it works on all platforms, this maybe a bit easier for most people, compared to installing pybricksdev
.
Daniel, feel free to ask if you need any additional help.
Hmm...I can't seem to find 0x0694 in the Vendor ID list on MacOS. Hub was indeed in DFU mode since I see it in the dfu-util --list OS version is Catalina 10.15.7 Chrome version 87.0.4280.141
You can just type it in. The listed devices (dapboot, mbed) are only (apparently frequently used) suggestions.
Yes I need more help! I tried to install poetry and a runtime error appares! daniel@PC-Stift:~$ poetry install
RuntimeError
Poetry could not find a pyproject.toml file in /home/daniel or its parents
at .local/lib/python3.8/site-packages/poetry/core/factory.py:367 in locate 363β if poetry_file.exists(): 364β return poetry_file 365β 366β else: β 367β raise RuntimeError( 368β "Poetry could not find a pyproject.toml file in {} or its parents".format( 369β cwd 370β ) 371β )
Poetry is now installed correctly! The error above is when I type poetry run pybricksdev udev | sudo tee /etc/udev/rules.d/99-pybricksdev.rules
Poetry could not find a pyproject.toml file in /home/daniel or its parents
Did you download (or clone) pybricksdev? You need to be in that folder before calling poetry install
. Then it can find the required files.
Hey Daniel! Try this one instead: https://devanlai.github.io/webdfu/dfu-util/ You'd just need the .bin firmware for this one. Much easier. Thank you! @laurensvalk
I guess that confirms it works on Mac too :smile: Thanks!
whitch vendor id can I use!
whitch vendor id can I use!
Type in 0x0694 and select the Lego option PS make sure your hub is in DFU mode
Daniel, check out this post above which has some screenshots for guidance.
I shows SecurityError: Access denied.
At which step does it show that?
After I tried to connect!
Would you like to move over to this discussion forum here?
@HeyLlama, I think I was able to reproduce it. It was due to two distinct issues so it took a while to find it. I would be greatful if you want to test this build. (v3.0.0a13-5-g9a80bef6).
@HeyLlama, I think I was able to reproduce it. It was due to two distinct issues so it took a while to find it. I would be greatful if you want to test this build. (v3.0.0a13-5-g9a80bef6).
Excellent! I'll let you know :D
v3.0.0a13-5-g9a80bef6 works! Thank you so much!!
Yes! :rocket: Thanks for the help.
I've updated #167 to use this version instead of the latest build, just to be safe. Latest builds are only for those who know how to use recovery mode, which now includes you :wink:
@HeyLlama, @danielgaertner: https://dfu.pybricks.com/
@HeyLlama, @danielgaertner: https://dfu.pybricks.com/
Can confirm it works :D
The firmware zip file also contains the .bin file for Pybricks, by the way. That will give you the regular boot instead of dual boot.
I installed build # 838! No dual boot possible! Only Pybricks! In future I will use a older build!
I tried to restore the original lego firmware with
"poetry run pybricksdev dfu restore ~/Downloads/96112deb24a934bfc19a13c7ea620f54.bin"
and the error "dfu-util: Invalid DFU suffix signature dfu-util: A valid DFU suffix will be required in a future dfu-util release!!! dfu-util: No DFU capable USB device available"
appiers!
Now it works! I have not put the hub in DFU Mode!
You can also restore the original firmware with that website. It's just a convenient alternative to pybricksdev
.
Thanks for sharing that it is working for you.
I have "successfully" flashed ('primehub', '3.0.0a13', 'v3.0.0a13-1-g2aa1cfef on 2021-01-08') into my inventor hub. At least the Mindstorms app was saying it was successful.
It did reboot right after flashing but it was booting up pybricks instead of standard firmware as stated in #167 . Tested https://code.pybricks.com/ on Chrome, that works.
I tried both short press and long press. It was all pybricks for some reason. I'm not sure how to access standard firmware to charge the battery...Please help : (