Page 1 of 1

Using two RFID readers with one raspberry pi

Posted: Wed Jul 12, 2017 6:56 am
by dn_lolz
Hi forum, is there a way to use two Phidgets RFID readers with one raspberry pi ? When I'm connecting both RFID readers to raspberry only shows one as attached, when I'm disconnecting the registered reader, the second on gets attached. The code I'm using: https://gist.github.com/nmsdvid/4840dd5 ... e9386bdc79

Re: Using two RFID readers with one raspberry pi

Posted: Wed Jul 12, 2017 2:38 pm
by Patrick
If you want to use both at once, you'll need to create 2 CPhidgetRFIDHandles and then open them both, specifying the serial numbers.

Re: Using two RFID readers with one raspberry pi

Posted: Thu Jul 13, 2017 3:39 am
by dn_lolz
Thank you, its working.

Re: Using two RFID readers with one raspberry pi

Posted: Thu Nov 02, 2017 5:05 am
by dn_lolz
Hello Patrick, Do you think there is a way to use both readers at once but not having to specify the serial numbers of the readers ?

Re: Using two RFID readers with one raspberry pi

Posted: Thu Nov 02, 2017 7:45 am
by mparadis
Setting the serial numbers is technically optional, since the open() call will open the first Phidget that matches the criteria you've provided. In this case, the only criteria is that it has to be an RFID channel, so the first time you call open it will attach one of the two readers. The second time you call open, if the first one hasn't been closed, your program will open the second one since a Phidget channel can only be opened by one source at a time (unless opened remotely).

We usually recommend setting the serial number because it ensures that you don't open channels that you weren't expecting to open. For example, if there was another RFID reader connected to another computer on your network and they had the Phidget Network Server enabled, this open call could open that RFID reader instead of one of the ones connected to the Raspberry Pi. If you know for sure that this situation won't occur, and you don't care which order the readers attach in, then it's fine to omit the serial number.

Side note: if you plan on using both RFID readers in close proximity to one another, you may have interference issues. Have a look at this article for a workaround.