0

I am trying to communicate with a GBA ST2 Bill Validator using a USB-Serial connection. Everything works fine on Windows (the device is then attached to a COM port) but not on Linux (so far with Ubuntu 14.04, 16.04 and Debian 8).

By default the cdc_acm drivers are used it is attached to /dev/ttyACMx, but it does not answer any request. (However when requested while in sleep mode it wakes up instantly).

Related output of dmesg and lsusb:

$ dmesg
[26600.821389] usb 2-1: new full-speed USB device number 37 using ohci-pci
[26601.307233] usb 2-1: New USB device found, idVendor=16f9, idProduct=0003
[26601.307237] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[26601.307239] usb 2-1: Product: GBA ST2
[26601.307240] usb 2-1: Manufacturer: Astrosystems
[26601.307242] usb 2-1: SerialNumber: 06010010001
[26601.316173] cdc_acm 2-1:1.0: ttyACM0: USB ACM device

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

When forcing the device to use the usbserial driver, I was able to use it under a Linux VM (Virtualbox hosted on Windows), but not on a plain Linux machine. I used the following commands to use the usbserial driver:

sudo modprobe -r cdc_acm
sudo modprobe usbserial vendor=0x16f9 product=0x0003

Related dmesg and lsusb output:

$ 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

How can I communicate with this device under Linux? Any idea would be appreciated.

Pierre B.
  • 11,612
  • 1
  • 37
  • 58
  • Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Super User](http://superuser.com/) or [Unix & Linux Stack Exchange](http://unix.stackexchange.com/) would be a better place to ask. Also see [Where do I post questions about Dev Ops?](http://meta.stackexchange.com/q/134306) – jww Apr 07 '17 at 09:09
  • I asked myself the same question. I chose to finally post my question here, as this problem may be related to programmatic aspects (such as the drivers used). I'll try on another better suited place. – Pierre B. Apr 26 '17 at 13:09

1 Answers1

0

depends on what protocol the bill validator uses at the moment, according to http://www.intelligentvending.co.uk/payment-systems-telemetry/banknote-readers-note-stackers/gba-st2.htm it is able to communicate over ccTalk, MDB, Parallel, Pulse, Serial, SSP

you can communicate with a CDC ACM device using socat. an example for using socat to send AT commands is on https://unix.stackexchange.com/questions/97242/how-to-send-at-commands-to-a-modem-in-linux

socat establishes the connection what command sequences you have to send depends on the present protocol of the bill validator...

Community
  • 1
  • 1
ralf htp
  • 9,149
  • 4
  • 22
  • 34