简体   繁体   English

如何检测智能卡读卡器是否有显示?

[英]How to detect if the smart card reader has a display?

I want to know programmatically if a smart card reader that is attached to the system, has a display.我想以编程方式知道连接到系统的智能卡读卡器是否有显示器。

(Basically I want to know if it's a CLASS 1, no pad/no display, or CLASS 2, pad/no display, or CLASS 3, pad/display, reader) (基本上我想知道它是 CLASS 1,无垫/无显示器,还是 CLASS 2,垫/无显示器,或 CLASS 3,垫/显示器,阅读器)

I can query features ( CM_IOCTL_GET_FEATURE_REQUEST ), and for example if I see FEATURE_VERIFY_PIN_DIRECT or FEATURE_MODIFY_PIN_DIRECT , I know it has a keypad.我可以查询功能 ( CM_IOCTL_GET_FEATURE_REQUEST ),例如,如果我看到FEATURE_VERIFY_PIN_DIRECTFEATURE_MODIFY_PIN_DIRECT ,我知道它有一个键盘。 But how to find out it has a display?但是怎么知道它有显示器呢? There's a possible value FEATURE_IFD_DISPLAY_PROPERTIES but my reader doesn't return it.有一个可能的值FEATURE_IFD_DISPLAY_PROPERTIES但我的读者没有返回它。

Do I really have to assemble a list of reader names and then make my own lookup table?我真的必须收集一个读者姓名列表,然后制作我自己的查找表吗? (Does such a table exist somewhere?) (某处是否存在这样的表?)

Maybe the Windows CCID driver does not return FEATURE_IFD_DISPLAY_PROPERTIES .也许 Windows CCID 驱动程序没有返回FEATURE_IFD_DISPLAY_PROPERTIES This works fine on Unix with my CCID driver https://ccid.apdu.fr/ .这在 Unix 和我的 CCID 驱动程序https://ccid.apdu.fr/上运行良好。

Another option is to parse the CCID USB descriptor.另一种选择是解析 CCID USB 描述符。 The screen size is available in the wLcdLayout field.屏幕尺寸在wLcdLayout字段中可用。

If you want a list (non exhaustive) of CCID readers with a screen you can use my web site with the correct query: https://ccid.apdu.fr/select_readers/?wLcdLayout%E2%89%A51 (28 CLASS 3 readers) compared to the list of pinpad readers with no screen https://ccid.apdu.fr/select_readers/?wLcdLayout=0&features=PIN%20Verification (61 CLASS 2 readers).如果你想要一个带屏幕的 CCID 阅读器列表(非详尽无遗),你可以使用我的 web 网站进行正确的查询: https://ccid.apdu.fr/select_readers/?wLcdLayout%E2%89%A51 (28 CLASS 3阅读器)与没有屏幕的密码键盘阅读器列表相比https://ccid.apdu.fr/select_readers/?wLcdLayout=0&features=PIN%20Verification (61 CLASS 2 阅读器)。

There might be a special command the reader intercepts, returning the information you search (a different Pseudo-APDU in PCSC-speak), but this does not help to address the generic problem ie to support unknown readers as well.阅读器可能会拦截一个特殊的命令,返回您搜索的信息(PCSC 所说的不同的伪 APDU),但这无助于解决一般问题,即也支持未知的阅读器。

Complaining towards the manufacturers to support the call is unlikely to receive a reaction lacking a multi-million order.向厂商投诉支持号召,没有几百万的订单,不太可能得到回应。

You interpreted the FEATURE_IFD_DISPLAY_PROPERTIES correctly, the query would return number of characters per line as well as number of lines, see PCSC part 10, section 2.5.6.您正确解释了FEATURE_IFD_DISPLAY_PROPERTIES ,查询将返回每行字符数以及行数,请参阅 PCSC 第 10 部分,第 2.5.6 节。 (This exceeds mere existence of display.) There is the chance, that FEATURE_GET_TLV_PROPERTIES is supported instead, which returns a superset of the information. (这超出了仅仅显示的存在。)有可能改为支持FEATURE_GET_TLV_PROPERTIES ,它返回信息的超集。

For completeness: I'm not aware for a centrally maintained list of reader capabilities为了完整起见:我不知道集中维护的阅读器功能列表

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM