Pine-time watch dev kit #6851
Replies: 1 comment
-
Posted at 2020-01-09 by @allObjects 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. @gfwilliams 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... Posted at 2020-01-09 by Andrewmk @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. Posted at 2020-01-09 by @allObjects For @gfwilliams's business sake I do not want to encourage you and at the same time in @gfwilliams'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 @gfwilliams. 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?). Posted at 2020-01-09 by @fanoush
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. Posted at 2020-01-09 by @fanoush
It depends :-) Personally I consider it indeed relatively easy. When just following the guide https://github.com/espruino/Espruino/blob/master/README_Building.md#for-nordic-semiconductors-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. Posted at 2020-01-10 by AkosLukacs 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/PineTime#Driving_the_peripherals Posted at 2020-01-10 by Andrewmk 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. Posted at 2020-01-10 by @fanoush 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. Posted at 2020-01-13 by @gfwilliams 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. Posted at 2020-01-13 by @fanoush 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. Posted at 2020-01-15 by @gfwilliams 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. Posted at 2020-08-06 by Narvey 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? @gfwilliams I wouldn't mind buying it from you. Posted at 2020-08-06 by @fanoush DK08 is on aliexpress and now for much better price Had to order one more for $15 because of this :-) Posted at 2020-08-06 by @fanoush Here is short video I just recorded, this is DK08 running Espruino outside with no backlight enabled The always on display lasts few weeks with BLE on and showing clock with original firmware. Posted at 2020-08-06 by @MaBecker @fanoush nice video! have you tried the 'LCD_SPI_UNBUF' ? Posted at 2020-08-07 by @fanoush
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 Posted at 2020-08-07 by @fanoush 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. Posted at 2020-08-07 by parasquid 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 Posted at 2020-08-07 by @fanoush 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/Replacing-Nordic-DFU-bootloader DK08 is same manufacturer as F07 so the older instruction here https://github.com/fanoush/ds-d6/tree/master/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/master/espruino/DFU/DK08 Posted at 2020-11-11 by @fanoush Just a heads up that DK08 is $9.50 today (11.11. sale) https://www.aliexpress.com/item/4001224081207.html Posted at 2021-01-30 by Narvey @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. Posted at 2021-01-30 by @fanoush 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/main/DK08 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. Posted at 2021-04-05 by user126982 I wonder if is possible to flash the PineTime with bangle bootloader as they both have the exact same chipset nrf52832 Posted at 2021-04-05 by @fanoush 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. Posted at 2021-09-10 by yngv126399 I've just tried to build a minimal Espruino with only the BTN defined and used OpenOCD to flash to Pinetime. I'm not seeing anything in the Espruino web IDE. I did an nrf mass_erase to clear out Infinitime, then built both the bootloader (BOOTLOADER=1) and the board fw, programmed the bootloader (hex file) and board fw (first hex file, then bin file from zip). Am I missing a step? Posted at 2021-09-10 by @MaBecker what about the softdevice? What is the size of .hex file? Posted at 2021-09-10 by @fanoush well, it builds full hex file automatically that should include softdevice+app+bootloader+bootloader settings with correct app checksum+uicr just bootloader + app from bin or app hex file is not enough
Posted at 2021-09-10 by yngv126399 I am glad you guys are here to reality check me. I had built using DFU_UPDATE_BUILD=1 which yielded a much smaller hex (really app_hex) file. Removed that define... now have a real .hex file. Now Pinetime is visible... thank you! Posted at 2021-09-11 by yngv126399 I'm not an EE, so sorry for the newbie questions: but how do I set a pin high in a build? Looks like pinetime has a button enable pin to set so the button pin itself works. can I do that in the board file? Super newbie: is P0.01 map to D1 in Espruino? Are the pins mapped 1:1? Thanks! Posted at 2021-09-11 by @fanoush needed same thing for ID130 recently https://github.com/fanoush/ds-d6/tree/master/espruino/DFU/ID130Color see the jswrap stuff and board file, there is method marked init. it should probably go to libs but I put it right next to board file to boards/ for setting pin high this is not best example, better see this https://github.com/espruino/Espruino/blob/master/targets/nrf5x/jshardware.c#L688 yes they are 1:1 Posted at 2021-09-13 by yngv126399 I'd post this in a new question, but can't seem to find the new post button ??? Is there any way to set a pin high in the board definition file. The pinetime's main button (D13) will only work if D15 is pulled high. I can do this in code and it's fine, but I'd like it set up before we enter .boot code so it can trap button press early. Posted at 2021-09-13 by @fanoush
not directly but I thought I already provided solution above when you asked for the first time :-) anyway, without any code you could also make D15 into fake LED or second button and set it as inverted as that could produce initial state being high Posted at 2021-09-14 by Robin Mon 2021.09.13 Hi @yngv126399
The easiest way is to find the hyperlinks at the top of this thread Home >> Other Boards >> Porting to new Devices and Right-Click on the desired destination, Open in new tab most likely in this case the same Porting to new Devices topic. On the top Right hand side of the resulting page is the 'Post a Conversation' button. Posted at 2021-09-14 by yngv126399 @fanoush Ha, ha.. I was wondering if it could be done by the board file alone.. and now you've answered that! Going to try that, thanks. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-01-09 by Andrewmk
This https://store.pine64.org/?product=pinetime-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
Beta Was this translation helpful? Give feedback.
All reactions