Flash core with Android/OTG [idea]

I doubt solution exists, so that might be an interesting idea to implement
Sometimes it is both now very handy to flash cores with WiFi and to have a notebook with dfu-util to flash with USB.

So why not flash with android phone using OTG. I’ve seen arduino solutions that already can be flashed by Android OTG connection, can this be implemented for Spark too?

We have the Serial flash protocol available to update the firmware via serial.

It might be possible but @satish should be able to share more. :slight_smile:

Ooh, that’s an awesome idea. Especially for the Nexus folks who aren’t able to use Smart Config. I wonder if you could use an app like this - https://play.google.com/store/apps/details?id=com.gp.uartfree&hl=en - to talk to the core via the Nexus over serial?

Another alternative would be just having the app or something local download the firmware, and then broadcast it over UDP or something that the core could be listening on, etc.


This isn’t supported on the Core since the USB peripheral on the STM32F1xx doesn’t support OTG, but it IS possible to support on the Photon, since the STM32F2xx does support OTG!

So the only question is given that we have OTG available, what would we use it for? :smile:

I was talking about entirely different thing in original post. I was talking about updating core firmware from phone with USB connection (without using cloud/wireless) Core should not have OTG for that.

Ah, I see, Android could be the OTG host and the core the slave.

With 0.4.0, the system firmware supports “hot” over-the-wire uploads of firmware by changing the baud rate of the serial connection to a special value. Firmware can then be flashed using the ymodem protocol, which is pretty easy to write a client for. (I have written one in python.)

1 Like

I am sorta new to this forum, and don’t yet know all the ACRONYMs. What is OTG ?

USB OTG is On The Go - it means that a device can also function as a Host. So for example, an android phone is normally a device, and the Core is a device, so connecting these two together doesn’t produce a useful result (USB requires a host.)

Android and various other devices (including the Photon) can function as a USB OTG host which allows devices to be connected to them. In the case of connecting a Core to Android, this would allow serial communication between the core and the phone, something that would not be possible without OTG.

1 Like