Espruino on your watch!

Posted on
Page
of 10
  • Thanks for this! That last Desay DS-W1 one looks very promising - although interestingly if you peer very closely at the last image it says nRF52840 :)

  • Oh, I see the 52840. Small but it is there. So the listing may be wrong. OTOH they may have invested a lot into their combined customized bootloader so they could stick to unsigned firmware after all. Just today I saw what adafruit did here https://github.com/adafruit/Adafruit_nRF­52_Bootloader/tree/master/lib/sdk11 or see https://github.com/adafruit/Adafruit_nRF­52_Bootloader/blob/master/Makefile#L114 they appear to actually link old SDK11 bootloader sources with newer SDK to support nRF52840 and legacy unsigned DFU(?). In theory Desay could do the same but the chance is of course very low.
    EDIT: they indeed use legacy unsigned DFU format with the nRF52840 becasue the readme points to https://github.com/adafruit/Adafruit_nRF­52_nrfutil which is old 0.5.3 nrfutil fork using legacy DFU, I use it with DS-D6 now. Maybe you could check that bootloader and use it with espruino too? The UF2 format support looks interesting.

  • I went through another list of firmware files from IBand android app, all of them are SDK11 legacy DFU packages (!) for nrf52832, here is a list of device names with available firmware binary

    A8 ASA306 CB606 CWatch1 Daily DK08 EC008 F07 F07A F07Lite F10 F10A F10U F1Pro H808 H818 HB049 HB08 HB080 K2 K5 K8 KETO L8 M01 M05 M08 M10 M520 M7 M98 Matr02 MCplus2 N108S N109 N68 N69 NarutoBand ONYX SL11 Smart SVC TF1 voyage W331 X9_00 X9_OP X9Pro

    you can google them like

    -name- smart "iband"

    with iband in quotes to avoid autocorrection to band, most of them are in >$30 price range but look very good, I think you will like most of them, so far I found M7 M10 M520 W331 F1pro DK08 K2 K5 L8 F10 F07 TF1 N68 N109 X9Pro (mainly on aliexpress, ebay, gearbest), listings mention iband app and nrf52832, so far F07 is cheapest - ~$17
    In theory all of them are updatable via OTA :-)

  • Wow, that's great - thanks! Just searched through and there's a bunch of interesting stuff in there!

    The H808/DK08 (same watch?) look particularly good with a reasonably big 176x176 screen. Still no full touch by the look of it.

    If I don't have any success going to the manufacturer (some of the newer ones seem to have nice high-res screens and a proper touchscreen) then those definitely look like the best bet.

  • Just to add, I had another poke at the IWOWN I6 HR C I'd ordered, and I got Espruino on it pretty easily using the link you posted previously: https://www.mikrocontroller.net/topic/46­7136#5716686

    I'd just forgotten to do the nrfjprog -f NRF52 --recover since they set the protection bits on it.

    Otherwise LCD, vibrate, touch buttons all work pretty well - I haven't tried anything else.

    Also it looks promising with the ID205 - it looks like I can get those programmed up at the factory and it'd be nice to have an nRF52840 plus a full touchscreen

  • Just to let you know - since yesterday banggood has 'flash deal' for Lenovo HX03W for $9.99. Typically it sells for $17-$25.
    I still don't have it in my hands so can't 100% confirm, but according to everything I know (FCC internal photos, android app, DS-10W firmware) it is a bit better DS-D6 - 128x64 OLED with same serial on data pins. I'm still waiting for one from Gearbest (should be here any day) and ordered couple from bangood as it is good price. But as I said no guarantee, just very high probability :-)
    EDIT:
    Oh, it is over and back to US$17.99 now, this happened yesterday too and today it reappeared for $9.99 so it may be still worth checking

  • wow, they already bumped the price, was to slow .... :-(

  • Got a DS-D6 earlier this week. Feels totally pointless, but fun :)
    If you open it, how hard is it to use the not used GPIO pins? Judging by the photos, getting a proper module is waaay easier...

    Oh, and a question: Can you "push" power from the DS-D6? The "USB" connector has two pins available, and I guess those can supply a small amount of current. But can you somehow direct power from inside the watch without sacrificing the data pins? And possibly still having the charging circuit. Possibly I ask for too much...

  • Well, if you want bare nrf52 module then perhaps just get one, these are like $4.5 on aliexpress :-)
    You mean pointless as fitness tracker to stay healthy or as Espruino board?

    I don't know how 5v input for charging could be also power output, possibly not. As for not used gpios, depends what you want to use, ther is reset pin (gpio 21), you can disconnect heartrate sensor and have plenty of gpios (test points are below LCD) or there is this unpopulated area near CPU which can host some spare GPIOs, see the photos.

  • Thanks, FCC has better photos!
    Didn't want to be negative. Pointless in a sense that already spent a couple of hours to recreate the functionality of an existing product :)

    edit: nevermind this I2C question, the INA226 wasn't on it's default address...
    The pins (D22, D23) on the USB connector should work for I2C, right? The pins themselves do work, I can read and write them. But tried to connect to an INA226, and that didn't respond :/ (possibly a dead board from aliex, maybe try another one...)

  • Didn't try i2c yet but I also hoped it would just work. Not sure if i2c has some vastly different needs from uart (as for e.g. pull up/down resistors), I guess not.

    BTW why to recreate existing functionality, that's pointless indeed, better make it run Tetris ;)

  • I2C -> Tested with a BME280, and I2C works just fine!
    The INA226 wasn't on its default address, but it's working too. And it's readings are waaaay off (it's supposed to be an accurate chip, but reads 3.2V VBus instead of 3.1V). Needs some more testing, but so far it doesn't smell genuine :(

    :)

  • My HX03W from gearbest finally arrived yesterday and it is very similar to DS-D6. Same DS-D6 espruino build works (flashed via D6Flasher without taking apart), most HW is same on same pins (button, motor, serial on USB pins, charger and battery voltage analog inputs, KX023 over i2c). Only OLED shows nothing and HR sensor does not light up the led when toggling pin 26 so I need to figure out those. Overall a success :-) So HX03W for $9.99 looks like even better deal than DS-D6 for $7.99. Now I am happy I ordered few more at that price. Hopefully they will do this deal again.

  • @fanoush do you have a datasheet or working code for the PAH8001 hearth rate sensor?
    All I could find is a short datasheet, and a "contact us for details" link :/

    Closest thing to any code is this link on mbed.com but there is no implementation, just a .h and a binary (for Keil?)

  • o you have a datasheet or working code for the PAH8001 hearth rate sensor?

    Would this https://github.com/fanoush/ds-d6/issues/­2#issuecomment-478360032 help?

  • The site seems to be down. :(

  • You mean the pdf datasheet? I think it was this one https://ufile.io/n7a7wh5d (30 day expiration)

  • Yes, the PDF. Downloaded now, thanks!

  • @AkosLukacs if you get something working don't hesitate to share :-)

    BTW I have display on HX03W sort of working. Still don't have pixels where I would expect them but mostly it works. Looks like it is SH1106 and same GPIOs are used for SPI,D/C,RST as with DS-D6, however there is some additional usage of D16 pin to provide more power(?). It needs to be configured as output and set to low for the OLED to have full brightness, otherwise it somehow works but gets very dim once I set contrast >15 (out of 255) or put more white pixels on screen. I did not take it apart so I have decompiled bootloader to see display initialization code. They do expected things with SPI,D/C,RST pins however they also pulse D16 high and low with some specific delay (50ms) at initialization time and then keep it low. Not sure why there is such timing but definitely there is no full brightness if D16 pin is not kept low.

  • Quick question: wanted to use E.enableWatchdog, because it's pretty hard to reset the watch if something goes wrong.
    Officially it's for official boards, but afaik fanoush's firmware (I'm using v.2v03.11 on a DS-D6) is pretty close to the MDBT firmware.
    My observations:
    E.enableWatchdog(1) - if no code running, and I don't do anything, the watch disconnects. Feels like 1-2 seconds, but that could be the BT driver in my laptop, or my internal watch is not accurate enough...
    If I type something + hit enter at less than 1 second intervals, it keeps running.
    If I set a for example 0.5 sec interval, it keeps running.
    On a train ATM, so can't check with other boards. Did these tests after reset, no other code running.

  • Because it takes 1 as 1 second? Try higher values. Anyway the manual mode may be safer. What about something like this

      E.enableWatchdog(5, false);
      setInterval(() => {
        if (!BTN1.read()) {
          E.kickWatchdog();
        }
      }, 1000);
    

    That should reboot if you hold button for >5 seconds. Which actually may not be best idea if this can happen normally but one can perhaps combine it also when being on charger (D2.read()).

  • Reading the docs, my impression was that in automatic mode, it's fine as long as I don't do an endless loop, or do something that takes too much time.
    But now re-reading this NOTE: On STM32 (Pico, WiFi, Original) with setDeepSleep(1), or nRF52 (Puck, Pixl, MDBT42) you need to explicitly wake Espruino up with an interval of less than the watchdog timeout or the watchdog will fire and the board will reboot.
    Does this mean because nRF52 devices go to sleep - without calling setDeepSleep - automatically, so you have to have some kind in wakeup call to prevent the watchdog reset?

    That long hold idea is good, was thinking about something like this. But yes, in this form it's not the best idea, just a drop of water, or anything that triggers the capacitive button long enough can cause a watchdog reset.

  • Does this mean because nRF52 devices go to sleep - without calling setDeepSleep - automatically, so you have to have some kind in wakeup call to prevent the watchdog reset?

    That's correct - auto mode will kick the watchdog each time around the idle loop - but on nRF52 it'll go to sleep automatically when not busy so won't get to kick it.

    Even something like this should be enough:

    E.enableWatchdog(5);
      setInterval("", 4000);
    
  • Thanks Gordon!

  • Just to let you know that there is now Espruino bootloader upgrade package and SDK12 based build of Espruino for DS-D6 here.

    After you upgrade to this you can build directly from Espruino source with no patches and update in same way as with any other Espruino nrf52 board (via nrfConnect over bluetooth).

    So if you just want to try Espruino and decide if it is any good the SDK11 based build is easier to flash and good enough. If you want all the features (I know only about secure connections currently not working in SDK11 build) and make your own builds easily then get this.

    To get there you need to first update Desay bootloader, then flash espruino bootloader with soft device and then flash espruino DFU zip.

    There is also recovery package to go back to Desay bootloader and older SDK/SoftDevice.

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

Espruino on your watch!

Posted by Avatar for Gordon @Gordon

Actions