Avatar for Tesseract-Developer

Tesseract-Developer

Member since Oct 2019 • Last active Nov 2019
  • 0 conversations
  • 10 comments

Most recent activity

  • in Puck.js, Pixl.js and MDBT42
    Avatar for Tesseract-Developer

    Does it work on other readers, for example Android?

    Yes, the NRF.nfcURL(...) was tested with and Android tablet and older Android phone as well.

    @AntiCat did mention in http://forum.espruino.com/comments/14950­929/ that you need to add that extra bit of code for iPhone. Did you give that one a try?

    Yes. But I will be the first to say it's not clear to me what order to perform this. If you combine the code samples, it does not work - but I do not expect it to either. It has to be something so simple that I am missing:

    var data = new Uint8Array(16+872);
    data.set("\x00\x00\xE1\x10\x6D\x00\x03\x­00\xFE\x00", 0x0A);
    var tag = require("NFCTag").create(data);
    
    var vcard = require("NFCvCard").create("BEGIN:VCARD\­n"+
                                         "VERSION:2.1\n"+
                                         "N:Doe;John;;Mr.\n"+
                                         "FN:John Doe\n"+
                                         "TEL;WORK;VOICE:(111) 555-1212\n"+
                                         "EMAIL:jondoe@example.com\n"+
                                         "END:VCARD\n");
    

    Maybe @AntiCat could post the full code used to get it working so I can copy/paste it on my end and see similar results?

  • in Puck.js, Pixl.js and MDBT42
    Avatar for Tesseract-Developer

    Hello @Gordon, thank you for your response.

    It's just the VCARD code that is the issue?

    That is correct. nfcURL works without issue and can be read with multiple devices.

  • in Puck.js, Pixl.js and MDBT42
    Avatar for Tesseract-Developer

    @Robin What am I missing here? I have provided what I thought was everything you asked for, as well as steps to reproduce, in the order to reproduce them, as well as the code being used... the results... the lack of ability to read any information in a reader
    app... I also clearly stated that the once encountered error was no longer occurring in my very first sentence of #14.

    If I’m misreading your response as I’ve somehow offended you - I’ll be the first to apologize!

  • in Puck.js, Pixl.js and MDBT42
    Avatar for Tesseract-Developer

    I am purposely holding off on my testing results until I have that needed detail

    I think perhaps you are fixating on that point. As I said in #14, really it comes down to not being able to see or read any of the values that the replication steps listed are supposed to produce.

  • in Puck.js, Pixl.js and MDBT42
    Avatar for Tesseract-Developer
    
    >process.env
    ={
      VERSION: "2v04",
      GIT_COMMIT: "3956264e",
      BOARD: "PUCKJS",
      FLASH: 524288, RAM: 65536,
      SERIAL: "34a36385-8ce8164e",
      CONSOLE: "Bluetooth",
      MODULES: "Flash,Storage,hea" ... "S,crypto,neopixel",
      EXPTR: 536882364 }
    >process.memory()
    ={ free: 1977, usage: 273, total: 2250, history: 170,
      gc: 0, gctime: 3.63159179687, "stackEndAddress": 536924008, flash_start: 0, "flash_binary_end": 419924,
      "flash_code_start": 442368, flash_length: 524288 }
    >
    

    What OS is the WebIDE running on?

    WebIDE is running on OSX 10.14.6

  • in Puck.js, Pixl.js and MDBT42
    Avatar for Tesseract-Developer

    I'm not seeing minification having any real effect on my outcome unfortunately. My software is 2.04 and hardware 1.0e as well.

  • in Puck.js, Pixl.js and MDBT42
    Avatar for Tesseract-Developer

    @Robin - let me clarify, as of post #12 no error is reported on the Send to Espruino, however nothing appears on the NFC reader either. After clicking send in the WebIDE, the following is reported:

    Found PUCKJS, 2v04
    Connected to Web Bluetooth, Puck.js xxxx
    No errors in NFCvCard. Minified 2877 bytes to 634 bytes.
    

    So, I presume the original code module from post #1 is working then?

    ...not that I can confirm using the same NFC Reader app as post #1.

    Is the module 'NFCTag.js' also used locally, and physically there as implied in post #12 ?

    No. However internally NFCvCard has the require("NFCTag").create(); inside, which per the module documentation should load.

    To replicate what I am doing in its entirety, download the NFCvCard.js locally to your modules folder, paste the following code in your editor, and upload.

    var tag = require("NFCvCard").create("BEGIN:VCARD\­n"+
                                         "VERSION:2.1\n"+
                                         "N:Doe;John;;Mr.\n"+
                                         "FN:John Doe\n"+
                                         "TEL;WORK;VOICE:(111) 555-1212\n"+
                                         "EMAIL:jondoe@example.com\n"+
                                         "END:VCARD\n");
    

    Once the upload completes, attempt to verify the values with the NFC reader.

  • in Puck.js, Pixl.js and MDBT42
    Avatar for Tesseract-Developer

    Hi @Robin, in order to get this working "as-is", I ended up having to use the NFCvCard.js as a local module per post #1 above.

    I'm still unable to do any reading, but the code is the same as well:

    var tag = require("NFCvCard").create("BEGIN:VCARD\­n"+
                                         "VERSION:2.1\n"+
                                         "N:Doe;John;;Mr.\n"+
                                         "FN:John Doe\n"+
                                         "TEL;WORK;VOICE:(111) 555-1212\n"+
                                         "EMAIL:jondoe@example.com\n"+
                                         "END:VCARD\n");
    

    Also using the same NFC Reader app as post #1.

  • in Puck.js, Pixl.js and MDBT42
    Avatar for Tesseract-Developer

    Hi @AntiCat, thank you for your response.

    I'd like to specifically use code like what you posted in #1 above, with the NFC vCard in more human readable format. I attempted to simply change the "NFCvCard" to "NFCTag", but hit the following error:

    ____                 _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v04 (c) 2019 G.Williams
    >Uncaught Error: Function "set" not found!
     at line 1 col 77
    ...=NRF.nfcStart();this._data.set(a,0)
                                  ^
    in function "setData" called from line 1 col 15
    this.setData(a);var b=this;NRF.on("NFCrx",function(a){a&&b._­...
                  ^
    in function "c" called from line 1 col 8
    new c(a)
           ^
    in function "create" called from line 70 col 51
                                         "END:VCARD\n");
                                                      ^
    

    If what I'm trying to do isn't possible - please let me know.

  • in Puck.js, Pixl.js and MDBT42
    Avatar for Tesseract-Developer

    Is there an example of using this posted anywhere?

Actions