Avatar for user73560

user73560

Member since Feb 2017 • Last active Aug 2017
  • 4 conversations
  • 46 comments

Most recent activity

  • in Puck.js
    Avatar for user73560

    Hi @Gordon,

    How can I read all the information stored ? When I try

    E.toString(f.read(0))
    

    it dumps "xxxxx"..."xxxxxx", i.e. prints just the beginning and the end of the stored string if it is too long ?

    Thank you!

  • in Puck.js
    Avatar for user73560

    Hi @Gordon,

    Which magnetometer do you use in the Puck ? Is this a suitable one http://www.nxp.com/docs/en/data-sheet/MA­G3110.pdf ?

    Thank you!

  • in Puck.js
    Avatar for user73560

    Hi @Gordon,

    This is what I needed, it's working. When the FlashEEPROM data is cleared ? On firmware update and lack of power like battery change ?

    Thank you!

  • in Puck.js
    Avatar for user73560

    Hi @Gordon,

    I need first zero to be saved forever, my starting point for any calculations. So one approach could be, on first code upload to save externally the first zero, and also save it on the Puck which will survive during resets. If a new code is uploaded it must be saved, containing the first zero as value and discard the current Puck.mag() value. What do you think ?

    Thank you!

  • in Puck.js
    Avatar for user73560

    Hi @Gordon,

    I have a magnetometer related question and think this post could host it, if not please move it.

    I need to reset the magnetometer upon my command, now can I do that ? Now when you upload a new code or restart the Puck, the magnetometer value is reset. Do you have a possibility somewhere to store the last value take it once restarted ? Can I do that custom implementation on my own ?

    Thank you!

  • in Puck.js
    Avatar for user73560

    Hi @Gordon,

    Thank you for the bonding functionality, I tested it with latest build and it seems to work! How can I execute https://www.espruino.com/Puck.js+BLE+UAR­T with bonding ? In general, accessing the primaryService and characteristics should happen after bonding right ? Do you have any docs for it ?

    Thank you.

  • in Puck.js
    Avatar for user73560

    Hi @Gordon,

    IP is the MAC address of the device that can connect to the Puck.

    Concerning the process of update through firmware, how secure is it ? Once the package is on the party which is doing the update could it be decoded and source revealed, if we talk about the "bin" and "dat" file in the firmware I think not, but please confirm.

    If not, should I build from https://github.com/espruino/Espruino with my code added in it ? Should I write the new firmware functions in "C" or I can pass my existing my Javascript code and Espurino translate it to C and include it into the distribution package ?

    Thank you.

  • in Puck.js
    Avatar for user73560

    Hi @Gordon,

    I think that a workable security scenario could be:

    1) Provide a password and decrease transfer speed on start up - this will protect the uploaded code from being viewed or modified. Here we will save a mapping between the Puck MAC address and the generated password.

    2) Once the client receive the Puck with the uploaded code it should create "bonded" connection from the Gateway(Android phone, for example which will gather all the data), and will set IP for access where onConnect will disconnect any different than the provided IP connections and will automatically generate a password for all getter characteristics to protect them from other unauthorized third parties.

    3) If the Puck requires a new code, the most secure way of doing that is to send to the client physically a Puck with the new code, secured in same way as described above in 1), where it has a mapping between IP and password only for the Pucks that have to be updated. The new Puck should initiate "bonded" connection one by one with all Pucks that have to be updated and will "self-propagate the code".

    What do you think ?

    Thank you.

  • in Puck.js
    Avatar for user73560

    Hi @Gordon,

    Thank you for your advises!

    • Suppose the code is saved and the "Password" in 1) is lost, how could the Puck be flashed for a new code to be saved ?

    • Is it possible two Pucks to be bonded, if so could you give an example ?

    Thank you!

  • in Puck.js
    Avatar for user73560

    Hi,

    Do you think that following approaches are good for production:

    1) Provide password and decrease the transfer speed

    E.on('init', function() {
      E.setPassword("Password");
      E.lockConsole();
      NRF.setLowPowerConnection(true);
    });
    

    All possible password combinations based on this https://math.stackexchange.com/questions­/2103361/derive-an-algorithm-for-computi­ng-the-number-of-restricted-passwords-fo­r-the-gen#2103361
    combined with the low response speed, practically makes the Puck unbreakable ?

    2) Protect your functions with password ?

    function someFunction(pwd, parameters) {
      if (pwd!='FunctionPassword') {
        NRF.disconnect();
      }
      // process the request
    }
    

    Thank you.

Actions