{"action":"created","issue":{"url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/10117","repository_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr","labels_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/10117/labels{/name}","comments_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/10117/comments","events_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/10117/events","html_url":"https://github.com/zephyrproject-rtos/zephyr/pull/10117","id":362047880,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE2ODY2NTc2","number":10117,"title":"nfc: nfc tag api","user":{"login":"kapi-no","id":17042049,"node_id":"MDQ6VXNlcjE3MDQyMDQ5","avatar_url":"https://avatars2.githubusercontent.com/u/17042049?v=4","gravatar_id":"","url":"https://api.github.com/users/kapi-no","html_url":"https://github.com/kapi-no","followers_url":"https://api.github.com/users/kapi-no/followers","following_url":"https://api.github.com/users/kapi-no/following{/other_user}","gists_url":"https://api.github.com/users/kapi-no/gists{/gist_id}","starred_url":"https://api.github.com/users/kapi-no/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kapi-no/subscriptions","organizations_url":"https://api.github.com/users/kapi-no/orgs","repos_url":"https://api.github.com/users/kapi-no/repos","events_url":"https://api.github.com/users/kapi-no/events{/privacy}","received_events_url":"https://api.github.com/users/kapi-no/received_events","type":"User","site_admin":false},"labels":[{"id":796963297,"node_id":"MDU6TGFiZWw3OTY5NjMyOTc=","url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/labels/API","name":"API","color":"d65e51","default":false},{"id":1056425604,"node_id":"MDU6TGFiZWwxMDU2NDI1NjA0","url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/labels/needs%20review","name":"needs review","color":"ffc61e","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2018-09-20T07:12:50Z","updated_at":"2018-10-22T09:45:16Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/pulls/10117","html_url":"https://github.com/zephyrproject-rtos/zephyr/pull/10117","diff_url":"https://github.com/zephyrproject-rtos/zephyr/pull/10117.diff","patch_url":"https://github.com/zephyrproject-rtos/zephyr/pull/10117.patch"},"body":"High level API definition for NFC Tag emulators.\r\n\r\nThis change partially covers the scope of feature request described in #5703 issue."},"comment":{"url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/comments/431788548","html_url":"https://github.com/zephyrproject-rtos/zephyr/pull/10117#issuecomment-431788548","issue_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/10117","id":431788548,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTc4ODU0OA==","user":{"login":"sameo","id":1043863,"node_id":"MDQ6VXNlcjEwNDM4NjM=","avatar_url":"https://avatars2.githubusercontent.com/u/1043863?v=4","gravatar_id":"","url":"https://api.github.com/users/sameo","html_url":"https://github.com/sameo","followers_url":"https://api.github.com/users/sameo/followers","following_url":"https://api.github.com/users/sameo/following{/other_user}","gists_url":"https://api.github.com/users/sameo/gists{/gist_id}","starred_url":"https://api.github.com/users/sameo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sameo/subscriptions","organizations_url":"https://api.github.com/users/sameo/orgs","repos_url":"https://api.github.com/users/sameo/repos","events_url":"https://api.github.com/users/sameo/events{/privacy}","received_events_url":"https://api.github.com/users/sameo/received_events","type":"User","site_admin":false},"created_at":"2018-10-22T09:45:16Z","updated_at":"2018-10-22T09:45:16Z","author_association":"NONE","body":"> Hi @sameo! Thank you for taking the time to review it.\r\n\r\nSure, anytime.\r\n\r\n> As a general note, this API proposal is only intended for NFC tags (the NFC Forum Device in Listen Mode). It means that it cannot be used with NFC pollers (the NFC Forum Device in Poll Mode).\r\n> \r\n\r\nOk, so this API is basically about emulating NFC tags with Zephyr, right?\r\nI think this should be more clearly described from the documentation itself. I don't think Zephyr as an RTOS should be limited to emulating tags, and could very well extend to tag reading/writing and even p2p (it would certainly make sense for BT handover use cases), so I'd suggest to make it clear that this is only part of a potentially larger Zephyr NFC API and that it only covers tag emulation.\r\n\r\n> > * As an application, how do I read an NFC tag? Is that handled through nfc_tag_cb_register() and then anytime a tag is detected, it gets automatically read and registered applications get notified?\r\n> \r\n> > * How do I write an NDEF into a tag? How do I write several different ones\r\n> \r\n> As I pointed out, you cannot read an NFC tag using this API - reading and writing operations can only be performed by the NFC poller.\r\n>\r\n\r\nI understand now. This API is basically loading an NDEF that the poller will read. And the poller could also write into our emulated NFC tag.\r\nHow do you specify which type of tags you want to emulate?\r\n\r\n> > * Do we expect application to know what an NDEF is? i.e. is this API going to be extended to provide an NDEF parsing and building API?\r\n> \r\n> I imagine that we can have a separate module/library that would provide an API (i.e. ndef.h) for NDEF manipulation (building and parsing).\r\n> \r\n> After receiving NDEF data in the callback (i.e. `ndef_data_written()`), the user could parse it at the application level using such a module.\r\n> \r\n> Similarly, the user could build the NDEF message with the NDEF module and then pass the generated NDEF data to `nfc_tag_setup()` to start NFC tag emulation or just update the current NDEF data when the emulation is already running (`nfc_tag_ndef_msg_set()` function).\r\n\r\nThat's the idea, yes. NDEF is a more complex spec than it looks and you don't want your API callers to all have their own implementation/interpretation of the spec."}}
{"actor":{"display_login":"sameo"}}