-
Notifications
You must be signed in to change notification settings - Fork 420
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
facing thise error when am trying to run the Read.py #69
facing thise error when am trying to run the Read.py #69
Comments
I'm facing same issue with python 2.713 |
Hi, Have you tried with 3.5! |
Yes, it's seems that it's not compatible with python3 as it require parenthesis for |
you can add parenthesis for all prints and try run.. i just tried on 2.7 as well same error for me.. am stuck here at this part |
i hope it is not hardware problem. coz mine is new |
The hardware is working. I have the problem after reinstalling raspbian. |
@te-ti oh you were able to run it previously? |
I've figure out the problem I guess. I think it come from https://github.com/lthiery/SPI-Py library. |
did you find anything? please share thanks if is working for you |
same problem here it seems there are some problems with the recent updates from SPI-Py |
If you "rollback" SPI-Py to commit before February 17th, it should work.
|
Error is fixed but my tag not detected.. |
Same, I don't understand why. |
@te-ti emmm...I just want know have you fixed the problem? |
let me know if this works anyone.. thanks |
atlast working for me.. i have soldered the reader pins then it works.. |
@sandeeppusthey Still not working for me... Can you post a picture of how you wire the pins from rfid reader to the pi board? |
Hi all, I u are not on a RPi 3, change the line NRSTPD = 11 back to 22 :-) |
英语很差,用中文回答吧.因为新提交的SPI-Py中,spi.transfer需要两个参数,在MFRC522.py中定义device_0=spi.openSPI(device="/dev/spidev0.0", mode=0, speed=1000000),修改 spi.transfer( ((addr<<1)&0x7E,val))和val = spi.transfer((((addr<<1)&0x7E) | 0x80,0))为spi.transfer(self.device_0, ((addr<<1)&0x7E,val))和val = spi.transfer(self.device_0, (((addr<<1)&0x7E) | 0x80,0))即可. |
@te-ti i tried this : after git checkout .... i got this: |
Have you "cd" into the "SPI-Py" directory before running git checkout? |
just copy the MFRC522.py from the following project and it works. |
@MatsCedergren |
it is the issue of [ spi.transfer() ],it need two arguments and the MFRC522.py file just one given! |
this fixes mxgxw#69
it need install python2? |
I can now detect card on Read.py.
|
I've could resolve the issue after using older branch. this worked as a charm for me hopefully it helps others. |
Same with me. I have writing functionality but now the written card is not being read by the same device... Any ideas? |
Hi, if this can help, in my notes of a working test (project of some months ago) i've noted this: (Estrema attenzione alle saldature e ai contatti - problema per giorni!) <---- !!!!!!!!! I have the NRSTPD = 22 and this is my pin config:
|
Hey guys! So my issue is that the error is gone, but the tags are not detected... the pin config is identical to @alexball80 |
@daniellopez0708 |
@alexball80 |
Thank you for this quote. this solution works for me on python3 but not with python2.7 |
It was the same for me at first. |
First disable the SPI and then enable the SPI and then tyr again. Worked for me |
"sudo raspi-config" This thing worked for me.. |
Hi! It is still not working for me but I will try what you said |
Just found the solution that worked for me git clone https://github.com/lthiery/SPI-Py.git After that Enable Remote-GPIO for raspberry pi interface. worked with python3 and 2 on Pi 4 |
thanks~~
…------------------ 原始邮件 ------------------
发件人: "MUHAMMAD WAHAJ MURTAZA"<[email protected]>;
发送时间: 2020年2月12日(星期三) 下午5:51
收件人: "mxgxw/MFRC522-python"<[email protected]>;
抄送: "951969769"<[email protected]>; "Comment"<[email protected]>;
主题: Re: [mxgxw/MFRC522-python] facing thise error when am trying to run the Read.py (#69)
Just found the solution that worked for me
git clone https://github.com/lthiery/SPI-Py.git
cd SPI-Py
git checkout -b 8cce26b9ee6e69eb041e9d5665944b88688fca68
sudo python setup.py install
After that Enable Remote-GPIO for raspberry pi interface.
worked with python3 and 2 on Pi 4
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
yes it worked for me. but when i place my rfid tag it is not detecting. can anyone help me out. its important for me as im using it for my major project . |
Tehis patch update code to match Python3 version, and fix the function api problem of new SPI-Py PKG in mxgxw#69
Tehis patch update code to match Python3 version, and fix the function api problem of new SPI-Py PKG in mxgxw#69
This patch updates code to match Python3 version, and fix the function api problem of new SPI-Py PKG in mxgxw#69
非常感谢这位大哥 解决了 |
below is the stack trace for the error am facing when am trying to run the Read.py script..
Traceback (most recent call last):
File "Read.py", line 41, in
MIFAREReader = MFRC522.MFRC522()
File "/home/pi/MFRC522-python/MFRC522.py", line 135, in init
self.MFRC522_Init()
File "/home/pi/MFRC522-python/MFRC522.py", line 406, in MFRC522_Init
self.MFRC522_Reset();
File "/home/pi/MFRC522-python/MFRC522.py", line 138, in MFRC522_Reset
self.Write_MFRC522(self.CommandReg, self.PCD_RESETPHASE)
File "/home/pi/MFRC522-python/MFRC522.py", line 141, in Write_MFRC522
spi.transfer(((addr<<1)&0x7E,val))
TypeError: function takes exactly 2 arguments (1 given)
The text was updated successfully, but these errors were encountered: