I have a USB card reader that I use for online banking (Handelsbanken, Sweden) purposes. Ever so often the driver to this card reader stops working and forces me to restart the computer. The broken connection between the driver and the card readers is indicated in several ways:

  1. When I connect the card reader to my computer some graphics should appear on the card readers display after a succesful initialization. These graphics are never displayed

  2. When I launch the administative application it says the card reader is not connected

I have looked at the files the driver installs in Installer. It installs the following files:

/private/var/db/receipts/com.todos.shbecr.shbecr.pkg.bom /private/var/db/receipts/com.todos.shbecr.shbecr.pkg.plist /usr/libexec/SmartCardServices/drivers/shbecr.bundle /usr/libexec/SmartCardServices/drivers/shbecr.bundle/Contents /usr/libexec/SmartCardServices/drivers/shbecr.bundle/Contents/Info.plist /usr/libexec/SmartCardServices/drivers/shbecr.bundle/Contents/MacOS /usr/libexec/SmartCardServices/drivers/shbecr.bundle/Contents/MacOS/shbecr /usr/libexec/SmartCardServices/drivers/shbecr.bundle/Contents/Resources /usr/libexec/SmartCardServices/drivers/shbecr.bundle/Contents/Resources/English.lproj /usr/libexec/SmartCardServices/drivers/shbecr.bundle/Contents/Resources/English.lproj/InfoPlist.strings

Trying to execute the only binary file above, /usr/libexec/SmartCardServices/drivers/shbecr.bundle/Contents/MacOS/shbecr returns the following error message:

-bash: /usr/libexec/SmartCardServices/drivers/shbecr.bundle/Contents/MacOS/shbecr: cannot execute binary file

file on this binary file returns

/usr/libexec/SmartCardServices/drivers/shbecr.bundle/Contents/MacOS/shbecr: Mach-O fat file with 2 architectures: [ : Mach-O ppc_7400 bundle ] [ I386: Mach-O i386 bundle ]

I can see the card reader in USB Prober

Full Speed device @ 4 (0xFD120000): .............................................   Vendor-specific device: "Handelsbanken card reader"
    Port Information:   0x1018
           Not Captive
           External Device
    Number Of Endpoints (includes EP0):   
        Total Endpoints for Configuration 1 (unconfigured):   3
    Device Descriptor   
        Descriptor Version Number:   0x0110
        Device Class:   255   (Vendor-specific)
        Device Subclass:   255   (Vendor-specific)
        Device Protocol:   255
        Device MaxPacketSize:   8
        Device VendorID/ProductID:   0x0B0C/0x003F   (Todos Data System AB)
        Device Version Number:   0x0000
        Number of Configurations:   1
        Manufacturer String:   1 "Todos Data System AB"
        Product String:   2 "Handelsbanken card reader"
        Serial Number String:   0 (none)
    Current configuration:   0 (unconfigured)
    Configuration Descriptor   
        Length (and contents):   32
            Raw Descriptor (hex)    0000: 09 02 20 00 01 01 00 80  32 09 04 00 00 02 FF FF  
            Raw Descriptor (hex)    0010: FF 04 07 05 81 02 40 00  00 07 05 02 02 40 00 00  
            Unknown Descriptor   0020: 
        Number of Interfaces:   1
        Configuration Value:   1
        Attributes:   0x80 (bus-powered)
        MaxPower:   100 ma
        Interface #0 - Vendor-specific ..............................................   "MCI_OSR_0205"
            Alternate Setting   0
            Number of Endpoints   2
            Interface Class:   255   (Vendor-specific)
            Interface Subclass;   255   (Vendor-specific)
            Interface Protocol:   255
            Endpoint 0x81 - Bulk Input   
                Address:   0x81  (IN)
                Attributes:   0x02  (Bulk no synchronization data endpoint)
                Max Packet Size:   64
                Polling Interval:   0 ms
            Endpoint 0x02 - Bulk Output   
                Address:   0x02  (OUT)
                Attributes:   0x02  (Bulk no synchronization data endpoint)
                Max Packet Size:   64
                Polling Interval:   0 ms

It has been like this for ten years or so and on 5 or more Mac:s I have owned during this period. I am sick of it and wonder if there is a way to restart the driver for the card reader/reset USB ports or similar I can do without restarting the computer every time?

  • Refer to developer.apple.com/library/mac/#documentation/Darwin/Reference/… & developer.apple.com/library/mac/#documentation/Darwin/Reference/… — now you only have to find the right kext, if it is a kernel extension. Everything else would only require the device to be disconnected and reconnected. AFAIK as a developer.. :) – 19h Apr 12 '13 at 13:00
  • Thanks for you answer. I know about kext(un)load but as I wrote in the question, the installer does not install a kext, just some kind of binary in /usr/libexec. Maybe there is a smartcard reader subsystem in Mac OS X that triggers when something that identifies itself as a cardreader is connected to the USB port? Would appreciate further comments and ideas. – d-b Apr 13 '13 at 15:20

I have made some progress and a partial answer to my question is that it is not the driver that fails but Apple's smart card daemon. Restarting it

sudo killall pcscd
sudo /usr/sbin/pcscd -fda

has so far solved my problem everytime.

  • How did you find the process "pcscd". My USB mouse stops working and I guess its the same reason. – Naveed Abbas Jul 5 '16 at 2:54
  • 2
    pcscd seems to have been replaced by something else in newer versions of the OS. There is something called com.apple.ctkpcscd that might interesting. Google it! – d-b Jul 12 '16 at 15:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .