Avatar for user73560

user73560

Member since Feb 2017 • Last active Jul 2018
  • 10 conversations
  • 85 comments

Most recent activity

    • 2 comments
    • 10 views
  • in Puck.js, Pixl.js and MDBT42
    Avatar for user73560

    Hi @Gordon,

    Range is a crucial for the project I work on. My tests with PUCK in open space reached up to 30 meters visibility, but in practice I am able to scan the adverstised data if the PUCK is up to 12 meters. As Bluetooth5 provides "LE Long Range", do you plan to revisit this option a year later?

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

    Hi @Gordon,

    Could you explain setAdvertising interval option ?
    I would like to save battery and decided to advertise data providing {interval:10000} the maximum possible, but in that time the device disappars and appears in the WebIDE, should I provide discoverable: true in order to be able always visible and connect to it?

    Which is the default value for the interval option? When should I prefer the minimum and maximum values ?

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

    Hi @Gordon,

    I upgraded two of my Puck from 1v97 to 1v99, uploaded a code and saved it.
    1) Device1 does not contain any code, all the times I save the code and restart it the code is missing.
    2) Device2 doesn't contained any code for the first 2 saves, after that somehow it succeeded to save it and is working as expected.

    Any ideas ?

  • in General
    Avatar for user73560

    Hi @Gordon,

    Where can we find 'Storage' module ? Any examples using it ?

  • in General
    Avatar for user73560

    Hi @Gordon,

    With 1v96 version of the PUCKJS firmware I was able to do following:
    1) Produce hex file from the java script
    2) Merge the firmware hex with the hex file from above

    Once the hex file from 2) was uploaded I had a firmware with uploaded code from 1)

    This is not possible with PUCKJS firmware 1v99.50 version, is there any reason for that ?

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

    Hi @Gordon,

    Could you explain more about "DFU_PRIVATE_KEY=targets/nrf5x_dfu/dfu_p­rivate_key.pem" specified during the build ?

    This file contains private and public key. My understanding is that the generated zip file used for DFU and initial firware upload will be signed with the private key but will contain only the public key. When the device needs a DFU update the uploaded zip file will be tried to be opened with the public key on the device. If the zip cannot be opened then it is signed with different private key, thus we can be sure that on the device can be uploaded only firmware singed with the appropriate private key right ?

    Thank you!

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

    Hi @Gordon,

    Suppose you have

    var zero=Puck.mag();
    
    function onMag(m) {
     m.x -= zero.x;
      m.y -= zero.y;
      m.z -= zero.z;
      var v=Math.sqrt(m.x*m.x+m.y*m.y+m.z*m.z).toF­ixed(0);
     console.log(v);
    }
    
    function main() {
         Puck.on('mag', onMag);
         Puck.magOn();
    }
    

    Multiple calls to main() will result multiple calls to onMag() function, which once the mag is stopped (Puck.magOff()) all are stopped and started if the mag is on (Puck.magOn()). Is there something like an id of the previous callback in order to be stopped ?

    Calling main() 10 times you will have v like that:

    21
    1167
    2355
    3543
    4731
    5919
    7107
    8295
    9484
    10672

    i.e. mag values are exploding even without magnet close to the Puck.

    I came upon this issue because in general I have:

    function myMain() {
         Puck.on('mag', onMag);
         Puck.magOn();
    }
    
    E.on('init', function() {
      myMain();
    });
    
    myMain();
    

    which once the code is uploaded everything is working fine, but when saved I have two callbacks on the mag, if you save it again you will have three callbacks on the mag, etc. How can I have a single function where to receive the current mag values ?

    Thank you!

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

    Hi @Gordon,

    The fix you provided is working fine, thank you!

    Anyway I have a situation where Device2 for some reason hangs, i.e. it cannot be accessed via bluetooth unless it is restarted. Is it possible to get the last exception or failure somehow ?

    Thank you!

Actions