rc522-rfid
rc522-rfid copied to clipboard
Some remarks
First of all, thank you for writing this package. After tinkering around with it, I got it to work. Some remarks remain - you might put this in the readme so people don't have to search for it as long as I did.
- This library doesn't work with the latest version of Node.js because of some breaking changes in v0.12. Use the last v0.10 release instead. https://strongloop.com/strongblog/node-js-v0-12-c-apis-breaking/
- You'll have to enable SPI. Instructions at http://raspi.tv/how-to-enable-spi-on-the-raspberry-pi
- Node.js application will only work if you run it as root. Otherwise it won't have sufficient rights to read from the RFID reader?
- The first character of the UID isn't read / shown. I don't know why this is, but I expect to see 8 characters and only get 7.
I don't have the knowledge to solve all of the problems, but I'll look into it. Just wanted to report this to help others.
version for node v0.12.x (and v0.11.x) is here: https://github.com/SebastianPozoga/rc522-rfid
I rewrite accessor for new v8 engine. But actually it is test version. I will added pull request when I end tests into application. You can test with me ;-)
Thanks! I'll be using this package on Wednesday and will give your new version a try.
Hi Sebastian. This are great news. I'll have a look at your version as well and can update mine with your changes. I'll also have a look at my read me file and update it accordingly.
@rvanderveen in answer to point 3: Node.js application will only work if you run it as root. Well, root permissions is required. To make it better:
- you can use service as data provider
- create application (run with normal user permissions) It is the best design pattern for it. I prepare a simple service (for raspbian): https://github.com/SebastianPozoga/rc522-rfid-service
PS. @sbrinkmann I created (and tested) a pull request for you ( https://github.com/sbrinkmann/rc522-rfid/pull/5 ). I want add official repository to my service dependencies. It use my fork now. I am hope you approve it soon. Thanks.