-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: support using ReadURI with SMS and GEO type #30
Conversation
This allows IdentifyNDEF to work when the NDEF is larger than the default NDEF_MAX_SIZE
The default buffer of 100 bytes is too small for Wifi and VCard. Further, using the default buffer prevents a user from picking a buffer size more suited to their processor environment and tag needs. This change retains backwards API compatibility but allows a user to provider their own buffer as part of begin()
Hi @maihde , |
@cparata yes, I agree that the NDEF library APIs are available. This PR is primarily about ensuring symmetry with the API, it seemed to be unintentional that |
Hello @maihde , |
Carlo, I don't mind adding and contributing those higher level APIs as you
suggested. One question, should `writeURI` fail if provided an SMS or GEO
URI? Currently the writeURI succeeds but the readURI fails, which IMHO is
counter-intuitive.
…On Tue, Jul 25, 2023 at 4:00 AM Carlo Parata ***@***.***> wrote:
Hello @maihde <https://github.com/maihde> ,
I would prefer to add dedicated high level APIs to support other data
formats besides writeURI/readURI . In my opinion, the correct path should
be using the low level APIs that are already available in the NDEF library
in the files lib_NDEF_SMS.cpp/h and lib_NDEF_Geo.cpp/h to implement new
high level APIs like writeSMS/readSMS and writeGeo/readGeo. Unfortunately,
I do not have band to work on it, but it would be great if the community
gives his contribution to improve the library.
Best Regards,
Carlo
—
Reply to this email directly, view it on GitHub
<#30 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABYEIXCQZ5FFDTQQNNFJFTXR54KLANCNFSM6AAAAAA2T6CSLU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hello @maihde , |
Thanks @cparata! I don't wish to be a bother, so I'll assume the desire to have no change in behavior for However, I wanted to provide a few more details since I may not be articulating the question well. The existing behavior allows code like this.
How would you like
|
Hello @maihde , |
Add the following features: * The ability to read/write unabridged URIs per NDEF specifcation * High-level API for SMS, GEO, and EMail * Each API to read NDEF type
@cparata I have pushed an update that adds the following API to the ST25DV class:
This code is based on fixes from #31 because the refactoring of |
82f5f5c
to
2d5ae4c
Compare
Hello @maihde , |
Hi @maihde , |
If you write a GEO or SMS URI with the
WriteURI
function, for example:It will fail when using
ReadURI
becauseNDEF_ParseURI
has special logic for looking at the URI string and changing the NDEF_Type. For symmetry in the API and to makeReadURI
more versatile I have added support to read the SMS and GEO types with ReadURI.