w3c / web-nfc

Web NFC
https://w3c.github.io/web-nfc/
Other
308 stars 68 forks source link

Allow lower level I/O #238

Open kenchris opened 5 years ago

kenchris commented 5 years ago

In the future we want to allow lower level I/O - some exploration

enum NFCTagType {
  "nfc-a",
  "nfc-b",
  "nfc-f",
  "nfc-v",
  "iso-dep"
};

dictionary NFCReadingMetadata {
  NFCTagType tagType;
  number transceiveMaxByteLength;
}

dictionary IsoDepReadingMetadata : NFCReadingMetadata {
  UInt8Array manufacturer;
  UInt8Array systemCode;
} 
...

interface NFCReadingEvent : Event {
  readonly attribute DOMString serialNumber;
  readonly attribute NDEFMessage ndef;
  readonly attribute NFCReadingMetadata metadata;

  Promise<Uint8Array> transceive(Uint8Array data, number? timeout); // or BufferSource?
  Promise<void> close();
};
jtibble commented 4 years ago

I would personally like to see this added to the spec and implemented in Chrome. My use-case is that pre-written cards are provided to my organization that do not conform to the NDEF spec, and my coworkers have written custom hex-parsing logic to extract meaningful data from these cards. I'd like to be able to do the same via the web-nfc API without needing an external USB device or using the native Android APIs.

OlivierGre commented 4 years ago

STMicroelectronics sees many benefits and use cases for this low level API giving access to the transceive() function. It would enable many IoT use cases like:

smlu commented 4 years ago

Any update on this? We're working on some web service which also uses ISO/IEC 7816 identification cards and communicates via NFC ISO/IEC 14443 interface to identify users. If WebNFC supportrd ISO depended operations in the future we could ommit building extra platform specifict applications and instead identify users directly via web app in the web browser.

Astriel commented 4 years ago

Any update on this one ? I've tried the Google Chrome Web NFC Demo, and unfortunatly I'm not able to get informations of the card.

pawisoon commented 3 years ago

Is there any ongoing work to bring the support for sending and receiving data to ISO/IEC 14443 cards? I see there's many people interested in this kind of feature.

jmelhus commented 7 months ago

any news about this?

anssiko commented 7 months ago

Thanks for your interest. We're looking for interested contributors who could pick up the implementation work but cannot commit to any timeline at this time.

If someone lurking on this repo wants to help, please chime in here.

fbrusch commented 6 months ago

Hi @anssiko, how to get started on this (to give some help?)

anssiko commented 6 months ago

For concrete implementation contributions, a good starting point is to check out the Chromium code and build it on your target platform: https://www.chromium.org/developers/how-tos/get-the-code/

Other ways to help include e.g. documenting the use cases for the proposed feature to the help bump the priority if this.