Maybe a drop-in replacement parser can be used? I don't know. Why does the parser need to interpret the characters vs. simply passing them through? I don't quite understand.
By the way, the descriptor strings use UTF-16LE, not UTF-8, for some historical Windows reason.
Output of dmesg (and lsusb, and usbview) is displayed correctly (note that VID/PID are planned but not definitive):
[220572.580166] usb 1-2.1: New USB device found, idVendor=1209, idProduct=beee, bcdDevice= 1.23[220572.580170] usb 1-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3[220572.580172] usb 1-2.1: Product: Solo 🐝[220572.580174] usb 1-2.1: Manufacturer: SoloKeys
The output of your parse command replaces the two non-ASCII bytes with ?? as follows:
Parsing USB bus/device: 1209:BEEE (bus 1, device 56) idVendor: 0x1209 iManufacturer: SoloKeys idProduct: 0xBEEE iProduct: Solo ?? Found a CCID/ICCD device at interface 0
Interestingly, if I modify the Info.plist file to contain <string>SoloKeys Solo Bee</string>, then I can communicate via pcscd without problems. So it seems the correspondence between iProduct and plist is not strict, and the plist string entry is only used for logging output, e.g. in
00000004 readerfactory.c:1075:RFInitializeReader() Attempting startup of SoloKeys Solo Bee (20/20) 01 00 using /usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so
So, strictly speaking, it is possible to use current CCID/PCSC with Unicode in iProduct already today :)
In the Info.plist only the ifdVendorID and ifdProductID fields are used to identify a smart card reader.
The field ifdFriendlyName is used to set the PC/SC name. It can be anything (except Unicode for now).
If you could help me debug parse that would be fine.
I think I need to use libusb_get_string_descriptor() instead of libusb_get_string_descriptor_ascii(). What should I use for the langid parameter?
Yes, this makes sense. parse is just a helper utility, so it can do "lossy" descriptor to ASCII conversion. Whoever adds a reader that has Unicode descriptors (me ) can modify its output manually, before adding entries in readers/.
I understand Info.plist is generated at build time from the readers/ directory (all files in UTF-8, no UTF-16-LE), so I think that's the part that needs fixing, and you have a plan for this. Correct?
Given the relatively low frequency of releases, I'd love to get our device in for the next release in preliminary form (who knows when distributions pick up releases...). There are two problems:
I need to actually apply for 1209:BEEE with pid.codes; for this I need to open source the code (which I'll do "soon")
The ATR we use is preliminary as I'm not sure yet what all we have to include (currently I'm just sending [0x3b, 0x8c,0x80,0x01]
As I understand it, the ATRs included in this repository are informational only, so 2. should not be a blocker. Similarly I strongly expect 1. to be granted since we meet all the requirements (hw/fw open source).
Would it make sense for me to send as PR, and if so, under "should work" or "unsupported"? I'm also happy to use Solo Bee instead of Solo 🐝 if it helps, but given all your work...
My goal with this is to avoid our beta test users having to manually patch and compile pcsclite when they receive our tokens in the near future.
BTW, I already have assigned 1209:CC1D from pid.codes (http://pid.codes/1209/CC1D/), perhaps it could make sense to also/alternatively add this together with the minimal ATR above as "generic open source reader", for other developers to use before they decided on a specific VID/PID pair + ATR?