Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

possibly bricking esp32-h2 thread border router #2212

Closed
lattice0 opened this issue Sep 23, 2024 · 10 comments
Closed

possibly bricking esp32-h2 thread border router #2212

lattice0 opened this issue Sep 23, 2024 · 10 comments
Labels
bug Something isn't working status:needs-attention This should be prioritized

Comments

@lattice0
Copy link

I tried creating a template project for esp32-h2 and after the first flash on this board on the esp32-h2 chip, it stops appearing as a usb device on linux. It keeps reconectting and appearing in the list of usb devices for 2 seconds only.

I first thought it was a problem with my board so I tried on another identical one and got the same problem

S153473feff21401e808ebba213eba589j

Did I do something wrong? I though it was a defect of the first board, but both behave like this.

I don't know if this is an official product, but at least the embedded esp32-h2 is. I also have standalone esp32-h2 which worked without any problems, so I wonder what is happening exactly

Link for the board https://pt.aliexpress.com/item/1005005232242277.html?gatewayAdapt=glo2bra

@lattice0 lattice0 added bug Something isn't working status:needs-attention This should be prioritized labels Sep 23, 2024
@bugadani
Copy link
Contributor

You may just be missing this feature

@lattice0
Copy link
Author

@bugadani so now that I already pushed the code without it, I cannot fix and it's bricked forever? Because it's rebooting before I can do anything with it.

Also, this does not happen with a standalone esp32-h2 devkit, it only happens with the thread border router with esp32-h2

@Dominaezzz
Copy link
Collaborator

You can start it up in bootloader mode. Press and hold the boot button, then click the reset button, then let go of the boot button.
This will let you flash a new program, regardless of what the previous one was doing

@bjoernQ
Copy link
Contributor

bjoernQ commented Sep 23, 2024

Holding the BOOT button while pressing and releasing RESET should get you into download mode and you should be able to re-flash

That feature (usb-phy-enable) currently isn't supported on H2 unfortunately

I guess you are not experiencing this with the DevKit because it's connected via UART bridge while in the border-router it's connected via JTAG/serial

Ah my typing was a bit slow

@lattice0
Copy link
Author

@bugadani wifi is not supported on the h2, but I did add the dependency anywasy


esp-wifi = { version = "0.8.0", features = [
    "esp32h2",
    "phy-enable-usb",
    "embedded-svc",
    "wifi-default",
] }

and got


 --- stderr
  thread 'main' panicked at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp-wifi-0.8.0/build.rs:51:9:


          WiFi is not supported on this target.

@lattice0
Copy link
Author

@bjoernQ indeed I was able to enter download mode. What can be done now?

@lattice0
Copy link
Author

Ok, I don't know why it stuck on download mode but I was able to make it flash again after pressing reset or something like that.

What is ˋphy-enable-usbˋ for? It looks like now I can see the UART output

@bjoernQ
Copy link
Contributor

bjoernQ commented Sep 23, 2024

ˋphy-enable-usbˋ would allow USB to continue to work when the radio peripherals are enabled - but if you didn't use Bluetooth or IEEE802154 that wasn't the problem. Good to hear you are able to flash new firmwares again

@lattice0
Copy link
Author

@bjoernQ but I was able to listen for packts in IEEE802154 and print over the usb on both the thread border router h2 and standalone h2

@MabezDev
Copy link
Member

Seems like this is resolved - closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working status:needs-attention This should be prioritized
Projects
Status: Done
Development

No branches or pull requests

5 participants