# Update firmware over usb/serial, without dfu-util

**URL:** <https://community.particle.io/t/update-firmware-over-usb-serial-without-dfu-util/9289>\
**Category:** Firmware\
**Created:** [January 11, 2015, 4:43pm UTC](https://community.particle.io/t/update-firmware-over-usb-serial-without-dfu-util/9289 "2015-01-11T16:43:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicodegunst](https://avatars.discourse-cdn.com/v4/letter/n/4491bb/32.png) [@nicodegunst](https://community.particle.io/u/nicodegunst)\
**Post date:** [January 11, 2015, 4:43pm UTC](https://community.particle.io/t/update-firmware-over-usb-serial-without-dfu-util/9289/1 "2015-01-11T16:43:31Z")

</div>

Hi,

This will be my first topic on this community, but I have been working on my spark cores for a few months. This community has helped me quiet a few times, so I figured it is time to start contributing.

I have been wondering wether it would be possible to update the core firmware without the use of dfu-util, and found out it is actually not that difficult. The only change required in the core-firmware was creating 3 public functions with the same functionality as Spark\_Prepare\_For\_Firmware\_Update, Spark\_Finish\_Firmware\_Update and Spark\_Save\_Firmware\_Chunk.

After that I could call these functions from my own application firmware, which holds the code to communicate over the usb serial connection. From the connected computer I used some nodejs code that chunks the core-firmware.bin file and sends it.

I can imagine this could be very useful for the spark-cli, because it wouldn’t require dfu-util to flash the core. For this to be possible, some small changes to the bootloader firmware would be required.

My c++ skills are very basic, and as a new-comer, I feel out-of-place to be proposing changes to the core bootloader, but I would love to contribute to this wonderful product if anyone is interested. I haven’t looked at any of the code of the spark-cli, but I am positive I could made the changes required once the boot loader has been updated.

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [January 11, 2015, 11:14pm UTC](https://community.particle.io/t/update-firmware-over-usb-serial-without-dfu-util/9289/2 "2015-01-11T23:14:53Z")

</div>

Ymodem protocol has been ported to the core and available in the **feature/hal** branch. This should work via USB as well so there’s no need to rewrite except for getting into the mode 😉

---

<div class="post-metadata">

**Author:** ![nicodegunst](https://avatars.discourse-cdn.com/v4/letter/n/4491bb/32.png) [@nicodegunst](https://community.particle.io/u/nicodegunst)\
**Post date:** [January 12, 2015, 6:39pm UTC](https://community.particle.io/t/update-firmware-over-usb-serial-without-dfu-util/9289/3 "2015-01-12T18:39:54Z")

</div>

Hi Kenneth, thanks for your fast reply. I haven’t yet taken the time to compile and flash the new hal branch, but I am very interested to see what you guys have achieved so far. I will give it a go in the near future. Good to hear there are some new features to be expected once it is released.  
To be honest, I hadn’t heard of the Ymodem protocol, and I also can’t find much in combination with nodejs, but do I understand correctly that it will allow updating the firmware without the use of external tools like dfu-util?

(_In my case, I want to be able to update my core from the config utility (using node-webkit) I am writing, without the requirement of installing anything. The solution I created now works fine, but naturally I’d rather not change to much in the core-firmware.  
Thanks again, also for all your posts regarding the udp issues, it helped me a lot!_)

---

<div class="post-metadata">

**Author:** ![jrodas](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@jrodas](https://community.particle.io/u/jrodas)\
**Post date:** [July 15, 2015, 11:34pm UTC](https://community.particle.io/t/update-firmware-over-usb-serial-without-dfu-util/9289/4 "2015-07-15T23:34:05Z")

</div>

Hey @kennethlimcp @mdma

Any update about the Ymodem firmware update support? Is it already supported in the latest 0.4.3 develop firmware for the Photon?

And, will it work by using the RX/TX lines AND also the USB port? or only one of these two options?.

---

<div class="post-metadata">

**Author:** ![mdma](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/mdma/32/1924_2.png) [@mdma](https://community.particle.io/u/mdma)\
**Post date:** [January 6, 2016, 10:37am UTC](https://community.particle.io/t/update-firmware-over-usb-serial-without-dfu-util/9289/5 "2016-01-06T10:37:09Z")

</div>

Apologies for the delay, only just saw this. ymodem works over the Serial port only for the time being.
