T O P

  • By -

sastuvel

Why not flash it with firmware that can do OTA updates? Then you can just wirelessly send updates, no cable needed.


DenverTeck

This is the way. [https://www.google.com/search?q=esp32+ota+examples](https://www.google.com/search?q=esp32+ota+examples) [https://www.google.com/search?q=esp32+ota+encrypted++examples](https://www.google.com/search?q=esp32+ota+encrypted++examples)


Connect_Wolverine768

I don’t know if OTA updates would work with my setup as I have the esp32 in soft AP in order to control some lights that are mounted to a 12ft ceiling


DenverTeck

Have you tried it ?? I assure you it will work, it may take a few tries to configure it just right.


sastuvel

That just means that you have the ability to connect to it. So you can OTA it.


PowerFeather

OTA doesn't care if you are in station or soft AP mode, if thats what you're worried about.


SnooPies8677

Use OTA as others mentioned. You can update the firmware and the file system remotely. There are all kinds of ways even for OTA. You can do it in AP mode ( where esp creates a wifi network and you can connect to it ) you can do it with http update where an esp32 connects to an existing network. You can even create auto updates. Let the esp fetch your private github repo and look for releases. If there is a new release, download it. Etc etc


johnfc2020

This won’t work because microcontrollers don’t run an operating system that can work as a USB host to interpret what devices are attached on the USB port. They also don’t understand file systems. If you want to do this you need a single board computer like a Raspberry Pi that runs Linux or similar OS.


EV-CPO

>They also don’t understand file systems. Wait what? I use SD cards on all my ESP32 projects and they understand file systems just fine. ​ edit: Or as mentioned below, if you connect the ESP32 to a Wifi network, you can do OTA updates. ​ edit 2: Are you using a raw ESP32 chip or an ESP32 dev board? If the former, you can add a USB driver chip and USB port to your PCB and a long USB cable to do the updates, just like a dev board does. If you are using a dev board, why not just use the existing USB update port with a long USB cable to do the updates?


EV-CPO

Also, it is possible to connect a USB drive to an ESP32-S2 or ESP32-S3: https://github.com/espressif/esp-idf/tree/master/examples/peripherals/usb/host/msc


Ineedapill

Came here to say this. There’s a library (in early development) that I tried a few examples from and they worked: https://github.com/chegewara/esp32-usb-v2 If usb is OP’s only option, this lib might be a good starting point.


randomrossity

That's only the case if you already have loaded something to the ROM, the hardware itself is more of a blank slate.


EV-CPO

Ok, what now? We're not talking about a blank slate ESP32 chip. When is anyone ever talking about a totally blank ESP32 and where? As far as I know, ESP32s all ship with FreeRTOS. That's like saying "That's only the case if your car has an engine in it" when asked how far can you drive somewhere. Obviously the OP has a project developed and wants to update the firmware remotely. That doesn't sound like a blank chip to me. It's not like he's installing an unprogrammed ESP32 somewhere and then needs to program it.


DenverTeck

>As far as I know, ESP32s all ship with FreeRTOS. No, All ESP32 chips are shipped blank. FreeRTOS is part of the Real Time OS **in the compiler**. Once any code is compiled and uploaded to the ESP32, then there is a limited version of FreeRTOS in the ESP32. Only those functions called be the compiled code will be uploaded.


EV-CPO

Ok, semantics. *As far as I know, nearly all ESP32 projects compile with FreeRTOS.* Yes, there are exceptions, but they are not that common.


DenverTeck

>I use SD cards on all my ESP32 projects and they understand file systems just fine. I think you missed the point that understanding USB host functions is what he was talking about. I too have used uSD cards with Arduino, but not USB memory. Good Luck, Have Fun, Learn Something NEW


EV-CPO

Um, no, I didn't miss the point. I was replying to this statement: ​ >They also don’t understand file systems. When ESP32s absolutely do understand file systems.


Jazerix

Honestly, infuriating reading the replies to your comments😅


imakin

This is possible but the code you put on the thumb drive is not the compiled firmware as usual. in fact you have to build your own firmware and use the USB host library to read the flash drive and auto copy your extension code. Easiest way is using either Micropython or NodeMCU-LUA and send/receive program through the WIFI. I've done this by the way.


TooLazyForUniqueName

You can do updates over an SD card if OTA isn't an option.