• Hi all,

    I am currently working on a project to try to turn the Puck into a NFC tag. However after reading the reference list I only found three functions regarding the use of NFC: NRF.NFCoff(), NRF.NFCon() and NRF.nfcURL().

    Looking through the github libraries I found another NFC function not found on the reference list, which is NRF.nfcRaw() with the function to

    Enables NFC and starts advertising with Raw data.

    NRF.nfcRaw(new Uint8Array([193, 1, 0, 0, 0, 13, 85, 3, 101, 115, 112, 114, 117, 105, 110, 111, 46, 99, 111, 109]));
    // same as NRF.nfcURL("http://espruino.com");

    But when I try to run that function on my Puck, I get an error:

    >Uncaught Error: Function "nfcRaw" not found!
     at line 1 col 5

    Does anyone know why this happens? Or is there any way the Puck can be used as a NFC tag through the nfcURL() function?

    Reference list: https://www.espruino.com/Reference#l_NRF­_NFCoff
    Github: https://github.com/espruino/Espruino/blo­b/c3aeae45d76eaa70e1ad373e8489c69d5834c2­60/libs/bluetooth/jswrap_bluetooth.c

  • That's because nfcRaw is due to be added in version 1v92 of Espruino - it's in the repository but not in the 1v91 binary (and so not documented yet).

    You could try installing a cutting edge build like this one: http://www.espruino.com/binaries/travis/­master/espruino_1v91.538_puckjs.zip

    Although it may not work - the best best is to wait for the 1v92 release.

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

Puck as an NFC tag? NRF.nfcRaw() function not found? [Puck.js]

Posted by Avatar for intern @intern