NFC?

Where is the info on NFC hiding? I just DL'd the latest WEB Core doc and there's nothing there. I found a couple of videos, but they only linked to some run-time samples. Is there any way to use NFC yet?

Hi,

It's possible we overlooked adding it to the PDF documentation, we'll update it. However, until then you can find it in the online docs: TWebNFC - TMS WEB Core

1 Like

Thanks. Any ideas why it only works on Android devices and not anything else?

I want to be able to scan some tags that enter an ID code into my app, not trigger a URL to load. Desktops and tablets are preferred for my app, not a phone.

Have you guys found any inexpensive USB NFC / RFID readers that work, by any chance? I've been looking around for something, but 95% of what I find are the same devices from China that are intended to let you read and write NFC tags using a simple Windows app they provide. There's no SDK or anything to let you access the reader from you own app. I get that the browsers on mobile devices are going to try to use the internal reader, but iPads don't support NFC, nor do any desktops. So a generic USB device that's inexpensive that lets you read it would be a great find. (On AliExpress, I've seen those USB reader/writer things for $3-$5, but all you can do is run their software that's not entirely translated into English.)

Probably the Chrome team didn't get around to implement it for other platforms yet. The Web NFC compatibility table lists Android support only: Web NFC API - Web APIs | MDN

We haven't tested Web NFC with any 3rd party readers because of the lack of compatibility. For desktop maybe you can find a scanner that can be used via WebHID, WebUSB or Web Bluetooth but it probably won't be straight forward. Unfortunately, for iPad I don't really see any possibilities to get your own readings from NFC tags in a web application as none of the APIs above are supported on iOS.

1 Like

At the end of the day, NFC / RFID readers are not much different than card swipe readers and bar code scanners that return a character string. I don't understand why they're so complicated to deal with. You can get an NFC hat to plug onto a RPi for under $10 and they provide the code to talk to it. There are now combo devices that let you scan a mag stripe, read the chip, and read an NFC tag on credit and debit cards, and some are less than $30. I think I paid $45 for a Square reader that reads the chip and NFC, and communicates over Bluetooth with your computing device.

Somewhere along the line, folks are way overcomplicating this. It's just a thing that reads and returns a character string.

Yes, because somewhere along the line someone figured out that you can do 80% of the stuff you can do with NFC by using QR codes, with none of the security implications or hardware costs.

QR Codes are static once printed. NFC can be updated and serialized. QR Codes need a way to serialize a series of them so they're all unique. That will probably never happen unless you're using ePaper.

I know, they're not the same, just that with a bit of creativity they can be used to solve a lot of similar problems. You can embed a (fixed) URL of course, and other data, and someone "scanning" them like they might with an NFC scanner can be directed somewhere. LIke I said, 80% features, but a lot closer to 100% user coverage. Pretty much everything has a camera in it.

Well, the problem I'm trying to address is this: you have a deck of regular playing cards or photos or flash cards or sports cards and you want to do something where you have an app and you pick a card out of the pile or deck and tell the app what it is without having to type it in or speak it -- ideally, it's done with the card face-down so you don't even have to see it or know what it is yourself.

In my mind, the simplest is something where you can train the software to recognize the card via a camera.

The next two options would be to put an NFC tag (a small round sticker) or a 1-D or 2-D barcode (sticker) on the card.

The NFC tag can be read by waving the card + NFC tag within an inch or so of the sensor, regardless of how the card is oriented. And it's not built into a phone, but maybe just a pad, like an Apple TrackPad, that has an NFC sensor built-in and a wireless or wired connection to whatever device you're running the software on.

If barcodes are being used, they need to be facing the camera -- meaning to have it work face-down, the barcode sticker would have to be attached to the face of the card, obscuring some part of it. Alternatively, you could put it on the back and have an overhead camera scan it.

But each one of those stickers would need to be programmed or in some way associated with each specific card they're attached to.

And because the stickers are attached to the cards, no matter how thin they are, the stack of cards will bulge a bit and possibly interfere with shuffling the cards. The more they're spread randomly around the surface, the less bulge there will be; but if they're all stuck in the same corner, then there will be a very significant bulge.

Another alternative is to have some way to imprint a barcode or marking on the surface of the card somehow that's durable and won't smudge or smear or fade or wear off.

Again, the critical factor is that this is a collection of cards that you already own. Nobody is going to be buying these directly. (It's possible to make some playing cards with NFC tags embedded in them so they don't bulge, or with unique barcodes on them that have already been programmed somehow, but then what? They would need to be delivered with a "map" or list that describes what card has what ID on it. Unless the vendor is providing a back-end server with all of that set up before they ship you the cards.)

Overall, I think the ability to train a piece of software to recognize the face of a card visually that can be seen by a camera is the simplest and most obvious approach. But from what I've found thus far, it's not particularly simple to do from a programming standpoint. (It should be a lot simpler than what I've found thus far.) There's also the need for a "scanner" of sorts that's also like a TrackPad that you can set the card on for a moment so it can be scanned and recognized. Or hold it up to a camera facing you.

Well, if you want to use existing cards that aren't modified in any way, the camera approach is the only one that seems to make sense. TMS WEB Core can of course capture images from a camera, but associating those images with a given card definition is not something it is going to do out-of-the-box.

There are various ways to train some software to do this, as evidenced by various face identification programs. I think there was even one posted on the TMS Blog that you can check out.

I think it will still be a somewhat awkward solution though, particularly if you want the card to be hidden from the user. Usually the camera app, you know, shows you what you're taking a picture of.

Perhaps Miletus would be a good choice here, where a closer-to-native app can be run on a raspberry pi with a camera or two and even a display integrated as a complete packaged device of some kind. Less than $100 sort of deal.