Sensecap D1 openhasp flashing error

Hi there, I’ve had to return a wt32-sc01 due to flashing issues, and now have a Sensecap D1, and looking to install openhasp on it.

I’ve been trying to flash it using the nightly development build, and when clicking install and selecting the device plugged in via USB (usbmodem144201) and selecting install openhasp, then ok to fully erase, it loads for about 3 seconds then comes up with:

Failed to initialize. Try resetting your device or holding the BOOT button while clicking INSTALL.

I’ve also tried flashing using and get:

sudo --port /dev/tty.usbmodem144201 flash_id v4.7.0

Serial port /dev/tty.usbmodem144201


A fatal error occurred: Failed to connect to Espressif device: No serial data received.

For troubleshooting steps visit: Troubleshooting - ESP32 - — latest documentation

THEN trying to do via esphome flasher tool, I open the log on the usbdevice and see:

Using ‘/dev/cu.usbmodem144201’ as serial port.
Showing logs:
[20:59:03]--------- start measure 271-------
[20:59:03]sensor sgp40: Error trying to execute measureRawSignal(): Error writing to I2C bus
[20:59:03]sensor scd4x: Error trying to execute readMeasurement(): Error writing to I2C bus
[20:59:03]grove adc: 189,180

I feel like there is some sort of permission issue on my Mac from stopping this from working? I’ve tried multiple usb cables and having no luck at all with being able to flash this!

Hey Tom,

What happened when you tried holding the BOOT button when you clicked INSTALL, any changes?

Could you let us know what installation instructions you followed. I found this guide from openHASP:

Was this the one you followed?

If you could give us some more information about the documentation you followed there may be something in that to help us out.


Hey Sam, thanks for the reply!

The Sensecap D1 doesn’t actually have a BOOT button on it.

And yep, had followed that link you’ve posted using the web interface both via the nightly build page (holding BOOT button error eventuates via that process), but also tried flashing firmware using esptool method as well (and I get same outcome as the script version I’ve put in my comment above)

I’m thinking this could be a Mac issue perhaps? Last year I’d been able to flash esp32 modules before successfully with ESPHome for Home Assistant via the web interface, but for some reason i can’t get this going. Is there anything else you think I share with your to help resolve this?

1 Like

Hey Tom,

Sorry for that oversight, I was thinking ESP32 board by itself which is not what you have available to you.

Looking into this problem it seems like the Sensecap D1 should go into flashing mode automatically on startup and then switches out of this mode after a certain amount of time.

From what I could find from other people reporting this issue it seems like the web interface can be problematic as the device can timeout of flashing mode before the web tool has completed its operation.

My suggestion would be:

  • long press the top button on the D1 for 10 seconds to perform a factory firmware reset as shown in this documentation.

  • Then attempt to flash the device as soon as you can afterwards.

Some people on this forum thread had luck using non web based flashers (although it seemed inconsistent) so I would stick with those for future attempts.

It seems like this is a common problem people encounter running openhasp on these Sensecap D1’s with no consistent solution so hopefully you have some luck.

Hope this helps!

1 Like

Hey Sam, still no luck keeps timing out and getting same errors, however I did follow THIS and I’ve got the device showing up as a device in my Mac finder, and I’ve got it recognised in my Arduino IDE app, but not showing as a /dev/tty device when trying to flash via any web flasher… I cant find a way to flash a bin file either via Finder or via Arduino though - any thoughts on how I can get there from here?

1 Like

having a look at images of your device, I see it has 1 usb connector (and 2 other pin break outs). From what I have read, inside the box is an ESP32 and RP2040. the block diagram shows it having a USB Hub inside with the ESP32 off that hub to a usb-uart (as you would expect), but I cant really tell if the auto boot mode/reset circuit is there. But it does seem that one button is for the ESP32 and the other is for the RP. the image also shows 2 usb ports, are both for power and comms and is one just for power ?

src: SenseCAP Indicator D1Pro Review - An ESP32-S3 & RP2040 IoT devkit with a 4-inch display, LoRa connectivity, sensors - CNX Software

1 Like

Thanks Michael, yep, unscrewed it and obviously looking identical to this. I did also try both usb ports to flash via various methods and getting same error. I’ve asked on the github forum about where GPIO 0 is located as I cant seem to find that but did note its within the usb port. So not sure how I can lnk GND and GPIO 0, but as mentioned I’ve managed to get it showing as a usb device by holding down the RP2040 boot button when plugging in. Cant see an ESP32 boot button in there though :expressionless:

1 Like

Base on where i see the “dot” on the ESP32 chip in that image, I rotated his to match.

Since there is a USB HUB and then a USB for the RP and one for the ESP32, I would expect to see an serial port show up for each.

Normally the Enable/Reset and GPIO0 are connected to some little bit of circuit such that the pins or set via the RS232 pins. If that was done, you should not need to hold any buttons etc.

What Im not sure of is whats wired up as there is 2 ways to upload firmware (that I can see)

So a little checking may be needed to find if its the built in or the UART that is wired up.

1 Like

Hi All,

@Tom252062 Its probably worth reaching out to the creators/a dedicated forum for openHASP on programming this through a Mac.
If you have access to a windows machine its probably also worth trying.

@Michael99645 The S3 and other new variants have the USB peripheral connected to that similar reset circuit internally, allowing USB flash to happen without having to press and hold the boot button, pretty cool since Thonny also includes all variants - ESP32 + Micropython is super accessible (though when passing through onboard USB Hubs this can throw a spanner in the works)


Hey Tom,

Seems like Liam may be correct on this one, while Mac devices are commonly used to upload to an ESP32’s it may be an issue with how their website uploads code and compatibility with WebUSB or WebSerial. I am not sure if you have tried any alternate browsers, but that may be an option there too?

Using a widows machine (If you have access to one) may be the first best step to getting this one fixed up for you.


Hi everyone, thanks for all your feedback on this. I’ve since tried it on a windows computer and getting some strange error when trying to flash (see link HERE on openhasp github), however I’ve successfully flashed other ESP32 devices via browser though…I’ve also got nowhere with using Visual Studio Code (getting compiling errors, which I can share logs here too), and since trying again with ESPHome flasher tool, I get the recurring error messaging after it looks to successfully flash being 0xffffff, and now the sensecap wont even turn on at all.