How to start interacting with the ACR122U-A9 NFC reader?
Asked Answered
B

0

8

I'm a junior PHP/JavaScript/HTML developer, recently hired by a company that makes photobooths. I had never worked in a Ubuntu system before this. This I find relevant because I think that for this reason I might be skipping an obvious step or something like that.

One of the projects I have to work on is adding a NFC device on the photobooths, so the user can just tap the area with their phone and get the pictures they just took. Sounds easy.

A previous employee bought an ACR122U-A9 device, that connects via USB, but they weren't able to make it work. I took the device and followed every single tutorial I have find out and I had no luck either.

What I have achieved after installing a great deal of things and blindly following tutorials is just this:

If I open a terminal, and type "pcsc_scan" it detects the device and it kind of "works", reading the cards if I tap them. I get some hexadecimal codes and some blue text that doesn't say anything to me. And while I do this I can't even type in the terminal so I cannot do anything at all to it.

What I actually want is to know how to make the computer speak to the NFC device, not listen to it. Well, I guess it has to listen to know when to send info.

I think that I'm missing something very obvious, because every tutorial I find just explains what kind of code you need to write to do X thing or how to make the device emulate a card or things like that... But I think I need something WAY more basic:

How do I even start to work and interacting with it?

Info that might be relevant:

  • I didn't specify how I got to the point that writing "pcsc_scan" makes something because A) I've done so many tutorials and different things that I don't remember what part of what I did accomplished this and B) I'd like to start from scratch in order to understand what am I doing.
  • I'm working on a Ubuntu 17.10 machine, but the final product will be working under Windows (different versions of it depending on the Photobooth)
  • Our photobooths work with a web-api in localhost. Everything is either PHP, JavaScript, CSS, or HTML. In the end I will need a way for the device to get the info it needs from one of these languages (if possible)
  • I'm still struggling with Ubuntu. Everything you try to install or interact with in this OS is done via commands that I don't completely understand and I repeat from random internet tutorials or forums like a parrot. Fixing this is not part of the question, I'll eventually learn this, but I think it might be useful to know that I might not even know some things that should be obvious or basic about it.
Buddha answered 27/4, 2018 at 8:14 Comment(10)
This is likely to close as "too broad", and as much as people want to help you, I am not sure it is ideal for the Stack Overflow format. My first thought is that the company has given you a task that would be suitable for someone with more Linux/hardware experience.Sorilda
The first thing for you and your colleagues to do is to determine if NFC can do what you want on its own. I think it is "tap to get a unique identifying string", which is useful to log you into a system (e.g. to pay at an NFC terminal). It transmits short pieces of information. However, you want to download images, which might be several hundred KB, or even a few MB. Can NFC do that? I would have thought BlueTooth would be more appropriate there.Sorilda
OK, it looks like you could use NFC peer to peer at a theoretical maximum of 424 kbit/s (see here).Sorilda
I also think that downloading images via NFC is a bad Idea, it might be too slow or even impossible. My boss wanted to try anyway, but my (personal) objective was to send an URL to the phone that has the pictures on it and call it a day. I don't know how to make this question less broad. If you had some advice on how to tune it up so it's more stack-worthy please share and I'll do all i can to fix it.Buddha
This question looks like it is contains some good approaches. Can you get hold of the demo software referred to in that question? They mention the same device that you are using. This may be useful as well.Sorilda
I'm checking the links you gave me @Sorilda , thanks. About this being done by someone more knowledgeable in Linux/hardware, there is simply no one in the company right now suited to do this, and it randomly fell on me the task to learn about it. Not much I can do about it but learn.Buddha
The links were found with this search. I haven't heard of "NFC peer to peer" before, but I got that phrase from the Wikipedia article. If you do not have colleagues that can help, you will need to do a lot of self-directed searching for this. Always do that before asking a question. :=)Sorilda
I'm not saying you should avoid the work - if you have been given a task to do, of course you need to work on it. I am remarking however that companies do not always allocate work wisely, and managers sometimes allocate complex work to folks who do not have the experience to tackle it. I am not saying you should give up (far from it, I think you need to be more persistent), but the correct answer may be "can we get some temporary external help with this".Sorilda
I know what you meant @Sorilda , english is not my native language and sometimes I don't convey what I mean properly, sorry. About the self-directed searching... I've been at this since monday, believe me when I tell you that I have searched far and wide. I believe the fault is in me, not recognizing the answer even if it hit me in the face or something like that... That's why I eventually asked here, I'm at the bottom of the barrel and with no more sanity left to do this by myself :SBuddha
Let us continue this discussion in chat.Buddha

© 2022 - 2024 — McMap. All rights reserved.