Solid green light, hard reset not working

Posted on
  • I suspect that Puck somehow bricked during connect/disconnect or flash memory update. Green LED stays lit even when I try hard reset. Please help if there is any way to reset the Puck, same thing happened to 2 devices today, I'm not sure what is the cause and I don't want to keep breaking them. Console log:

    Connected to Web Bluetooth, Puck.js 1363
    index.js:92927 >>> Minifying
    index.js:92927 >>> Minification complete
    index.js:92927 Uploading 2393 bytes to flash
    index.js:92927 Found a prompt... great!
    index.js:92927 >>> Sending...
    index.js:92927 --->

    BUNCH OF CODE HERE

    index.js:92927 Splitting for reset(), delay 250
    index.js:92927 >>> Sent
    index.js:92927 BT> Disconnected (gattserverdisconnected)
    index.js:92927 Disconnect callback... {"port":"Web Bluetooth","portName":"Puck.js 1363"}
    index.js:92932 [notify_warn] Disconnected from Web Bluetooth, Puck.js 1363
    console.warn @ index.js:92932
    index.js:92927 >>> Disconnected from Web Bluetooth, Puck.js 1363
    index.js:92927 >>> Connecting...
    index.js:92927 Set Slow Write = true
    index.js:92927 BT> Starting device chooser
    index.js:92927 BT> ERROR: NotFoundError: User cancelled the requestDevice() chooser.
    index.js:92937 [notify_error] Connection Failed: NotFoundError: User cancelled the requestDevice() chooser.
    console.error @ index.js:92937
    index.js:92927 >>> Connection Failed: NotFoundError: User cancelled the requestDevice() chooser.
    index.js:92927 >>> Connecting...
    index.js:92927 Set Slow Write = true
    index.js:92927 BT> Starting device chooser
    index.js:92927 BT> ERROR: NotFoundError: User cancelled the requestDevice() chooser.
    index.js:92937 [notify_error] Connection Failed: NotFoundError: User cancelled the requestDevice() chooser.
    console.error @ index.js:92937
    index.js:92927 >>> Connection Failed: NotFoundError: User cancelled the requestDevice() chooser.
    index.js:92927 >>> Connecting...
    index.js:92927 Set Slow Write = true
    index.js:92927 BT> Starting device chooser
    index.js:92927 BT> ERROR: NotFoundError: User cancelled the requestDevice() chooser.
    index.js:92937 [notify_error] Connection Failed: NotFoundError: User cancelled the requestDevice() chooser.
    console.error @

  • Sat 2021.08.21

    Hi @user133430 although I might not have the exact response you are seeking, there are a few questions that others may need to get you back on track.

    Which Puck version (hardware) are we working with?

    Should that not be known, about how long ago was the Puck purchased and from which vendor?

  • Hi,

    It's extremely unlikely you bricked the Pucks - there's quite a bit of code in there to stop you accidentally getting them into a state where they no longer work.

    The usual solid green light is just when you boot the Puck with the button held down and then release it too early (in which case it enters bootloader mode)... What happens if you insert the battery into the Puck while keeping it held for at least 15 seconds?

    The logs you post up sound fine, but to see if it's reproducable I'd need the actual code you posted up.

  • Looks like there is still hope to make them work again :) I'll be home tomorrow and will send some pictures of what is going on. When I tried to hard reset it, green light will be on, then after a few sec blue LED will light up quickly and that's it.

  • Hi, so I ordered puck from here https://www.adafruit.com/product/3372, V2 . I also did flash it with firmware, don't quite remember the version it had. It's basically behaving like I'm pressing the button during startup while I'm not doing that and it's out of the case. I'll try to see if I'm able to get it connected with nRF Toolbox and flash the latest firmware.

  • The code I'm uploading. Basically, it allows me to connect my android app and retrieve log files.

    var currentLog = {};
    var log = {};
    
    function ut(epoch) {
      setTime(epoch);
    }
    
    function listFiles(f) {
      f = typeof f !== 'undefined' ? f : /.log$/;
      return require("Storage").list(f);
    }
    
    function eraseOldest(files) {
      require("Storage").erase(files[0]);
    }
    
    function eraseAllLogFiles(files) {
       console.log(files);
       for (i=0; i <= files.length; i++) {
         console.log("erasing "+files[i]);
         require("Storage").erase(files[i]);
       }
    
    }
    
    //Record sensor data and dump in file when buffer exceeds 96 entries for 24/hr
    function fillLog() {
      var data = Puck.capSense();
      var date = (new Date()).toISOString();
      //Write to RAM if less than
      if (Object.keys(currentLog).length < 5) {
        currentLog[date] = data;
      } else {
        var files = listFiles();
        //Check if storage is full, cleanup oldest
        if (files.length > 5) {
          //Deleteing files to write new
          eraseOldest(files);
        }
        //Wirite to file if log is full
        currentLog[date] = data;
        currentLog["lastdate"] = date;
        require("Storage").writeJSON(date + ".log", currentLog);
        currentLog = {};
      }
    }
    
    function getData(file) {
      if (file == "undefined") {
        return require("Storage").readJSON(listFiles()[0]);
      } else {
        return require("Storage").readJSON(file);
      }
    }
    
    //Sync data fromDate defines latest log files we want to receive
    function sd(fromDate) {
      var files = listFiles();
      for (i=0; i <= files.length; i++) {
        console.log("&&")
        var file = files[i];
        if (typeof file !== "undefined" && Date.parse(file.substr(0, file.indexOf("."))) > fromDate) {
          log = require("Storage").readJSON(file);
          console.log(log);
        } else if (typeof file == "undefined") {
          console.log("DONE")
          return;
        } else {
          console.log("No logs found for this date range");
        }
      }
    }
    
    function startMonitor() {
      //setTime(epoch);
      setInterval(fillLog, 2000);
    }
    
    // Change the name that's advertised
    NRF.setAdvertising({}, {name:"Test"});
    
    var Blink = function(times, frenquency)
    {
      for(var i = 0 ; i< times ; i++)
      {
        setTimeout(function() { LED1.write(true)}, frenquency*2*i+1);
        setTimeout(function() { LED1.write(false)}, frenquency*2*i+frenquency);
      }
    };
    
    NRF.on("connect", function(addr) {
      Blink(4,250);
      
    });
    
    NRF.on("disconnect", function(addr) {Blink(2,250);});
    
    //DELETE FOR PROD
    eraseAllLogFiles(listFiles());
    
    //MONITOR ON STARTUP
    startMonitor();
    
  • Mon 2021.08.23

    When I tried to hard reset it, green light will be on,

    @Gordon pointed out an attempt removing the battery in post #3 What was observed performing that removal test?


    Nothing stands out; nit picky here 'sppiling' ;-) error   frenquency <== frequency

    L88   Not sure if this works as desired, but is it known that the timeouts will execute inside the loop immediately queue'ing up and overlap each other. Might lead to an odd visual blinking.


    L4 function ut() and L48 function getData() defined but not used


    On second look, UNTESTED however this appears suspicious:
    L99 passes a function as the argument. L17 parameter is used as an Array in L20

    Is this intentional?


    I also did flash it with firmware, don't quite remember the version it had.

    Please post the results of process.env

    https://www.espruino.com/Reference#t_l_process_env

  • Thanks for posting the code up - I don't see anything that could cause an issue in there at all, it looks really neat.

    Only thing I'd say is I guess it's for testing, but:

    //Record sensor data and dump in file when buffer exceeds 96 entries for 24/hr
    function fillLog() {
      // ...
      if (Object.keys(currentLog).length < 5) {
    

    Unless I am misunderstanding, it's writing every time there are 5 log entries, and it's being called every 2 seconds so it'll be writing a new log file every 10 seconds...

    It's basically behaving like I'm pressing the button during startup while I'm not doing that and it's out of the case

    Let me know how you get on, but is it possible that you were just accidentally pressing the button? It's actually really easy to do - I've done it plenty of times and I know others have too.

  • Thank you all for looking into it, I was able to "fix" them by updating firmware with nRF Toolbox app. I also made a video of the issue when trying to hard reset it: https://youtu.be/zg66NeCJJPk

  • Thanks for that video, and for managing to sort it out yourself! That really is odd - I'll add that to the troubleshooting.

    What I think must be happening then is that somehow the Puck.js firmware got corrupted - and so the bootloader tries to boot, fails, and then just reverts to bootloader mode.

    If you figure out some code that you can upload that reliably reproduces the issue, please can you post it up (or send it privately if you don't want to share publicly) then I can see if I can get a fix into the Puck.js firmware.

  • I had the Same issue today, puck.js is new v2.1a. is there now a fix for it?

    With best regards

  • Did you just accidentally plug the battery in while holding the button down? That's the problem 99% of the time.

  • I found out with someone that it has something to do with Android, on the PC everything works without problems

  • ISSUE RESOLVED: Follow instructions here. http://forum.espruino.com/conversations/­340193/#comment14961911

    Install the firmware via your iPhone. It requires you downloading a zip file of the firmware you're looking for, but I had no success after a lot of trial and error until I attempted this.

    I just got my PuckJS today. I'm now seeing this issue as well.

    I'm a M1 Mac user. I tried updating the firmware from 2.15 (?) to 2.17 (?).

    I cannot hard reset it -- it does seem like I may have managed to corrupt the firmware and can no longer boot. Any help would be greatly appreciated!

    Sorry, the firmware update has failed.

    The error was: Error: The state of the DFU process does not allow this operation

    Please try again, or check out the Troubleshooting page for what to do next.

    Afterwards, I get a solid blue light. If I remove and replace the battery, I'm stuck in boatload mode again and will get the same error as above if I try to re-flash. I am unable to connect to the device in any way other than attempting to flash it

    Loaded code from local storage.
    No code in storage.
    serviceworker> active
    Handling URL "https://www.espruino.com/ide/#"
    Downloading https://www.espruino.com/binaries/espruino_2v17_puckjs.zip
    >>> Downloading binary...
    >>> Done.
    stepFlashNordicDFU:  [object Object]
    [success] Initialising...
    >>> Initialising...
    >>> Initialising...
    connected to gatt server
    found DFU service
    found 2 characteristic(s)
    [success] Updating application: espruino_2v17_puckjs_app.bin...
    >>> Updating application: espruino_2v17_puckjs_app.bin...
    >>> Updating application: espruino_2v17_puckjs_app.bin...
    connected to gatt server
    found DFU service
    found 2 characteristic(s)
    found packet characteristic
    found control characteristic
    enabled control notifications
    transferring init
    crc32 not found, skipping CRC check
    init packet already available, skipping transfer
    transferring firmware
    >>> Uploading...
    crc32 not found, skipping CRC check
    written 1420 bytes
    notify: Error: The state of the DFU process does not allow this operation
    
  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Solid green light, hard reset not working

Posted by Avatar for user133430 @user133430

Actions