As discussed in a previous port, I’m working on some RFID library. As mentioned, it started out with some code I’ve used for a project years ago. That code capable of reading the UID of a card, but it’s rather rough. For example, it can only handle 4 byte UID cards, and won’t cascades to read 7 or 10 byte cards. An implementation that does handle such is Miguel Balboa’s RFID library, which is an Arduino library. Looking through the comments in both codebases, it seems they’ve come from a common codebase, as their are various comments exactly the same across them. I’ve taken the part where the anti collision is handled and converted to back to C, and tested it. I am capable of reading 7 byte UIDs. Nice. Balboa’s library is a mature form of the library I first encountered years ago.
One if the aspects my implementation will have different to Balboa’s is the part where I will support too possible transports the MFRC522 supports. Most sellers on eBay and AliExpress swll the hard-wired SPI versions, but the boards sold by RoboyDyn are switchable. Be aware, only the version without mounting holes is switchable. The version with mounting holes is, like all the others, hard wires for SPI. I have one of those boards, and configured the solder bridges for I²C. However, I’m out of luck, and I am not getting an ACK to the address I’ve configured the board for, or to any I²C address for that matter. I’ve verified my test procedure by hooking up a known good I²C device.
At this point, I might suspect a faulty board. That’s something I might expect from some random Chinese seller, but not from RobotDyn. So, there might still be something wrong with my setup. I have ordered some more boards from RobotDyn to do some more testing. It will take some while for them to get here, especially this time of year.
In the mean time, I’ve decided to to “Unduino” Balboa’s library and port it back to C. Once that is done, I’ll see to separate card code (ISO14443A, MIFARE) from reader code. Note that Balboa’s library is under the . Interesting license. Well… I’ve talked about my position of licensing before, and this is another license in my style. Oh, the details where the various BSD licenses, the MIT license, and the UNLICENSE differ. So, the UNLICENSE is like the 0-clause BSD license. However, there are some problems with the UNLICENSE. If I interpret it right, the problem declaring something “Public Domain” only makes sense in legislations where the term is defined. Could this become a problem preventing the code to be used commercially/legally?