Communicating with a CashCode ATM on linux

I have implemented the CCNET protocol to communicate with a CashCode receiver from my software on Linux. I initially spent a lot of time trying to figure out why the device is not responding to the commands I am sending. Through trial and error I found a solution to set the following parameters for the serial port:

stty -F /dev/ttyS0 9600 cs8 -cstopb -parenb clocal -crtscts -ixon -ixoff ignpar -icrnl -opost -isig -icanon -iexten -echo

      

He worked on a development machine and two other test machines (they all had different motherboards). However, on the third test machine (having another mobile device) it seems that the device is not responding again. However, it works with Windows with various software on the same machine.

In the Not Responding section, I mean that after the command is sent, nothing can be read from the serial port for a 10 second timeout. All code has been tested and works on other motherboards. The port itself is determined by a kernel rule as specified in dmesg:

[    1.099382] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    1.127531] 00:0b: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

      

There are no warnings in dmesg regarding this serial port. Any ideas on how to debug this issue?

Complete output of "stty -F / dev / ttyS0":

speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V;
flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke

      

+3


source to share


1 answer


The problem has been resolved. This bill acceptor model operates at 19200 baud. Switching the port to 19200 solves the problem.



+1


source







All Articles