1

I'm trying to connect Raspberry PI 3 B+ with RFID-RC522 (following this guide https://www.raspberrypi-spy.co.uk/2018/02/rc522-rfid-tag-read-raspberry-pi/). But I got stuck at the hardware connectivity part. I soldered the pins connected the reader to the PI, tryed pigs to test spio (with no response). Resoldered, again checked pigs with some response (I suppose I'm failing at the soldering part, but since the pigs spix output is not much documented, I getting a bit frustrated).

When I resoldered the pins and reconnected the reader to the PI:

pi@raspberrypi:~ $ sudo pigpiod
pi@raspberrypi:~ $ pigs spio 0 50000 0
0
pi@raspberrypi:~ $ pigs spix 0 10 20 30 40 50
5 0 4 20 30 40
pi@raspberrypi:~ $ pigs spix 0 10 20 30 40 50
5 50 4 20 30 40
pi@raspberrypi:~ $ pigs spix 0 10 20 30 40 50
5 50 4 20 30 40

The pigs documentation does not tell much about different results of spix and what it might indicate. Should I resolder it once more or could there be a different mistake?

0

The pigs spio command opens a SPI connection (typically specified by SPI channel and speed and mode 0). It returns a handle (a small number >=0) for use in subsequent commands to identify that connection.

The pigs spix command transfers one or more bytes to a SPI connection. The first byte is the handle. Subsequent bytes are the data to be sent.

spix returns the count of bytes received from the device followed by the received data bytes.

pigs (and pigpio) have no understanding of the data sent or received. That depends on the device being talked to.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.