Hi Jeremy,

I had a quick look at the code.

- In the main.c, you're not initialising *ndef_msg_buf*. The message buffer
needs to be filled with the contents of an NFC message before you use
*nfc_t4t_ndef_rwpayload_set* to let the NFC stack know of the NFC buffer.
Try using the *nfc_uri_msg_encode* function to generate a simple URL tag
before calling *nfc_t4t_ndef_rwpayload_set* (see
https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v12.0.0%2Fnfc_ndef_uri_message_module_dox.html
).
- I couldn't see the library file in the github project. Make sure it's in
the src folder in order for it to be linked with the project. The code
should fail to compile without it.

I'd suggest having a look at some of the simple NFC examples that come with
the nRF SDK to see what the minimal requirements are for a basic NFC app.



On Tue, 23 Jul 2019 at 04:31, Jeremy Wood <[email protected]> wrote:

> Hi Amr,
>
> I have been trying to do just as you describe, but I think that I must
> have gone wrong somewhere. I have created a simple project to work on
> bringing this up, perhaps you could take a look and tell me where I’ve gone
> wrong?
>
> Here’s my test project repo: https://github.com/jeremywood/nfc-tag-test <
> https://github.com/jeremywood/nfc-tag-test>
>
> Thank you,
>
> Jeremy Wood
>
> > On Jul 22, 2019, at 1:43 PM, Amr Bekhit <[email protected]> wrote:
> >
> > Hi Jeremy,
> >
> > The Nordic SDK uses a closed-source library to achieve this, nfc_t4t_lib.
> >> Has anybody had any luck getting it to work with MyNewt?
> >
> >
> > Yes, if you include the  nfc_t4t_lib_gcc.a file in the src folder, newt
> > will automatically link it in with the rest of the code.
> >
> > To bring up tag emulation, first call nfc_t4t_setup, then define your tag
> > and call nfc_t4t_ndef_rwpayload_set to specify the buffer that holds your
> > tag data. Finally, call nfc_t4t_emulation_start to start the emulation.
>
>

Reply via email to