Kospet Magic 3 smartwatch

Posted on
Page
of 2
/ 2
Next
  • Just to let you know that there is now a build of Espruino for Kospet Magic 3 watch. This is nRF 52840 watch with full touchscreen one button and 240x280 color display.

    It is similar to P8 or P22 watch just with 52840 instead of 52832 and a bit larger display. Like P8 it is available on aliexpress from many sellers. Like P8 it uses DaFit app and the firmware update procedure allows reflashing the watch without taking apart via DaFlasher android app.

    some info at https://github.com/fanoush/ds-d6/tree/ma­ster/espruino/DFU/Magic3

    Apart from more memory available, the SPI bus in 52840 is 4x faster so the display update is also 4x faster than with P8 watch.

    BTW Magic3 is basically same hardware as Kospet Rock so some variants of those will work out of box too.

    One more comment - Espruino build != Bangle.js , this is just the interpreter, to make it more like Bangle it needs additional effort similar to what e.g. @jeffmer did with P8 https://github.com/jeffmer/P8Apps

  • That's great!

    Do you build with the jswrap_bangle.c included? Hopefully some minor changes and you could have some Bangle.js compatibility there. Hopefully as more apps move to using the Layout library and touchscreen for Bangle.js 2 there might actually be a decent amount of apps that work out of the box.

  • Actually, for the P8, I did not use jswrap_ bangle.c as I found it easier to develop drivers in Espruino. I intended to put these into C afterwards but the Espruino driver performance seemed quite useable so I did not bother. I plan to look at using the new Layout and touch UI stuff in the coming weeks as it should then be possible to run standard Bangle apps on the P8.

  • Do you build with the jswrap_bangle.c included?

    well, no, the https://github.com/espruino/Espruino/blo­b/master/libs/banglejs/jswrap_bangle.c is quite big source with lot of bangle hardware specific assumptions. Long time ago I tried this with P8 and failed. Also lot of development goes into this file so maintaining fork with changes in this file can be nightmare. it could help if this would be splitted to separate files with drivers for specific hardware (touch, gps, compass, display,...) with some abstraction so only the generic stuff would remain in Bangle but it is probably lot of refactoring and lot of work.

    Also what I like on Espruino is the javascript side where you can change things easily without making new build so I'd prefer lot of this stuff that is not performance critical to be in javascript library like e.g. all stuff in http://www.espruino.com/modules/

  • I did not use jswrap_ bangle.c as I found it easier to develop drivers in Espruino.

    Yes, me too.

    I just searched in your source tree but did not find it, do you have some Bangle methods implemented in javascript? I think you or somebody else had enough Bangle object stubs implemented so most app would work.

  • Yes, but I am afraid that I did not follow the Bangle conventions exactly so my apps did require tweaks. I agree with your views on jswrap_bangle.c but I think the new touch and layout stuff is worth getting to work on the P8.

    BTW does the Kospet Rock have a touch screen? It looks like it has three buttons.

  • BTW does the Kospet Rock have a touch screen? It looks like it has three buttons.

    yes, it is same hardware as magic3, some revisions need different display init commands. Also it only looks like it has two buttons on right side but I think both are actually same pin. At least there is for sure one revision of Rock where it is same pin. It is same with magic3, some screenshots show the button as rocker/up/down type with two labels like the rock buttons but it is in fact only one button. We've seen both taken apart and both had exactly same PCB inside. one review here noticing it too https://youtu.be/tzVMk1L6Ib0?t=127

  • It looks like it has three buttons.

    Correction, @yngv126399 has Kospet Rock which does have two separate buttons on two separate GPIOs.
    EDIT: and looks like I was wrong, even the other Rock had two real buttons despite the firmware not using it, the PCB is same like Magic3, the difference is in flex cable to button in Magic3, there are only 2 wires in that one, there are 3 wires in Rock. So if you care for 2 buttons go for Rock.

  • I have now finished an initial version of a Bangle compatible environment for the ROCK and Magic3 watches. You can find it in this repository. The firmware uses a double buffered version of lcd-spi-ubuf.c which combined with 32Mhz SPI gives much faster screen update than was possible on the P8. The Bangle emulation is implemented in Javascript so is easy to update. Emulation functions are loaded into the NRF52840 internal flash for better performance. They allow you to load apps directly from the Bangle App Loader if you ignore the warnings, however, since the ROCK and Magic3 have very few sensors it is really only Clock apps that are truly portable. As an example, the Wave Clock which runs on both Bangle and Bangle 2 is shown below running on the ROCK - it was loaded straight from the official Bangle App Loader:

    inage

    The emulation has versions of setUI options so menus and prompts work.

  • @jeffmer,

    like that very much (post #3 - missed it while in 'forum's display time window'):

    I did not use jswrap_ bangle.c as I found it easier to develop drivers in Espruino.

    Why? I't is core to Espruino.

    With faster and even lower power hardware (and enough memory), the next step may for many things be left out completely:

    I intended to put these into C afterwards but the Espruino driver performance seemed quite useable so I did not bother.

    Moving to layout, I see now the same challenges as with the hardware: the abstract / common parts can be integrated where the very specific ones need their own implementation. I had suggested a while ago to have layout eco system to have the ability to 'branch out' because scaling is not a complete solution. In this case of a rectangular vs a square display, it would be nice to have the ability of unique layouts. I understand @Gordon 's reasoning to not get there, because it is not only not in his (current) set of hardware options, but also: Who is willing to build these things in the first place while having only one particular hardware, and who will update / complement the existing applications, etc. Longterm, I though see suitable source structure and build and runtime infrastructure to come to be, since also @Gordon has to respond to the hardware evolution - as he did for his own boards.

  • jswrap_bangle has had quite a few changes recently since it now has to support at least 3 different bits of hardware. I know it's a mess (and yes, refactoring would be nice) but I think that now actually adding extra hardware in there won't be the end of the world.

    Great that you can emulate it in JS though!

    I think with Layout there are probably some hacks you could do to make it attempt to lay things out nicely on a circular screen... It'd be nice to have that flexibility anyway

  • Tried it on a Kospet Rock, firmware: MOY-NAY3 and got a brick :(
    I followed the instructions to downgrade (verified the firm and it was OK, bootloader start addresses were OK), but it brick on step 7 from the tutorial.
    It entered bootloader (DfuTarg), and I've installed espruino_2v10.102_magic3-SPIFLASH.zip using DaFlasher, it was completed successfully but it wont boot anymore, the green leds from the heart rate sensor turn on very dimmed. (they get very bright for a small amout of time when I connect the charger, and then dim again)
    Even after battery dying , pressing button and connecting the charger wont enter bootloader.
    Don't know if it was bad luck or something related with the firmware/board version.
    If there's some incompatibility with this firm/board it may be useful to warn other users and prevent some bricks.
    Either way, thanks @jeffmer and @fanoush for this port.

  • Even after battery dying , pressing button and connecting the charger wont enter bootloader.

    you must release the button quickly after connecting charger, hold it for less than 3 seconds
    Also rock has two buttons, not sure which one it is, Magic3 has only one

    As for installing espruino_2v10.102_magic3-SPIFLASH.zip there is no known issue, it should work on Kospet Rock, however there is nothing on display if you expect that, it should be visible on Bluetooth only.

  • Tried that combination with both of the buttons and it didn't work.
    I'm searching for BT devices after doing the combination and no device appear.
    There's a small chance that the battery is not fully drained, I will wait one more day and try again.

  • Not sure how your Rock/Brick turned out, but if it's still bricked, consider opening the watch. The Rock is VERY simple to open, then you can use SWD to flash new firmware.

  • How simple?
    I removed the screws, but it seems that they are merely decorative. And the other parts seem glued. tried hot gun with no luck.
    Any tips for opening this?

  • Thank you very much!!!! it looks way easier on your video. It's open now :D
    I'm a bit lost now. Which pins do I need to connect to SWD interface?

  • https://drive.google.com/file/d/1hldJC7V­xSTJEAsg58bTm_5uf5vYUMxqG/view?usp=drive­sdk
    Up at the top under some foam, you'll see the 4 pins. from left to right: IO, CLK, 3.3, GND. Good to test them first though. If you leave the battery connected, you don't need to use the 3.3v.

  • updates:
    I was able to connect to SWD, but nrf chip was protected, disabling protection wipes the flash.
    I've used espruino_2v01_nrf52832.hex to be able to boot it.
    Followed the tutorial again from the step of flashing the bootloader via the Web IDE.
    Setting bootloader settings via Web IDE doesn't work, however via SWD I was able to modify the bootloader settings( IUCR partition).
    Tried to install a new espruino image but DaFlasher fails with error: "Error GATT ERROR".

    I think that maybe there is some problem rebooting to DFU mode, that's why DaFlahser is not able to read the BTLE service that is only broadcasted by DFU mode

    Any idea or any file that could help me unbrick the watch?

  • you flashed a hex file intended for a different board. The Rock is an nrf52840, which has more SRAM, flash and thus different addresses for DFU entry points, etc. So your board is in an unknown state, you'll need a full build of Magic3 with bootloader and soft device as a .hex file. Are you set up to do your own builds?

    BTW: the Rock is not an officially supported Espruino board, you won't find any firmware for it here.

  • You can try attached file to unbrick it via swd. it is full hex including softdevice and bootloader. I am not sure what exact configuration this one is built with but you can later update to something else. At worst it may clear the 8MB SPI flash with original dafit images and fonts but if you flashed any espruino zip named SPIFLASH before you already have it erased.


    1 Attachment

  • Thankd, another kind user as already shared an hex with me.
    I guess that there is some bug with the firmware "espruino_2v12.917_rockbuf.zip" I install "boot" and then "Main" and once I go install "launcher" it gives an error with "p undefined".
    With that firmware I can install all of the apps in the following order: "Boot ", "launcher", "Settings" and "Main" but then nothing is displayed on the screen.
    Older firmwares work fine, I'm using "espruino_2v11.STEP_rock.zip"

  • With that firmware

    not sure which one is that but the hex file I uploaded has no display driver built in so you won't see anything on screen with @jeffmer's apps. So for you it is probably useful only to get bootloader, softdevice and then use basic espruino console to trigger DFU and upload something else.

    As for builds made by @jeffmer I think the xx_rock.zip has unbuffered driver (=drawing go directly to screen) and xx_rockbuf.zip has buffered one that may need extra g.flip() call to push data to screen.

  • The “p undefined” means that there is no graphics instance. Boot creates a dummy one which is overridden when you load “main”. As @fanoush mentioned if the lcd driver is not in the firmware then that would explain the error.

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

Kospet Magic 3 smartwatch

Posted by Avatar for fanoush @fanoush

Actions