Closed Bug 1082992 Opened 10 years ago Closed 7 years ago

(meta)[NFC] Support for NFC technology

Categories

(Firefox OS Graveyard :: NFC, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(tracking-b2g:+)

RESOLVED WONTFIX
tracking-b2g +

People

(Reporter: allstars.chh, Unassigned)

References

Details

(Whiteboard: [priority])

This is the meta bug for supporting more NFC technologies like NfcA, IsoDep, MifareClassic, ... etc.
tracking-b2g: --- → +
Whiteboard: [priority]
Assignee: nobody → dlee
Assignee: dlee → nobody
Depends on: 1115605
In these bugs we plan to add interfaces of following tag technologies listed in NFCTechType in MozNFCTag.webidl 
http://dxr.mozilla.org/mozilla-central/source/dom/webidl/MozNFCTag.webidl#11

NFCTechType
- NFC-A
- NFC-B
- NFC-F
- ISO-DEP (These 4 technologies are from NFC Forum TS - Digital Protocol
- NFC-V (from ISO 15693)
- MIFARE-Classic
- MIFARE-Ultralight (These two are from NXP, and I noticed that 'MIFARE' is all capitalized.)
(See Bug 1115673 for the naming style)

and the plan is to let web could instantiate these technogies, for example

mozNfc.ontagfound = function (event) {
  var techList = event.tag.techList; 
  if (techList.indexOf("NFC-A") !== -1) {
    let nfcA = new MozNFCATechnogy(event.tag);
    ....
  }
}


However I would request suggestions from smuag for the naming style of these interfaces.

Should we call
- MozNFCATechnology or MozNfcATechnology
- ... // and same for NFC-B, NFC-F and NFC-V (with NFC-A uppercase vs camelcase)
- MozISODEPTechnology or MozIsoDepTechnology (with IsoDep uppercase vs camelcase)
- MozMIFAREClassic or MozMifareClassic

And currently in our NFC API, the interfaces are
MozNFCTag, MozNFCPeer, and MozNDEFRecord, with 'NFC' capitalized.

And I hope we could have a consistent and easy-understanding naming style.
Flags: needinfo?(bugs)
Just check with Dimi

For NFCTechType
We will rename to 
{"NFC-A", "NFC-B", "NFC-F", "NFC-V", "ISO-DEP", "MIFARE-Classic", "MIFARE-Ultralight", "NFC-Barcode"}

These naming rules are from specificaions. [NFC Digitail Protocol], [NXP MIFARE], [Kovio Barcode]

http://www.nxp.com/products/identification_and_security/smart_card_ics/mifare_smart_card_ics/mifare_ultralight/

http://www.nxp.com/products/identification_and_security/smart_card_ics/mifare_smart_card_ics/mifare_classic/

http://www.thinfilm.no/wp-content/uploads/2014/01/Thin-Film-Electronics-ASA-Kovio-NFC-Encore-Platform-Product-requirement-document.pdf

I noticed that NFC-V (ISO 15693) isn't included in these specs yet, and it seems NFC-V is the term coined by Android. I may file another bug to discuss this.

For NFCTagType, I'll also rename it to "MIFARE-Classic" as well.

Back to the interface naming.
We will use
- MozNfcATech // and same for NfcB, NfcF
- MozIsoDepTech
- MozMifareClassicTech
- MozMifareUltralightTech

We use camelCase here to make them consistent and easier to understand, for example, MozIsoDepTech is easier to understand than MozISODEPTech, and same for NfcA.
I trid to search 'NFCA', 'NFCB', ...etc, they all come up with some results not related to NFC.
Flags: needinfo?(bugs)
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.