I am trying to configure the B1 RFID hat on my raspberry pi since it is a cleaner solution than using a USB RFID reader. However I have ran into some issues.

Firstly, the documentation supplied by Eccel is very minimal and offers no library or install guide specific to a Raspberry Pi. It only offers information on a previous model not suited to a pi.

I have tried using some data and know-how, I have tried to use the UART serial to read back data from an RFID card, however it returns nothing. Here is the code I am using:

import time, serial

port = serial.Serial("/dev/serial0", baudrate=9600, timeout=3.0)

while True:
    print(port.read(100)) #<-- I assume here the argument is bit count??

This code does not return any errors, it just doesn't print any response when a card is presented.

If anyone has experience with this particular product and can offer an insight it will be much appreciated!

  • 1
    Why guess? Read the documentation. pythonhosted.org/pyserial/pyserial_api.html#serial.Serial.read read(size=1) Parameters: size – Number of bytes to read. Returns: Bytes read from the port. Return type: bytes Read size bytes from the serial port. If a timeout is set it may return less characters as requested. With no timeout it will block until the requested number of bytes is read.
    – joan
    Jan 6, 2020 at 15:20
  • This is not an answer, it only confirms what I already thought. This does not contribute to solving my problem at all. This should have been a comment at the very most
    – EcSync
    Jan 6, 2020 at 15:24
  • Actually it would seem to contradict what you already thought: "I assume here the argument is bit count??" -- nope, docs say bytes.
    – goldilocks
    Jan 6, 2020 at 15:55
  • @goldilocks thanks for that
    – EcSync
    Jan 6, 2020 at 16:02
  • I skimmed your RFID thing and wow! I have never seen such a deluxe RFID/NFC reader with a Swiss army knife with too many blades (see Fig 1.1 of user manual), no wonder it costs you £30+. Newbie starting suggestion: (1) Do not connect it to Rpi yet. Try to see if you can use Win10 RealTerm to say Hello (eg. "AT" command) talk to it using USB/UART 9k6bd8n1. If successful, then use Rpi python built in UART (TxD/RxD), or USB to TTL UART.
    – tlfong01
    Jan 7, 2020 at 2:16


Your Answer

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

Browse other questions tagged or ask your own question.