Pine-time watch dev kit

Posted on
Page
of 2
/ 2
Next
  • This https://store.pine64.org/?product=pineti­me-dev-kit watch dev kit from the Pine people seems to be based on the same chips (Nordic 64MHz nRF52832 ARM Cortex-M4 processor) and RAM/flash as the Bangle.js. Does this mean that a clever enough person could port Espruino (and the Bangle firmware/software) to the Pine-watch?

    Andrew

  • The chip is one thing... all the other hardware around it and how it is driven is the other part, and that latter one is where the effort lays. pine time piece also announced to use the more powerful nRF52840... and with every HW change some FW / SW change goes - has to go - along.

    Looking at Bangle.js' technical data, some of core modules complementing hardware is so custom that it there is no public documentation available: the external memory is 'like' and the compas chip is still to be identified. @Gordon has picked an off-the-shelf product because he knows first hand what it means to get hardware off the ground on his own and be able to recoup the effort with the production / sale numbers.

    And even in his work I see some pattern: move from putting individual base components together - as for Original and Pico Espruino boards, to shimming and hosting module - Pico, and Espriuno-Wifi and Puck Espruino board, to putting modules together Pixl, to most recent 'just' take a fully developed, of-the-shelf hardware 'softwaring' it - hijack hardware with software.

    So most of the work - with significant support from specific forum members - went into 'cracking' the device and discover how the device operates by reverse engineering the SW..., something that would also have to go into a port onto a different HW combination - if the device is even open / not locked down or locked down to a particular way of 'softwaring' it.

    Nothing is holding you back to spearhead this effort... so far, we are still awaiting pine time's release...

  • @allObjects Thanks for the reply. I didn't know so much effort went into the peripheral interfacing side of things. I naively thought compiling the code for the same CPU/SoC would make it relatively easy. I don't know anywhere near enough about this stuff to help with any porting.

  • For @Gordon's business sake I do not want to encourage you and at the same time in @Gordon's spirit of open HW and SW you should not be afraid to start small: many porters started out with just getting the core going... and that would be possible practically of the bat because of the nRF52832 / nRF52840 chip as core by defining a new .py. The new 'pinetime.py' board .py would just contain the pin definitions to start with, because that would then allow to get the cousin of the 'Hellow World' for IoT off the ground: a blinking LED - or acting up what ever single pin driven peripheral hardware pine time includes - (piezo speaker, vibration motor, display light,...). It will be for sure an interesting story. Take a look at @fanoush 's work - he can exactly tell you what to do... I mean procedurally / methodically... because he is also one of the Bangle.js contributors / enables mentioned namely by @Gordon.

    Any work related to Espruino is growing popularity of Espruino... how to monetize though this for the creator(s) is the challenge... (I make my living from something else... and would not mind it to be otherwise... to be precise: Espruino-wise... question is: is the room / demand enough on a sustainable - open space - market?).

  • Does this mean that a clever enough person could port Espruino (and the Bangle firmware/software) to the Pine-watch?

    Yes, definitely. without any significant work you can build generic Espruino firmware that will run in any nrf52832 device including pinetime. With no support for specific hardware you'll only get BLE uart console and device will be conectable over bluetooth e.g. via https://www.espruino.com/ide/ and you can run javascript code inside. Also power management will work sensibly - i.e device will last weeks with bluetooth on.

    Then if you want to use the hardware - display, buttons, accelerometer, HR sensor, .... you can access it directly in javascript via Espruino API for SPI I2C or digital/analog pins or you can add it (possibly later) as C code into espruino firmware - making it not generic.

    Then additional issue is updating the firmware over bluetooth without taking device apart. This is what I've been focusing on - finding off the shelf watches and fitness trackers that use older nordic SDK11 which allows replacement of its firmware without opening the device. As pinetime devkit is already opened and SWD pins are accessible this is not relevant here.

  • I didn't know so much effort went into the peripheral interfacing side of things. I naively thought compiling the code for the same CPU/SoC would make it relatively easy.

    It depends :-) Personally I consider it indeed relatively easy. When just following the guide https://github.com/espruino/Espruino/blo­b/master/README_Building.md#for-nordic-s­emiconductors-nrf51nrf52-series-devices and building version for MDBT42Q board you'll get firmware hex file that will work in pinetime board and you can start exploring rest of the hardware interactively in javascript code over bluetooth or even serial console if Pinetime has two spare pins for RX/TX. That is much easier than coding anything for Pinetime in C.

    As the Pinetime pinout is documented (full list in PDF here) and also datasheets are linked there, it could be indeed relatively easy.

  • The nRF52840 possibility was removed from their wiki last october or november. If you think about it: that's not a drop-in replacement: much more pins => needs a new PCB. Has USB => one would expect it to work => needs a new case with USB pins broken out and work on USB driver. That's a new watch IMO...

    Hardware is mostly documented, as linked by fanoush https://wiki.pine64.org/index.php/PineTi­me#Driving_the_peripherals
    1 important thing: The LCD is on an SPI bus (8MHz max) compared to the F18's parallel bus, it's not fast: https://www.youtube.com/watch?v=_x6B-L5K­OtU

  • I mainly wondered if people here were aware of the Pine-time as a platform. I searched the forums and couldn't find any reference to it so thought someone might find it interesting. As they seem to be quite cheap if it is a suitable platform Gordon could sell them on his site at a hefty markup and they'd still be a cheap smartwatch. Obviously that would be entirely up to him.

  • Well, it is not that cheap or that great. It depends. It is not bad choice but IMO there are better and/or cheaper choices.

  • Wohoo! Wow, if that's what 'optimised' looks like it's going to be pretty interesting.

    I would seriously hope that PineTime would ship with an unlocked bootloader, but it sounded like they might not be using the normal nRF SDK (but Zephyr) in which case flashing Espruino would still likely be a case-off job.

    If there's demand after Bangle.js ships then I'll definitely look at doing a smaller, cheaper watch though. PineTime are just an intermediary adding their own mark-up (another company makes the watch), so if I did decide to do another watch I'd be better off going direct.

    ... also I feel like I'd be better off using a lower-power sunlight-readable display for a second watch if it was at all possible. I think it'd make a much more usable device.

  • As for sunlight readable I have one hot tip - the dk08, it is sdk11 based and I already managed to brick one completely by updating bootloader. But I had espruino already there to backup bootlaoader and then for some stupid reason I restored the app and then after some time I tried to update bootloader and then then app does not start anymore. I think with espruino there the bootloader update would work :-( Unfortunately it looks impossible to open without breaking it (glass glued to metal), so I had to order another one. And it hurts because it is quite expensive. But the sunlight readable always on display is worth it. No touchscreen and only one button though.

    I wonder what would dissolve the glue that is used, not sure if acetone or ethanol or something like wd40. if I put it to some shallow liquid just to cover the glass maybe it would be possible to open without breaking the glass.

  • Wow, dk08 does look good. A real shame about the button situation though. I'd been looking at SMA Q2...

    In terms of getting the display off, with those sealed watches I found that heat was really the only way - heat up the glass front with an air gun and then try and get something behind it. Always a bit of a nightmare though.

  • My problem is that all of these are out of stock... Are there any with reflective or transflective screens (and no backlight or can be disabled) that are still sold? @Gordon I wouldn't mind buying it from you.

  • DK08 is on aliexpress and now for much better price
    https://www.aliexpress.com/item/40012240­81207.html
    https://www.aliexpress.com/item/40012560­48750.html

    Had to order one more for $15 because of this :-)
    Also I got the display working with Espruino just few days ago. It has 64 colors - it uses 2 bits for R,G,B = 6 bits total. It uses ST7301 controller, there is no datasheet but got initialization commands from original firmware. It uses similar commands to eg. ST7789 or ST7735 however one pixel data for 0x2c command is only single byte so the transfer is twice faster :-)

  • Here is short video I just recorded, this is DK08 running Espruino outside with no backlight enabled
    https://streamable.com/m96w60

    The always on display lasts few weeks with BLE on and showing clock with original firmware.

  • @fanoush nice video!

    have you tried the 'LCD_SPI_UNBUF' ?

  • have you tried the 'LCD_SPI_UNBUF' ?

    not yet as it is slower by design than the buffered one (to save memory) so I don't use it, but on this watch it can be interesting as both the 0x2a, 0x2b commands are shorter (x,y are only bytes, not 16 bits) as well as pixel data. So it is only 1+2+1+2+1+1 bytes with DC pin toggle between that which is sent for each pixel (when drawing fonts, lines, circles). On the other hand 176x176 in full 6 bits take 'only' 23232 bytes which is less than 240x240 in 16 colors (=28800) for P8, and 4bit/16 color takes 15488bytes on DK08.

    and btw the LCD_SPI_UNBUF driver is hardcoded for 0x2a,2b,2c to take 16bit values so would need extra patch/configuration for ST7301

  • pasting conversation from gitter here:

    another DK08 video with backlight on (pwm at 25%) and off https://streamable.com/bzogli , this is indoors in dark (under desk), camera auto brightness makes it worse but yes without backlight only the white color is clearly visible (clock time is white)

    also here is photo of the clock without backlight under desk http://ibb.co/p3sVsr2 this time camera makes it brighter than real but the point is that even without backlight it is good as a watch showing time (with white color) almost in any condition except very dark. photo quality is bad because it is dark under desk. And BTW the watch is locked in charging cradle/box on the photo if you wonder what it is.

  • I swore off aliexpress because I've been buying too many things from it and had been clean for almost 3 months now. I blame you @fanoush for getting me back there and buying yet another gadget :P

  • Got you! You'll regret this ;-)

    Anyway the code running in the last video is here and some info about getting better bootloader installed is here https://github.com/fanoush/ds-d6/wiki/Re­placing-Nordic-DFU-bootloader

    DK08 is same manufacturer as F07 so the older instruction here https://github.com/fanoush/ds-d6/tree/ma­ster/espruino/DFU/F07 apply and the minimal FW can be used in DK08 too. As for the full size espruino I'll upload fresh build for DK08 later.

    Got all pinout for all the HW. There are several versions of firmware that can be restored back to it. Got latest one opened in Ghidra, that's how I got the display working . It has 2MB SPI flash/fontchip too just as F07/F10. So far only tested button, display and SPI flash. Also motor, battery voltage, charging pin as those are easy.

    Accelerometer should be Bosch BMA253 so if yes it should be easy too as it is widely used and has code on github. HR sensor not sure yet.

    EDIT: DK08 builds and some guide for bootloader installation is also here https://github.com/fanoush/ds-d6/tree/ma­ster/espruino/DFU/DK08

  • Just a heads up that DK08 is $9.50 today (11.11. sale) https://www.aliexpress.com/item/40012240­81207.html

  • @fanoush sadly I missed your post by a mile. How are you notified of these things? they seem to make a new post every time the watch goes in or out of stock...

    If you have an extra I can buy off of you, let me know.
    But first: what is your code, and can you post complete steps to upload it that don't brick the watch?

  • The procedure is described in my previous link. You basically use nrfconnect and copy paste prepared code to install bootloader. Several people followed it and so far nobody bricked it, apart from my simple demo code you may check what others did with it - see https://github.com/jeffmer/DK08Apps and also recently enaon is adding it to eucWatch too https://github.com/enaon/eucWatch/tree/m­ain/DK08
    However not everything is polished and 100% working out of box, it still needs some developer effort on your part.

    Yes I do have couple of extra unused DK08 devices and can ship inside EU for average price I paid for them plus $5-$7 for registered shipping (depends on weight), PM me for details.

  • I wonder if is possible to flash the PineTime with bangle bootloader as they both have the exact same chipset nrf52832

  • regarding bootloader - Bangle has different display and buttons so the bootloader itself won't run well on PineTime as is but yes, one can build espruino and its bootloader for pinetime pretty easily. the nearest to PineTime is P8 watch and there are several projects using espruino on P8. So for pinetime it just needs changing some pin numbers, otherwise the hardware is basically same as P8.

    see https://github.com/jeffmer/P8Apps or https://github.com/enaon/eucWatch however due to different pinout it won't run as is.
    However if you have SWD working you can try to flash my build for P8 https://github.com/fanoush/ds-d6/blob/ma­ster/espruino/DFU/P8/espruino_2v08.189_p­8_SDK12_SD30.hex and it should hopefully run (except button - BTN1 - P8 has it on pin 17)

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Pine-time watch dev kit

Posted by Avatar for Andrewmk @Andrewmk

Actions