Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Emulating USB device for SmartCardServices #14

Open
frankmorgner opened this issue Sep 6, 2017 · 3 comments
Open

Emulating USB device for SmartCardServices #14

frankmorgner opened this issue Sep 6, 2017 · 3 comments

Comments

@frankmorgner
Copy link

I'm looking for a way to tell SmartCardServices(7) to load a virtual smart card reader driver. For example, /usr/local/libexec/SmartCardServices/drivers/ifd-ccid.bundle/Contents/Info.plist tells the service to load the CCID driver when a specific USB device has been recognized.

I've successfully installed the kernel extension and compiled virtual_mouse on macOS 10.12. The program works as expected, by randomly moving the position of the mouse pointer. Unfortunately, the mouse with its vendor id/product id is not recognized by SmartCardServices. I noticed that listing the system's USB devices (ioreg -p IOUSB -l -w 0) doesn't list the virtual device, either.

Do you think emulating a USB device so that the system service detects it would be possible with foohid?

@unbit
Copy link
Owner

unbit commented Sep 6, 2017

Hi, HID protocol works at a different layer in respect to USB. Honestly i do not know if there is a HID standard for smartcards :(

@frankmorgner
Copy link
Author

Yes, HID is not for smart cards (there is USB CCID for that). But to trigger SmartCardServices it's possible to use any physical USB device, only the vendor and product IDs need to be listed in the driver's Info.plist. For example, I've already successfully configured my driver to be started when connecting a smartphone via USB. The type of device didn't matter (mass storage in case of the phone), only the vendor and product IDs of the phone needed to match the driver's Info.plist.

So again, the question whether you know why a virtual foohid device is not listed with ioreg -p IOUSB -l -w 0)?

@unbit
Copy link
Owner

unbit commented Sep 6, 2017

Because it is not a usb device or host. It register itself in the HID framework not the USB one

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants