Skip to content

Conversation

@AkaBkn
Copy link
Contributor

@AkaBkn AkaBkn commented Feb 15, 2021

This pull request adds the functionality to update the firmware over radio.

How to use:

  1. Press SET when in app (it will use your codeplug frequency)
  2. use bin/ota-updater-rfcat.py [-f FREQ] firmware/goodwatch.hex (uses RfCat/rflib)

How it works:

  • it copies a blob (built from firmware/ota-updater) to RAM 0x2400 and launches it
  • the blob waits for rf packets and handles accordingly

Updater blob:

  • Minimal code to keep updater running
  • no lcd/keypad/buzzer support to keep it slim

Until further tests, this code is labeled as #worksforme (but it works quiet good: flashing firmware in 8s)

@travisgoodspeed
Copy link
Owner

I've resolved the conflict from other recent merges.

Some quick thoughts:

  1. It would be handy to be able to transmit through a serial-attached watch, but the goodwatch.py protocol is pretty crufty. Maybe we should burn it to the ground and aim for some sort of compatibility with rfcat?
  2. It's nice and small.
  3. The Makefile has some illegal indentations, and convert.py is missing a hashbang line at the top.

@AkaBkn
Copy link
Contributor Author

AkaBkn commented Feb 17, 2021

  1. I would have done that too, if I had a second watch. I think we need multiple solutions for that, some people have a second watch, some people a rfcat and others maybe a hackrf/sdr.
  2. I fixed it with latest commit (also did some other fixes/comments/cleanup)

@travisgoodspeed
Copy link
Owner

Took another gander at the code:

  1. Do you intend to fork radio.c and radio.h? This isn't necessarily a problem, but I'd like to double-check that there's a good reason not to just link against the standard ones.
  2. The codeplug frequencies aren't used by very many applets, and they might be cut out in the near future. Perhaps we should use a fixed frequency, or one fixed freq per band?

@AkaBkn
Copy link
Contributor Author

AkaBkn commented Mar 2, 2021

  1. Yhea, I copied them and stripped out things not needed (maybe not necessary if linker will strip unneeded stuff reliably). I just didn't wanted to clobber your files, also, if something changes in radio.c & radio.h in firmware, it will not break the updater.. packet.c/packet.h are also copied, altough, there i changed things to make it work better (alignment of rxbuffer, rx overflow handling).
  2. I used to have fixed frequencies, but for the pull request I thought it would be better/genuine to use codeplug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants