rc522-rfid icon indicating copy to clipboard operation
rc522-rfid copied to clipboard

Some remarks

Open rvanderveen opened this issue 9 years ago • 4 comments

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.

rvanderveen avatar May 22 '15 17:05 rvanderveen

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 ;-)

SebastianPozoga avatar Jun 14 '15 17:06 SebastianPozoga

Thanks! I'll be using this package on Wednesday and will give your new version a try.

rvanderveen avatar Jun 14 '15 22:06 rvanderveen

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.

sbrinkmann avatar Jun 15 '15 04:06 sbrinkmann

@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.

SebastianPozoga avatar Jun 26 '15 19:06 SebastianPozoga