Hi all, Currently we are implementing the NFC function for B2G device. The following link is the architecture diagram for gaia, gecko and a daemon process called nfcd which is used to access vendor specific nfc library. There are still some detail discussion with DT partner ongoing. If there are any problem or suggestion about this design, please feel free to let us know.
https://docs.google.com/presentation/d/1WGmb7dWlFBfPztiAKJIxXaDMzcJJXnYNqhyuxjjNUzE/edit#slide=id.gf7b994fd_0238 I am going to briefly describe the responsibility for each layer: Gaia Gaia part contains a NFC system application which parse received NDEF message from a NFC tag or a NFC capabled device. If the NFC system app understand the NDEF message it will do corresponding action. For example, if the NDEF message readed from a NFC tag contains a URL, this system application will wake up browser app and open the URL. NFC system app is also responsible for handover with a NFC capable device. For example, when a nfc-enabled bluetooth device is detected, NFC system app will start handover procedure with the device and get the bluetooth device address in the end. So gallery application can use this BT address to send files through mozilla BT Module. If this device is a bluetooth headset, gaia part can also seamlessly do bluetooth pairing without user action. Any gaia app can use NFC web API to send NDEF message to a NFC tag or a NFC device. Web-API Following link have detail desription about the web api for NFC. And we also have a NFC webapi discussion malling thread, please let me know if you want to join the mailling thread. https://wiki.mozilla.org/WebAPI/WebNFC The function of WebAPI is capable of read/write NFC tag, push/receive message for P2p device Gecko Gecko works as a request/response/notification proxy. It passes request from gaia layer (Ex. NdefPush, NdefWrite) to nfc daemon. Gecko will translate the request to a pre-defined message protocol so nfc daemon can understand the request. It will also notify the gaia when nfcd pass any notification message or request response to gecko. Nfcd nfcd is a daemon process, it handles the logic for access vendor specific library for reading/writing message from/to NFc tag, tag lost/discover notification, setup p2p connection between two nfc-capabled device ... etc. nfcd source file will be located in a separate repository from gecko and will be put in the system folder with directory named nfcd. Please feel free to share any suggestion, we are glad to hear any feedback Thanks Best regards Dimi _______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
