Avatar for remy

remy

Member since Dec 2016 • Last active Feb 2023
  • 3 conversations
  • 16 comments

Most recent activity

  • in Puck.js, Pixl.js and MDBT42
    Avatar for remy

    As per subject, I've got a puck (I think from the kickstarter campaign way back), and when I half insert the (new) battery, it powers up fine and probing the 3V and GND test points gives me 3.00v off the battery.

    But once I fully push the battery in, the voltage is around 0.2-0.4v - which explains why I couldn't connect to the Puck anymore.

    It's visibly clean inside the Puck and barely used. The cell battery is clean too.

    Is this a known (ideally fixable) issue?

    Any ideas or advice would be much appreciated.

    Thanks in advance.

  • in Bangle.js
    Avatar for remy

    thank you 👍

    • 3 comments
    • 1,864 views
  • in Bangle.js
    Avatar for remy

    I feel like I'm missing something obvious - but I've tried to hunt around first.

    How do I persist an app/code I've written myself to the bangle?

    When I upload from the IDE, returning to the menu on the watch loses the state that's been updated and I lose my software.

    Whereas apps I've uploaded via the banglejs.com/app "store" do persist. I gather I'm missing something (obvious?).

    Thanks in advance.

    – Remy

  • in Puck.js, Pixl.js and MDBT42
    Avatar for remy

    Yeah, putting the setAdvertising in the update did seem to do the trick.

    Still a bit weird that the name isn't set, though I can see it on the nRF Connect app if I explicitly read the value, but my browser (via webBT) is still reading the old "Pluck 1234" value. Not a biggie though.

    Now seeing if I can add some more services to this poor little puck!

  • in Puck.js, Pixl.js and MDBT42
    Avatar for remy

    One really weird thing I do see, is if I redeploy the code, the service no longer advertises correctly (it's like it completely resets).

    I'm having to do a hard reset on the puck to get back to advertising.

  • in Puck.js, Pixl.js and MDBT42
    Avatar for remy

    Quick update, I've got the heart_rate service advertising and "working". Note that I lifted the setAdvertising values from here and just copied the GAPSETADVDATA value into a hex array, but I really don't understand why it works.

    var hr = 65;
    
    function update() {
      hr++;
      if (hr > 120) {
        hr = 65;
      }
      
      NRF.updateServices({
        0x180D: { // heart_rate
          0x2A37: { // heart_rate_measurement
            notify: true,
            value : [0x06, hr],
          }
        }
      });
      
      setTimeout(update, 1000);
    }
    
    NRF.setServices({
      0x180D: { // heart_rate
        0x2A37: { // heart_rate_measurement
          notify: true,
          value : [0x06, hr],
        },
        0x2A38: {
          readable: true,
          value: [0x02]
        }
      }
    });
    
    
    NRF.setAdvertising([
      0x02,
      0x01,
      0x06,
      0x05,
      0x02,
      0x0d,
      0x18,
      0x0a,
      0x18
    ], {
      name: "puck heart", // this doesn't stick at all, no idea why
      showName: true,
      discoverable: true,
      interval: 600
    });
    
    // if I update too early, it seems like GATT is still trying to do the previous updates
    setTimeout(update, 2000);
    
  • in Puck.js, Pixl.js and MDBT42
    Avatar for remy
    • 0x06 in the heart_rate_measurement is the flags and says that it's got contact.
    • 0x40 is the heart rate
    • 0x02 is the sensor location value
Actions