wasp-os: MicroPython for PineTime!
#11
(02-22-2020, 10:45 AM)mulm Wrote: I would think this is just a missing element or misconfiguration of underlying bootloader... the Nordic tools seem very mature from what I've seen so far.

I think the disconnect you are seeing is nRF Connect rejecting the .zip file and aborting the transfer. It does exactly the same thing if the type field of micropython.zip is set wrong.

Also, keep in mind that to during an OTA update we are using the SoftDevice (and I think also parts of the bootloader code) making it difficult to safely overwrite them with new code. The Nordic tools certainly allow UART DFU to replace the SoftDevice and bootloader but, after spending a little time in the company of a search engine, I have not (yet?) uncovered evidence that Bluetooth DFU updates are supported.
PineTime: wasp-os and MicroPython, Pinebook Pro:  Debian Bullseye
  Reply
#12
I'm well into the work to improve the developer experience with wasp-os. Having added an on-device filesystem and a command line tool to help unix-like systems interact directly with the watch it is getting much more comfortable writing Python code for the device. So much so I made a video about it!

[Image: 0.jpg]
Developing for Pine64 PineTime using wasp-os and MicroPython
PineTime: wasp-os and MicroPython, Pinebook Pro:  Debian Bullseye
  Reply
#13
(02-29-2020, 02:24 AM)danielt Wrote: I'm well into the work to improve the developer experience with wasp-os. Having added an on-device filesystem and a command line tool to help unix-like systems interact directly with the watch it is getting much more comfortable writing Python code for the device. So much so I made a video about it!

[Use this direct link if there are problem with the embedded youtube playback on the forum: https://youtu.be/kf1VHj587Mc ]


I have superglued my Pinetime shut with your bluetooth bootloader and Micropython watchface. Very very nice!
  Reply
#14
(03-06-2020, 04:02 PM)Aberts10 Wrote: I have superglued my Pinetime shut with your bluetooth bootloader and Micropython watchface. Very very nice!

Is that bravery or do you know some tricks that could release the glue  Wink ?

I've been wearing my PineTime for almost a month now and haven't taken the back off to reprogram it in that time; everything has been delivered over-the-air (although I did have take it apart to double check the part number of the SPI FLASH). Anyhow, at present I still have the back held on with double sided tape "just in case".
PineTime: wasp-os and MicroPython, Pinebook Pro:  Debian Bullseye
  Reply
#15
I've just uploaded the latest wasp-os video. In this instalment we look at the latest features wasp-os provides to make it easy to develop watch applications in python. We start out by debugging and testing our application in a simulator (no watch required) before moving on to testing the application on the watch itself. Finally we copy the application to the filesystem on the FLASH so it can persist between reboots without any need to rebuild wasp-os (other than for the initial install).

There is a also a short bonus at the end where I show off the very first prototype of the application launcher. The application launcher is very much a work-in-progress since I'm still working to finalize the user interface for application switching but the launcher is great first piece!

[Image: 0.jpg]
How to develop wasp-os python applications on a Pine64 PineTime
PineTime: wasp-os and MicroPython, Pinebook Pro:  Debian Bullseye
  Reply
#16
(03-07-2020, 01:39 PM)danielt Wrote:
(03-06-2020, 04:02 PM)Aberts10 Wrote: I have superglued my Pinetime shut with your bluetooth bootloader and Micropython watchface. Very very nice!

Is that bravery or do you know some tricks that could release the glue  Wink ?

I've been wearing my PineTime for almost a month now and haven't taken the back off to reprogram it in that time; everything has been delivered over-the-air (although I did have take it apart to double check the part number of the SPI FLASH). Anyhow, at present I still have the back held on with double sided tape "just in case".

It's trust in your work and bravery. Smile
  Reply
#17
I have just uploaded a new wasp-os video. This one is different to my previous videos in that I'm simply doing a guided tour of the applications (and games) likely to be found in the M2 release. In other words, for the first time we have user centric showcase rather then just a developer preview (wasp-os remains a great way for you to build your first PineTime applications... but you want the previous video for that).

[Image: 0.jpg]
wasp-os: The M2 pre-release running on Pine64 PineTime
PineTime: wasp-os and MicroPython, Pinebook Pro:  Debian Bullseye
  Reply
#18
(04-20-2020, 04:28 AM)danielt Wrote: I have just uploaded a new wasp-os video. This one is different to my previous videos in that I'm simply doing a guided tour of the applications (and games) likely to be found in the M2 release. In other words, for the first time we have user centric showcase rather then just a developer preview (wasp-os remains a great way for you to build your first PineTime applications... but you want the previous video for that).

[Image: 0.jpg]
wasp-os: The M2 pre-release running on Pine64 PineTime

Awesome :-)
  Reply
