嗨Mickael,
使用NDEF库编写AAR就像您已经做的那样简单。
根据您的描述,唯一可能发生的问题是标记的内存已满。
NDEF_AddAAR实际上将AAR记录添加到标记中的现有NDEF消息,因此您需要确保剩余的可用内存足够。
如果您希望NDEF消息只包含一条AAR记录,则应在调用NDEF_AddAAR之前清除NDEF消息:
memset的(NDEF_Buffer,0,2);
NDEF_WriteNDEF(NDEF_Buffer);
NDEF_AddAAR(安培; App_Android);
如果这有助于解决您的问题,请告知我们。
如果没有,请提供有关您失败的更多详细信息:
1. NDEF_AddAAR是否返回错误代码?哪一个?
2.你如何阅读RF方面的标签。你用的是Android手机吗?
问候,
雷米B.
以上来自于谷歌翻译
以下为原文
Hi Mickael,
Writing an AAR with the NDEF library is as simple as you already did.
From your description, the only issue that could occur is that the memory of your tag is full.
The NDEF_AddAAR actually adds an AAR record to an existing NDEF message in the tag, so you need to make sure the remaining available memory is sufficient.
If you prefer to have an NDEF message containing only a single AAR record, your should clear the NDEF message prior to call NDEF_AddAAR:
memset(NDEF_Buffer,0,2);
NDEF_WriteNDEF(NDEF_Buffer);
NDEF_AddAAR(&App_Android);
Let us know if this helps with your issue.
And if not, please provide more details on your failure:
1. Does NDEF_AddAAR return an error code? Which one?
2. How do you read the tag on RF side. Do you use an Android phone?
Regards,
Remi B.