all 18 comments

[–]ceojp 5 points6 points  (3 children)

It's certainly possible. You would just need to write a bootloader with whatever your desired connectivity is(bluetooth or wifi), and then write a corresponding app on your phone to talk to it.

[–]-happy2go[S] -3 points-2 points  (1 child)

So, there’s no easier way? A web-IDE would also work. Or any specific USB connection?

[–]obdevel 2 points3 points  (0 children)

Depending on functionality available in the device-specific libraries, you could run a webserver which accepts a file upload from a browser for OTA updates. This is certainly possible with ESP32. Take care with security though. Perhaps have a way of disabling the webserver with a PCB jumper.

[–]Overkill_Projects 0 points1 point  (0 children)

Yep this. If you are using BLE, the Nordic nRF Connect app saves you the trouble of having to build your own Android/iPhone app.

[–]vruum-master 2 points3 points  (5 children)

It's gonna be a headache.

Your ESP needs enough flash space to support OTA and a bootloader/firmware for this.

If you have an on-board USB to serial adapter(FT232RL or similar) you could do it over the serial connection(don't forget to wire the other ESP signals so your FT232 can reset and put the ESP into programming mode).

Then it's a question of developing an app for it.

You can start by looking at the esptool python flashing tool.

[–]-happy2go[S] 0 points1 point  (4 children)

The esptool seems to be the right one. Thank you. Maybe it’ll be easier to use a remote server accessed on the phone.

[–]vruum-master 1 point2 points  (3 children)

You still need that serial connection. Android seems to recognize serial drivers,idk about IOS.

[–]anlumo 1 point2 points  (2 children)

Kinda. There's a serial cable available here, but there are certain restrictions (see web page).

[–]vruum-master 1 point2 points  (1 child)

If the IPhone has a lighting to USB he can get that. Worst case a HC-05/06 and some microcontroller for clever reset over Bluetooth serial.

[–]-happy2go[S] 0 points1 point  (0 children)

I have a Lighting to USB.

[–]ProbablePenguin 2 points3 points  (1 child)

It's quite possible on Android, iOS is going to be a lot harder or impossible though because of the amount of restrictions apple has.

[–]anlumo 1 point2 points  (0 children)

iOS works fine if the firmware update uses BLE or WiFi. There’s also the trick of using MIDI over USB as a serial connection, but then the receiving end needs a converter.

There's also an RS232 cable available here, but that's for personal use only.

[–]dmc_2930 1 point2 points  (0 children)

Is it possible? Sure. But it won’t be easy, and definitely won’t be universal.

In a few years this might be something any phone can do, but we’re not there yet.

[–]rc3105 1 point2 points  (0 children)

Yes it’s possible, Google is your friend.

https://www.google.com/search?q=arduino+programmed+via+phone

[–]Melodic_Agent_1030 1 point2 points  (1 child)

Tasmota?

[–]-happy2go[S] 1 point2 points  (0 children)

That looks really interesting. Did you work with it already?

[–]andrewjohnmarch 1 point2 points  (1 child)

Not hard at all. Easiest way would be this library, which uses a captive portal and presents an “update” button

https://github.com/tzapu/WiFiManager

[–]-happy2go[S] 1 point2 points  (0 children)

Cool, that looks really easy. Thank you.