Amr,

Thank you for looking at my project!

And more thanks for catching my error in not including “nfc_t4t_lib_gcc.a”, I 
missed it when doing my initial commit. It’s in the apps/nfc_tag/src directory.

How did you manage to get nfc_uri_msg_encode() working? It seems to rely on an 
awful lot of the Nordic SDK that’s not in MyNewt.

I’ve been looking at the Norfic SDK NFC examples, and it looks like they rely 
on legacy NRF drivers, most notably “nrf_drv_clock”. Have you brought that into 
MyNewt somehow?

Best,

Jeremy Wood 

> On Jul 23, 2019, at 9:39 AM, Amr Bekhit <[email protected]> wrote:
> 
> 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