<div dir="ltr">James, you said that regarding the CCID side, the driver is plug and play (and indeed the common code in ccid.c/ccid.h is almost untouched). So maybe you can put the bluetooth boiler plate into a seperate driver, linking against libccid at compile time? This would mean that libccid only needs to export the some library functions. Alternatively, you could pull the libccid sources from a submodule at compile time.<div><br></div><div>Have you also tested the contact-less bluetooth readers from ACS?</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-08-17 11:01 GMT+02:00 Ludovic Rousseau <span dir="ltr"><<a href="mailto:ludovic.rousseau@gmail.com" target="_blank">ludovic.rousseau@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<br><div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">2017-08-14 14:53 GMT+02:00 James <span dir="ltr"><<a href="mailto:pcsclite@madingley.org" target="_blank">pcsclite@madingley.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Attached are patches to support the HID Omnikey 2061, and<br>
the ACR3901U-S1 bluetooth card readers.<br>
<br>
---<br>
<br>
The HID Omnikey 2061, is end of life but is readily<br>
available on eBay. I reverse engineered the protocol<br>
from observing the windows drivers. It uses CCID over<br>
serial over Bluetooth RFCOMM. As such the pin is not<br>
particularly well protected.<br>
<br>
To use the HID driver, first pair the reader with the<br>
computer using your favourite bluetooth stack then create<br>
a file in /etc/reader.conf.d/ containing (edit the path<br>
and set the DEVICENAME to be the MAC address of the reader)<br>
<br>
DEVICENAME 00:80:25:33:44:55<br>
FRIENDLYNAME "My HID 2061"<br>
LIBPATH /usr/lib64/pcsc/drivers/seria<wbr>l/libccidhid.so<br>
<br>
---<br>
<br>
The ACR3901U-S1 is in current production and communicates<br>
using a stripped down version of CCID over Bluetooth<br>
Low-Energy GATT, or CCID over USB. The over-the-air<br>
interface is protected by mutual authentication, and<br>
encrypted using 128 bit AES CBC using a random session<br>
key. The driver implements support for both interfaces.<br>
<br>
The device requires a 16 byte secret key to be known by<br>
the connecting computer, at the moment pcscd doesn't<br>
provide a simple way to insert this - (in this patch it's<br>
hard coded to the default value). What would be the<br>
preffered method of getting this into the driver?<br>
<br>
To use the ACR driver find the MAC address of the device<br>
(use hcitool lescan) on linux<br>
<br>
and create a file in /etc/reader.conf.d/ containing (edit<br>
the path and set the DEVICENAME to be the MAC address of<br>
the reader)<br>
<br>
DEVICENAME 11:22:33:44:55:66<br>
FRIENDLYNAME "My ACR3901U-S1"<br>
LIBPATH /usr/lib64/pcsc/drivers/seria<wbr>l/libccidacr.so<br>
<br>
For USB operation the drive is plug and play.<br>
<br>
The ACR driver still outputs some debug output to stderr<br>
which should be fixed.<br>
<br>
The HID driver patch contains support for multiple serial<br>
devices, which is used by the ACR driver patch.<br></blockquote><div><br></div></div></div><div>Nice job.<br><br></div><div>I am a bit perplex about what to do with these 2 patches.<br></div><div>I do not like to add/merge code that diverge too much from the CCID specification. And in this case I do not even have the devices to test/debug/support the new code.<br></div><div><br>Also managing shared secrets by pcscd drivers is a new task that should be thought about. Using a hard coded (default) key value is not a real solution.<br><br>It is also a problem of free time and motivation :-)<br clear="all"></div></div><br></div><div class="gmail_extra">I propose you to create a fork of my CCID driver at github (or somewhere else) so you can maintain your patches and documentation.<br><br></div><div class="gmail_extra">Bye,<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888"><div class="gmail_extra">-- <br><div class="m_-1958395027410864029gmail_signature" data-smartmail="gmail_signature"> Dr. Ludovic Rousseau</div>
</div></font></span></div></div>
<br>______________________________<wbr>_________________<br>
Pcsclite-muscle mailing list<br>
<a href="mailto:Pcsclite-muscle@lists.alioth.debian.org">Pcsclite-muscle@lists.alioth.<wbr>debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle" rel="noreferrer" target="_blank">http://lists.alioth.debian.<wbr>org/cgi-bin/mailman/listinfo/<wbr>pcsclite-muscle</a><br></blockquote></div><br></div>