firsttris / mfrc522-rpi

:key: Control your MFRC522 RFID Module with your Raspberry-pi and JavaScript
MIT License
118 stars 35 forks source link

Increasing range of MFRC522 #11

Open kevindekemele opened 5 years ago

kevindekemele commented 5 years ago

Hello,

In the repo for the python version they claim to have increased the range: https://github.com/mxgxw/MFRC522-python/issues/30

How can this be done with this module?

I tried:

First I logged the byte that sets the antenna gain console.log(this.readRegister(CMD.RFCfgReg)) which returns 72. According to the datasheet of MRFC522, 72 corresponds to 33db.

I tried putting it on 112 (which is 48db) with

this.writeRegister(CMD.RFCfgReg, 0x07 << 4);

in index.js in the function reset();

But If I try to read the same byte later, again with console.log(this.readRegister(CMD.RFCfgReg)) it still logs 72!

How do I increase the gain?

Thanks

firsttris commented 5 years ago

hello @kevindekemele i say probably yes. but how is another question. most of us do not have more knowledge then you have.

crimson589 commented 3 years ago

Hello,

In the repo for the python version they claim to have increased the range: mxgxw/MFRC522-python#30

How can this be done with this module?

I tried:

First I logged the byte that sets the antenna gain console.log(this.readRegister(CMD.RFCfgReg)) which returns 72. According to the datasheet of MRFC522, 72 corresponds to 33db.

I tried putting it on 112 (which is 48db) with

this.writeRegister(CMD.RFCfgReg, 0x07 << 4);

in index.js in the function reset();

But If I try to read the same byte later, again with console.log(this.readRegister(CMD.RFCfgReg)) it still logs 72!

How do I increase the gain?

Thanks

Hey @kevindekemele did you have any further tries with this? I tried this and didn't notice any difference with the read range, on my end it seems to be writing successfully since reading it returns the new value.