Closed ildar closed 6 years ago
I cannot talk about this fork, but on mine I got as far as nfc-anticoll working, with 115200 bps working too. I am guessing that you may have run into a hardware issue I am experiencing as well which apparently affects some fake/counterfeit MFRC522 chips.
For the development of the '522 patch, I was using a FM17522 chip, which is a compatible version made by Fudan with version register set to 0x88
. Official MFRC522 have two different version codes 0x91
and 0x92
(rc522-internal.h).
Yours seem to have a completely different version code (0x12
), which probably has some sorta of hardware bug with anything different than 9600bps.
Seeing this was never going to be accepted upstream, I began developing a MFRC522 driver in userland using Python, and while it worked just fine with the Fudan chip, I am experiencing issues with a fake, completely unbranded chip (like, it doesn't even have anything other than the dot marking pin 1) any time I try to change from 9600 to anything else. So there are odds that it's not related to this port, but more like a hardware issue.
Could you try specifying baud rate as 9600, so it uses the default baud rate, and trying again?
Wait no. For some reason @ehkom modified the rc522-uart driver and broke baudrate changing: https://github.com/ehkom/libnfc/blob/master/libnfc/drivers/rc522_uart.c#L325-L341
You are supposed to write the new baud rate to the MFRC522, and then change the UART baudrate. Otherwise, the MFRC522 keeps trying to read commands with a baud rate different to the one the PC is sending them at.
Also ignoring errors occured when changing UART speed is not a good idea. If that fails, you'll end up with an UART running at a different speed than the MFRC522, with the rest of the library having no idea and trying to use it in an undefined state.
Thanks, @socram8888 , as I'll base on your branch from now on then issue moves to https://github.com/ildar/libnfc/issues/1
Hi! I reviewed both this fork and @socram8888 's pull request. Fixed building with cmake, see my repo Still attempring to run yields disappointing results:
This is the current state of the port, right?