How to add a device with VID/PID in Linux - linux

I am working on a smartcard project in Linux, and I am using Alcor 9563 smartcard reader, I use ccid/pcsc , but Linux doesn't identify the reader:
How can I add this device with vid/pid in Linux?

https://ccid.apdu.fr/ is the homepage of libccid. It has a list of supported readers. I didn't find your reader. It also has detailed instruction how to test if a reader is supported and how to contact the developers.
The Vendor ID looks interesting, it is not the one usually used by Alcor, and it is not known to the USB ID repository https://usb-ids.gowdy.us/read/UD?restrict=2
Update The Reader is now supported in libccid since version 1.4.31
https://ludovicrousseau.blogspot.com/2019/08/new-version-of-libccid-1431.html

Related

How to extend the BOS descriptor in FunctionFS?

I'm trying to implement a simple WebUSB device on a Raspberry Pi 4. I've created a Linux USB Gadget for this purpose with a FunctionFS function. Currently I've taken the usb/ffs-test.c example from the Linux kernel as a basis.
According to this excellent Google blog by Reilly Grant on "Building a Device for WebUSB", I have to extend the Binary device Object Store (BOS) with the Microsoft OS compatibility descriptors to get this to work on Windows. I could also add the WebUSB descriptors to it but this is not a functional requirement.
However I'm stuck on this step, how do I extend the BOS with FunctionFS? This is my first experience with FunctionFS or USB for that matter, so I could be missing something obvious. I've found some usb_os_desc_header struct defined here in usb/functionfs.h, but I don't know if this is what I need or how I should use it.

Device Drivers for System on Chip (SOC)

I want to read the GPS data from my android phone inside the kernel space. I want to write a device driver for my GPS and request data through it. But unlike external devices I could not find the Vendor Id and device Id of the GPS hardware or the SOC on which it is installed. Can someone help me with how to collect the details required for writing the driver?
Thanks.
You already have found one of many problems with SOC and device drivers. Therefore another approach is used in the linux kernel: Platform driver and Platform devices. You wont need any Vendor IDs and such stuff.
I recommend you to read some tutorials and get started with it:
Readme: https://www.kernel.org/doc/Documentation/driver-model/platform.txt
Code example for CAN: https://github.com/torvalds/linux/tree/master/drivers/net/can/ifi_canfd
Disscussion about difference: What is the difference between a Linux platform driver and normal device driver?
Sadly I am not able to answer your questions on how to get those id's.

CDC class vid:pid to use for my STM32F3 based equipment

I am plannig to use usb connection to let PC communicate with my equipment based on STM32F373VC.
I tried the CDC class using the example in STM32CubeF3 V1.9.0 by removing the uart peripheral management.
PC detects a usb device with vid:pid 0483:5740. Linux automatically recognizes CDC class (STMicroelectronics STM32F407), loads the cdc_acm module, and the ttyACM0 VCP is created. I don't know about Windows, but reading the readme of the example it seems that a driver should be installed.
I have some questions:
Can I use VID:PID 0483:5740 for my product?
Does the various versions of Windows automatically recognize the device (and associate it with the CDC driver) or is it really necessary to install a driver?
If I can't use these VID:PID, can I ask ST for a PID assigned to me for small productions (as other silicon vendors do)?
Could ST assign me a PID that the various versions of Windows, Linux and Mac automatically recognize as CDCs without needing to install drivers or configure anything?
If not, do VID:PID pairs exist that are automatically recognized by the various versions of Windows, Linux and Mac as CDC class without needing to install drivers or configure and that I can legally use for my small production?
About drivers recognizing your device:
If your device is of class CDC, driver should be able to be loaded no matter what VID:PID is used (as long as selected VID:PID is not assigned to other device that has device specific driver). For Windows please refer to this document.
You should be able to test Linux CDC class driver by altering device descriptor in your device library code (which should be possible, if I correctly understand available ST documentation).
About having your own VID:PID:
There is some thread on github about this here. It should cover all possible options including the ones you asked about.

Remote Firmware Upgrade of HID OMNIKEY 5427 CK Smart card Reader using Windows CE embedded device

There was a requirement from a customer that they want a solution to upgrade the firmware of the HID OMNIKEY 5427 CK Smart card Reader remotely from an embedded device on which it is connected to. The embedded device runs Windows CE OS. They want a solution that runs on the embedded device and upon need they want to upgrade the firmware.
I read from the HID global documentation that this can be done in 2 ways.
Via a web server that starts when you connect the card reader to your Windows PC.
Via APDU commands in CCID mode.
It seems like the first option of booting a web server in the embedded device looks like a vague approach.
So, I am currently focusing on the second method of sending APDU commands to the card reader via CCID mode.
Does windows CE support the APDU communication for smart card readers? If so, is there some specific dll that I have to utilise and the corresponding APIs?
I am very new to this smart card environment and If you people could help me with some pointer, it will be greatly appreciated.
Thanks in Advance.

Smartcard TLP224 protocol specification

I am working on the Smart Card Device driver.
The card, that I work with works over protocol TLP224.
Where can I find an full specification of this protocol?
I tried to look up over the internet, but only found some docs,
that regards to a specific card readers.
Is there any full specification of TLP224?
How I read GCI400 specification, this is a communication protocol between host and card reader. I never heard from a card supporting this. Since it is patented, it is probably not publicly available but only after buying a license, signing a non-disclosure agreement or something like that. If you have I choice I would recommend to switch to a reader supporting an open interface.

Resources