-
Notifications
You must be signed in to change notification settings - Fork 21
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
ISO15693 Support added #13
base: master
Are you sure you want to change the base?
Conversation
Basic ISO15693 Tag reading and dump to Serial. Also Example File for Arduino added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @sgtJohnny, sorry for the delayed feedback, I didn't get an email from github for some reason. Thanks so much for getting back to this and contributing it as a PR. I'm sure lots of people will be grateful.
I can't do any real tests on this as I don't have the hardware anymore, so I'm limited to commenting based on the code. I trust the code works 👍
/*! \Reads ISO15693 tag | ||
|
||
Try to Read ISO15693 tag | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add some more documentation here? What does the returned value mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is much better, please add a space between 10
and bytes
, other than that this is clear now. 👍
SPI.begin(); | ||
|
||
// Set the registers of the MFRC630 into the default. | ||
mfrc630_AN1102_recommended_registers(MFRC630_PROTO_ISO15693_1_OF_4_SSC); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick; Indent doesn't match scope.
Serial.println("Failure, No Tag found or Reader Problem!"); | ||
break; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick, this function has tabs, not spaces.
-Return uid lenght as status and zero as error - adding comments - changed arduino example
Added changes you advised, please review |
if(millis()>(timeout+50)){ | ||
break; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any chance you could change this timeout handling to use the internal timer? like how's done in mfrc630_iso14443a_WUPA_REQA
? this file is independent of Arduino at the moment, and I'd like to keep it that way.
This function has both spaces and tables on a single line, please make it uniform and match the already existing indentations.
@@ -23,6 +23,7 @@ | |||
*/ | |||
|
|||
#include "mfrc630.h" | |||
#include "Arduino.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want this dependency here, it rules out using this driver outside of the arduino ecosystem.
Set all registers to the desired value for ISO15693 reading | ||
|
||
\param [in] the specified protocol number for ISO15693, there are differnt values for 1/4 SSC or DSC or 1/256 SSC. | ||
The right protocol for the desired card standart must be used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling mistakes in difernt
and standart
.
/*! \Reads ISO15693 tag | ||
|
||
Try to Read ISO15693 tag | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is much better, please add a space between 10
and bytes
, other than that this is clear now. 👍
I will try to fix this as soon as possible and try with timer |
Posting here too for visibility... @sgtJohnny Did you or anyone else use NXP's CLEV6630B evaluation board or CLEV6630ARD board for testing and verification of your software? My hardware setup Software setup Problem What I've Tried
My Speculations |
@@ -931,3 +950,149 @@ void mfrc630_MF_example_dump() { | |||
MFRC630_PRINTF("No answer to REQA, no cards?\n"); | |||
} | |||
} | |||
|
|||
void mfrc630_ISO15693_init(uint8_t protocol, uint8_t buf){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sgtJohnny I think there's a bug here - buf
should be a uint8_t*
type. This also means that your implementation on line 972 mfrc630_AN1102_recommended_registers(buf);
does not do what you expect it to.
@ic-twist I remember using a blue board, but not sure if it was CLEV6630B. I've been using the code in a few own designs with the CRLC663 and ISO15693 and never had problems, but I've added a loop to try all ISO15693 settings. I tried to dig up the board this weekend an try with arduino uno. |
I fixed the bug in CLEV6630B is also blue so it might be what you used too. Now that it's working, I noticed that the NFC read range is much smaller (~1cm) when I'm using the arduino as a host micro compared to when I use the LPC micro on the eval board itself and use NXP cockpit GUI to read tags, in which case the range is ~1 inch. |
Ok - I needed to change some of the register values. The one that made a big difference was @sgtJohnny The software bug I mentioned is still necessary for this library to work. |
I've added basic ISO15693 support to read a tag and output to Serial. Tested on Arduino UNO and CLRC663 Evaluation board.
Please note that ISO15693 only works with CLRC663, which uses same Software as MFRC630, but can read ISO15693, ISO14443B, and many more.