NFCrx in puckjs #3528
Replies: 12 comments
-
Posted at 2020-10-12 by @gfwilliams There's a library to handle it here: https://www.espruino.com/NFCTag Will that work for you? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-10-12 by afrid can you please help me how to use this api's. i want to receive the bytes and store in array, print to console or modify those as next step? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-10-12 by afrid i m trying very simple case. i want to make the puck as tag and receive contents from reader and print to the log ? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-10-12 by afrid Can you please provide me the sample code snippet or guide to work with NFC usecase. I mean to read and write operation of this puckjs as tag? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-10-12 by @allObjects Looks like you have to modify the module. Copy the uncompressed to your sandbox modules folder and modify the |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-10-13 by @gfwilliams Personally I would just write a handler for the Here's some code that works without using a module:
You can even control it using a webpage!
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-10-13 by @gfwilliams Just to add, you can see that the |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-10-13 by afrid i have burned the above code in puck,t i m not able to read /write(getting nfc error) the tag using Iphone ( NFC TagWriter by NXP app). i m trying very simple thing, make this puck as tag, receive the contents from the app and print the data to log. can you please help me in achieving that? can you little bit explain about the "NFCrx". what exactly ? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-10-13 by @allObjects @gfwilliams, great, simple AND complete example - comparable to a (http) request/response filter - and with no dependency what so ever - on the NFC bare bones. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-10-13 by @gfwilliams Thanks @allObjects! @afrid are you running with up to date Puck.js firmware? Could you read the Puck using 'NFC TagWriter' using the previous code I posted up or even when using I'm afraid I can't help you out more though - I've given you tested code that exactly what you want and works great on Android, but I don't have an NFC-enabled iPhone to try
It's called when a packet of NFC data is received from the NFC device, and then you have to respond to it. If you need more info about the protocol you need to search for the Honestly though it sounds like you might be better off using NFC as a simple readable tag and then using Bluetooth to set any data you want. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-10-13 by afrid Thanks @gfwilliams for reply. Yes i have latest firmware What actually i need to write to get that LED blink on puck.? What is the use of case 0xa2 in NFCrx event.? From html i understood that,need to send 'red' or equivalent button that turn on LED on puck,is my understanding is correct? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-10-13 by @gfwilliams Yes, you just need to send the text
Read the PDF I posted above. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2020-10-12 by afrid
Hi,
I'm trying to write the NFC tag in puck. so i m using NFCrx method.
i want to receive data and print to console?
also how can i erase this content on puck side, any api is there ?
please help me fixing this.
Beta Was this translation helpful? Give feedback.
All reactions