F07 "disappeared"

Posted on
  • An SOS to anyone who may know... I followed fanoush's guide to reflashing an F07 and it seemed to go just fine, after all was said and done, it showed up in the Web IDE and I got the REPL. I was trying to play with Graphics which didn't seem to be loaded, and I entered a few lines from another conversation here (the only other F07 conversation) and the REPL stopped dead, the connection was lost and I couldn't find the device anywhere (nrfConnect, DaFlasher, WebIDE). It was in a USB port the whole time, so it was charging. Can't understand how it hung... any idea how to reboot the thing other than let the battery die?

  • yes, if it is not accessible over bluetooth draining battery is the only option. Also if you uploaded the (now quite old) example code https://gist.github.com/fanoush/7f12afc4­74be509a37f13aa558e5f6dd then holding touch button for >10 seconds could trigger watchdog reboot.

  • Just to add that on Bangle.js (and the SMA Q3 build) there are two failsafes...

    • Pressing the middle button for ~2 secs effectively does a load() command
    • Pressing BTN1+2 for 10 secs (or Espruino hanging) forces a complete reboot, and if Espruino loads with BTN1 held down, nothing boots

    Potentially we could look at adding similar functionality to the other builds as well...

  • Those fitness trackers has only single button so the other input may be charger. So if it is on charger and you hold button for some time it can reboot and possibly skip boot if still held.

    Also there is another gotcha with those touch buttons, they are connected to regular gpio as digital input but there is some capacitive touch controller chip between button and gpio and this causes autocalibration issues like

    • the touch is not registered if you already hold it before poweron, or press early after poweron
    • if you hold it for longer time (6 seconds on DS-D6) it autocalibrates and take new state as not touched

    So in bootloaders for some of those devices (DK08,F07,F10,DS-D6) I have extra code that when put on charger with dead battery it vibrates and waits for 300-500ms so you could touch it after poweron and touch is registered as BTN1 press so bootloader can stay in DFU mode.

    This all is a bit different than bangle with physical and possibly multiple buttons

  • Thanks for all the input... I let it sit overnight, and when I plugged it into USB in the AM, it was awake and listening. I've tried your sample code @fanoush and it works great... except it's very dim. the g.setBrightness(n) doesn't seem to affect it. Tried enabling PWR.reset() in the .on() code too.. always the same brightness level (pretty dim).

  • unfortunately when it sleeps properly it can take even weeks to drain the battery so hopefully yours has something turned on.

    Mine is not dim but quite bright, however the F07 is strange in this, other devices has single pin that can turn the backlight on and off but this F07 I have still glows a bit until you completely disconnect all pins like done here https://gist.github.com/fanoush/7f12afc4­74be509a37f13aa558e5f6dd#file-f07-esprui­no-demo-js-L161 without doing this it draws power but also I had some issues turning it back on properly in such dimmed state, then it might be dim as you describe. Maybe you even have different device, the F07 has multiple firmware files and different device IDs, do you have firmware update zip downloaded by iband application? The device version is in the name, my F7 is 8077 and F10 is 8078, both work with exactly same code example, maybe yours is different?

    EDIT: now after re-reading your post I understand your one already recovered so that's great

  • Yes, it's back now, and I've already heavily borrowed your demo to make a basic watchface. But it's so dim you can't see it at all outside. I haven't updated the firmware from iBand.. will that restore it to factory (including the dual-zone program areas)?

    Hmm.. I may be past that point. iBand is not seeing the F07.

  • Hmm.. I may be past that point. iBand is not seeing the F07.

    yes, iband needs original fw but if you don't know which one to restore it is pointless now. if you had second one still with original fw bought at same time that would help.

    maybe there is another gpio for the backlight, so when it is dim you can try set 1 or 0 on another unused pins.

    BTW I have now updated the example https://gist.github.com/fanoush/7f12afc4­74be509a37f13aa558e5f6dd with current code I have in my F10 and F07 now so you may test if you see any change with backlight (don't remember doing anything with that so it is unlikely).

    the display driver is smaller and faster and there is clock as first screen

  • @fanoush Thanks for the update! Runs well on my F07 and now I see a vibrate() command! Can't say it's much brighter, but it's sure smoother. Nicely done. Clock is nice too ;-)

    So you're using the F10 more now? How is it different?

    Do you have a pinout list for this? Something I can experiment with to see if I can find a way to up the brightness?

  • nm. I see the pinouts in the source code. I've played with the init sequence and even changed PWR to D10 based on another's code, but it's still stuck at medium. Anyway, glad to have the vibrate!

  • So you're using the F10 more now? How is it different?

    F10 looks like this https://www.aliexpress.com/item/10050025­37290766.html , compared to F07 it is thinner and the display is smaller and dimmer and battery lasts less, so I wouldn't recommend it unless you like it. That is F10T - next model with temperature sensor, it may be still nrf52 but I am not sure. The original F10 is hard to get now. Also the F07 has successor named F77 that looks same (there is also F07T but that one is not nrf52!).

    Do you have a pinout list for this?

    Except the pins already in the source I know that pins 27,28 are related to HR sensor and then I stopped with reverse engineering and moved to DK08 and B5 which are more interesting devices, pinout for them is more or less complete now. B5 is like F07 but with GPS and SWD on USB pins so much better choice for similar price. Now I am using DK08 mostly daily as a simple watch. I still have partly decompiled F07 firmware somewhere, so far nobody was interested in more info.

  • I was trying to get a DK08 but they keep canceling as I guess stock is gone. But the B5 looks interesting.. Looks like I can use a RaspPi and OpenOCD to unlock it. Or maybe support BMP.

  • I was trying to get a DK08 but they keep canceling as I guess stock is gone.

    If anyone wants DK08 I have some unused spare ones and can part with one or two for cheap price. However if you go for Q3 that is of course better choice for many reasons, it has similar always on 176x176 display so there is no point having both (unless you want another cheap simpler watch with always on display).

    GPS in B5 is exactly the same model as in Q3 and it feels to have even better sensitivity as it has printed gps antenna into the plastic case outside https://i.ibb.co/Fqf8mXZ/IMG-20201103-17­4322.jpg

  • If you're not needing a spare, I'd be up for a DK08 (while waiting for the Q3 to be finalized). I was wondering if you have any interest in the full Android smartwatches that run the MT6739? I have a Thor 4 Plus with an OLED 1.3" round screen that's gathering dust. A different beast to tackle I'm sure, but I'll bet Espruino would scream on it... (I know, a lot of work to port it).

    Anyway, LMK how much you'd like for a DK08.

  • @fanoush I'm starting to work with the BMA222E and just loading your SPI code onto the right side of the IDE, and pushing it standalone onto the F07, to RAM. Everytime I send the code, it runs fine, but then disconnects (not sure if it reboots). This doesn't happen with watches where I have ample setInterval()s running. Is there a way to prevent it from "falling off the cliff"?

  • long code loops can cause this if you have watchdog set to manual mode on first lines, that watchdog is there on purpose but you can skip it if you wish or set it as automatic. watchdog is kicked from setinterval if button is not held so if that interval is not running it will reboot. also invalid memory access may cause reboot like e.g. wrong poke or peek command.

    also when you upload new code (= you delete the watchdog kicking setinterval) it will reboot as watchdog cannot be disabled

  • @fanoush Hello again... I'm interested in using the 2MB flash as "Storage" for the F07. Will I have to build that in via board file, or can I set that up in JS code? I realize I'll have to do some magic switching since it shares SPI with the accelerometer. Is this straightforward or am I asking for trouble? LMK when you can, thanks (as usual)!

  • It is in board file. If you want to build yourself check P8 board files. Actually just recently two storage areas were added and with some fixes it seems to work so I guess I'll make fresh build for some devices with that included. And if your accelerometer code handling shared SPI will be stored in internal flash it may even work. There is also "ram" attribute for function that would work too when function is stored in SPI flash. The point is to not have JS code handling SPI running from SPI. with accelerometer it should work easily, getting x,y,z it is basically just one spi read and interrupt pin is separate.

  • OK, good... thank you. I'd hoped that the shared SPI wouldn't be a huge deal, as you say, just set the pin, make a call, restore. A good experiment for me :-)

  • something like

    function accCoords(){
      var coords=Int8Array(fc.send([0x82,0,0,0,0,0­,0],D18).buffer,2);
      return ({x:coords[0],y:coords[2],z:coords[4]});­

    should work if you build with 'DEFINES += -DSPIFLASH_SHARED_SPI'
    that define allows Espruino to recover reading from SPI flash when you pull its CS ping high via D23.set(), "ram" would not be needed if the code was in internal flash.

  • Actually just recently two storage areas were added and with some fixes it seems to work so I guess I'll make fresh build for some devices with that included.

    Made some builds and SDK11 to SD12 upgrade package (larger MTU and other goodies), tested and works in my F07.
    Latest 2.10 has two storage areas which may be fun to test, there are probably still lot of ways to break it :-)
    Also board files are there to get the idea.

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

F07 "disappeared"

Posted by Avatar for yngv126399 @yngv126399