Over-the-air updates for Pine64 PineTime using wasp-os and MicroPython

Поделиться
HTML-код
  • Опубликовано: 6 окт 2024
  • In this short video we'll look at the tools wasp-os provides to allow a Pine64 PineTime smartwatch to receive a new firmware image over-the-air using the Bluetooth radio. We also look at how having a Python compiler built into the watch itself allows us to transfer files and run a REPL over Bluetooth in order to simplify our development flow and avoid time consuming full firmware updates.
    wasp-os is a watch development system based on MicroPython. It consists of a robust bootloader and MicroPython runtime together with a small but growing collection of smart watch drivers written in Python. Currently there is only a simple digital clock application (also written in Python) but there are more coming soon!
    Visit github.com/dan... for the latest wasp-os source code and status.
  • НаукаНаука

Комментарии • 35

  • @izaicslinux6961
    @izaicslinux6961 4 года назад +1

    This looks amazing! Going to install it on mine now to play with!

  • @boltactionpiano7365
    @boltactionpiano7365 4 года назад +2

    How did you stick the case together? I'd love to develop on the watch in a way that I can wear it.

  • @lukaszerecinski5376
    @lukaszerecinski5376 4 года назад

    Awesome video Daniel :)

  • @tomdoughty1577
    @tomdoughty1577 4 года назад

    Looks great!

  • @izaicslinux6961
    @izaicslinux6961 4 года назад +1

    How far can Wasp-OS and Micropython be pushed on the Pinetime? How much memory is left for writting apps? There's the basic watch face with time and battery reporting, but how much room is there for adding onto that with things like fitness tracking?

    • @DanielThompsonRFN
      @DanielThompsonRFN  4 года назад

      It is not really quantifiable at this point... part of the reason for me to write wasp-os is to find out how far MicroPython can be pushed on PineTime! Currently I don't think we are close to any limits... there's plenty of space left in flash and I've no had any problems with RAM usage. If you want to see the current RAM usage see: docs.micropython.org/en/latest/reference/constrained.html#reporting .

  • @jolladevices
    @jolladevices 4 года назад

    Odd question: but that bracelet?
    Are there alternative compatible bracelets? 😀

    • @DanielThompsonRFN
      @DanielThompsonRFN  4 года назад +1

      PineTime just uses regular 20mm pins (same as some of the Samsung devices). The default strap was nice enough but my skin feels a bit weird with rubber next to it all day so I went hunting on eBay. I ended up with a magnetic one because they are quite sleek when you are wearing one (though they are fiddly to take on and off because they stick to themselves). If you are interested I bought this one: www.ebay.co.uk/itm/Magnetic-Milanese-Strap-Replacement-Band-For-Samsung-Galaxy-Watch-Active-20mm-UK/223489686714

  • @DavidKoseckyCZ
    @DavidKoseckyCZ 4 года назад

    Where did you get that band on the pinetime? O.o
    I have the stock and it's pretty irritating after 8+ hour of use >.>

    • @DanielThompsonRFN
      @DanielThompsonRFN  4 года назад

      There's a longer reply a few comments back (look for a user called Jolla-Devices) but the short answer is: www.ebay.co.uk/itm/Magnetic-Milanese-Strap-Replacement-Band-For-Samsung-Galaxy-Watch-Active-20mm-UK/223489686714

  • @definitelynotclickbait8283
    @definitelynotclickbait8283 4 года назад

    How many days it lasts without charging?

    • @DanielThompsonRFN
      @DanielThompsonRFN  4 года назад +2

      I usually get four days between charges (well four days and three nights ;-) ).
      Currently I have only implemented fairly basic power saving. I think there are still a trick or two more that could extend the battery life but I am currently focused on making it easier to write applications so don't expect improvements any time soon.
      Note also that you only get four days if you cleanly disconnect the SWD tool after you program the bootlaoder (and AFAIK exactly how to be cleanly disconnect from a PineTime isn't yet well documented). If you do not disconnect cleanly then the nRF chip things the debugger is still attached and will refuse to enter deep sleep states. If that happens then your battery will only last around 2 days. Happily the problem fixes itself if you forget to charge the watch since when the it runs out of battery then it also forgets that there might be a debugger attached.

  • @idave22
    @idave22 4 года назад

    Hi again, after fiddling with the clock.py and successfully testing it via your wasptool, I baked it into the zip and flashed it via dfu from android. The "old" watchface remained (however, one of my tinkerings before, not the original). How does one "unfreeze" this to force it to take the new clock.py? Hope this questions makes sense. Thanks

    • @DanielThompsonRFN
      @DanielThompsonRFN  4 года назад

      Take a look in wasp/boards/pinetime/manifest.py . This is the list of frozen modules and, unfortunately, frozen modules are adopted in preference to once that exist on the filesystem (so you will have to remove clock.py from the manifest).

    • @idave22
      @idave22 4 года назад

      @@DanielThompsonRFN Makes sense, thanks! Your tools (/tools/) are great by the way, I managed to create a font and images. Looking forward to when you share the touch driver from the video (I couldn't find it on your repo or fully read it from the vid).

    • @DanielThompsonRFN
      @DanielThompsonRFN  4 года назад

      @@idave22 Currently the driver is only really a proof-of-concept... but I pushed it to the repo anyway ;-). However you'll have to initialize the i2c bus yourself (that's what test.py was doing in the video).
      Try:
      i2c = machine.I2C(1, sda='I2C_SDA', scl='I2C_SCL')
      watch.i2c = i2c
      tp = CST816S()

    • @idave22
      @idave22 4 года назад +1

      @@DanielThompsonRFN This is absolutely fabulous. I could reproduce what you do in the video (with the touch driver). Very nice work!

    • @idave22
      @idave22 4 года назад

      ​@@DanielThompsonRFN How would you do a ClockApp().update() once each second? I ran out of ideas, but would like to draw a second-hand.