USB串行通信在Linux上不工作(票据验证器GBA ST2)

USB串行通信在Linux上不工作(票据验证器GBA ST2),linux,usb,usbserial,Linux,Usb,Usbserial,我正试图通过USB串行连接与GBA ST2票据验证器通信。在Windows上一切正常(设备连接到一个COM端口),但在Linux上(到目前为止,Ubuntu 14.04、16.04和Debian 8都不正常) 默认情况下,将使用cdc_acm驱动程序将其连接到/dev/ttyACMx,但它不会响应任何请求。(但是,当在睡眠模式下被请求时,它会立即唤醒) dmesg和lsusb的相关输出: 当强制设备使用usbserial驱动程序时,我可以在Linux虚拟机(Windows上托管的Virtualb

我正试图通过USB串行连接与GBA ST2票据验证器通信。在Windows上一切正常(设备连接到一个COM端口),但在Linux上(到目前为止,Ubuntu 14.04、16.04和Debian 8都不正常)

默认情况下,将使用cdc_acm驱动程序将其连接到/dev/ttyACMx,但它不会响应任何请求。(但是,当在睡眠模式下被请求时,它会立即唤醒)

dmesg和lsusb的相关输出:

当强制设备使用usbserial驱动程序时,我可以在Linux虚拟机(Windows上托管的Virtualbox)下使用它,但不能在普通Linux机器上使用。我使用以下命令来使用usbserial驱动程序:

sudo modprobe -r cdc_acm
sudo modprobe usbserial vendor=0x16f9 product=0x0003
相关dmesg和lsusb输出:


如何在Linux下与此设备通信?如果您有任何想法,我们将不胜感激。

取决于验钞机目前使用的协议,因为它能够通过ccTalk、MDB、并行、脉冲、串行和SSP进行通信

您可以使用
socat
与CDC ACM设备通信。使用
socat
发送AT命令的示例如下:

socat
建立连接您必须发送的命令序列取决于票据验证器的当前协议


Stack Overflow是一个关于编程和开发问题的网站。这个问题似乎离题了,因为它与编程或开发无关。请参见帮助中心中的。也许或者会是一个更好的提问的地方。我也问了自己同样的问题。我最后选择在这里发布我的问题,因为这个问题可能与编程方面有关(比如使用的驱动程序)。我要去另一个更合适的地方试试。
sudo modprobe -r cdc_acm
sudo modprobe usbserial vendor=0x16f9 product=0x0003
$ sudo dmesg
[26022.203166] usbserial: USB Serial support registered for generic
[26022.203188] usbserial_generic 2-1:1.0: Generic device with no bulk out, not allowed.
[26022.206497] usbserial_generic: probe of 2-1:1.0 failed with error -5
[26022.206530] usbserial_generic 2-1:1.1: The "generic" usb-serial driver is only for testing and one-off prototypes.
[26022.206532] usbserial_generic 2-1:1.1: Tell linux-usb@vger.kernel.org to add your device to a proper driver.
[26022.206533] usbserial_generic 2-1:1.1: generic converter detected
[26022.207075] usb 2-1: generic converter now attached to ttyUSB0

 lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/12p, 12M
    |__ Port 1: Dev 35, If 0, Class=Communications, Driver=, 12M
    |__ Port 1: Dev 35, If 1, Class=CDC Data, Driver=usbserial_generic, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/12p, 480M