#19
What are your thoughts on using uBluetooth and NimBLE so this thing is 100% open?

I'm a big fan of MicroPython and really tempted to lend a hand with wasp-os, but the use of Nordic's softdevices bums me out.
What are your thoughts?
  Reply
#20
(04-22-2020, 07:39 AM)patchedsoul Wrote: What are your thoughts on using uBluetooth and NimBLE so this thing is 100% open?

I'm a big fan of MicroPython and really tempted to lend a hand with wasp-os, but the use of Nordic's softdevices bums me out.
What are your thoughts?

Pretty much the same as yours Smile .

I'd really prefer to be using an open source BLE stack but the combination of easy to adapt bootloaders and a pre-existing MicroPython port meant using SoftDevice allowed me to get the Python code running so much quicker. In the end I concluded that given MicroPython effectively acts as a HAL there was no point in switching away from SoftDevice immediately... The situation is not perfect but there is no technical debt accumulating related to BLE: it is not *harder* to port MicroPython to NimBLE (or any other BLE stack) than it was when I started wasp-os!

Anyhow there are a couple of options for designing out the SoftDevice.

1. Bring up the Zephyr or MyNewt ports of MicroPython on the watch and then do the small amount of porting required to bring up wasp-os on that. In either of the above scenarios it isn't really geting wasp-os runnig that is the hard bit. The hard bit is replacing wasp-bootloader with something equally robust. To be honest the bootloader is the key component that has made the PineTime fun for me to hack on! Having something that allows me to confidently load *untested* payloads at my watch without really worrying about bricking it it awesome.

2. Bring up NimBLE on bare metal doing all the internal scheduling from a timer interrupt and passing on any unexpected interrupts to the application (in other words develop a NimBLEDevice that provides the same runtime mode that SoftDevice does). From there both MicroPython and wasp-bootloader can be ported to the NimBLEDevice

If I were doing the work I'd be inclined to adopt MyNewt and modify mcuboot a bit so it can exploit the SPI flash (e.g. main image in nRF flash, upgrade image in SPI flash and an emergency NimBLE OTA image in SPI flash that mcuboot copies over the main nRF flash if a button is pressed during boot). The main reason I would take this approach is because it is best for the PineTime community! The resulting bootloader would become neutral on what BLE stack the application uses meaning many different firmwares could use it. There would also likely be improvement found for @lupyuen 's MyNewt port which would be cool too.
PineTime: wasp-os and MicroPython, Pinebook Pro:  Debian Bullseye
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Article: Wireless Firmware Update In Action on PineTime lupyuen 0 49 05-20-2020, 06:03 AM
Last Post: lupyuen
  MCUBoot Bootloader for PineTime lupyuen 2 288 05-18-2020, 04:23 PM
Last Post: lupyuen
  Simplified boot flasher for PineTime via PI jlukanc 0 39 05-15-2020, 04:38 PM
Last Post: jlukanc
  PineTime Hypnos endian-albin 0 98 05-10-2020, 02:28 AM
Last Post: endian-albin
  CHIP-8 Retro Game Emulator for PineTime lupyuen 7 499 04-15-2020, 12:19 PM
Last Post: seclorum
  wasp-bootloader: a robust SoftDevice bootloader for PineTime danielt 3 517 04-14-2020, 05:31 AM
Last Post: danielt
  Pinetime backlight current. TT-392 2 234 03-11-2020, 09:57 AM
Last Post: TT-392
  Create PineTime Watch Apps with Visual Rust lupyuen 0 174 02-19-2020, 02:50 AM
Last Post: lupyuen
  Live Debug of RIOT-OS on PineTime lupyuen 3 295 02-11-2020, 06:33 AM
Last Post: wibble
Lightbulb PineTime Hermes Firmware + Companion App dejvino 5 626 02-01-2020, 03:42 PM
Last Post: dejvino

Forum Jump:


Users browsing this thread: 1 Guest(s)