Question

I am trying to get a MagTek card reader to work on my raspberry pi. I have one MagTek card reader model working just fine. It is one of their indoor models. I purchased an outdoor model (Sidewinder RS-232) and this is the one giving me the error.

This is the only bit of code that is running since it wont continue on until there is an actual device.

def getData():
    VENDOR_ID = 0x0801
    PRODUCT_ID = 0x0002
    DATA_SIZE = 337
    PACKET_SIZE = 0x0151
    device = usb.core.find(idVendor=VENDOR_ID, idProduct=PRODUCT_ID)
    if device is None:
        sys.exit("Could not find MagTek USB HID Swipe Reader")

Let me reiterate, the indoor model works just fine and from what I've seen online (http://www.linux-usb.org/usb.ids) uses the same Product_ID. So there is no reason that I can see why the outdoor model is not working. I'm waiting to hear back from MagTek's technical service, but I thought you guys would be faster

Était-ce utile?

La solution

I found the problem but it led to more.

The Side Winder RS-232 from Brush Industries has a different Vendor ID and Product ID. If you replace those variables with the correct ones (below) then your Side Winder RS-232 should be detected by your python code.

Vendor Id = 0x12b6

Product Id = 0x0092

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top