Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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
           Connected
           Enabled
    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?

share|improve this question
    
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.. :) –  kenansulayman 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. –  user23122 Apr 13 '13 at 15:20

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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