CcTalk coin acceptor without reaction when inserting coins

I am writing a Linux application that should handle inserting coins (let's say that at the moment I need to recognize in the application which coin was inserted). I am using SCA1 Coin Acceptor (ICT). I need it to work with Polish coins (currency-polish zloty). I was able to get a connection between a PC and a coin receiver for work, but I have some problems.

A brief description of my installation:

  • PC connected to the coin acceptor via RS232 (+ USB converter) via ccTalk protocol.
  • Block 1: all off, but for the 10th switch, which is set to ON (according to the documentation)
  • Switch Block 2: All OFF
  • I set the prohibition status to allow everything (from manual documents)
  • I set the host prohibition status to turn on the device (from manual documents)

I can receive data from the coin acceptor regarding the serial number, software version, etc. A simple survey also works. The only problem is to get information about the inserted coins. I send the command "Read buffered credit or error codes" (Header 229) - according to the documents - every 500 ms or so, and every time I get the result 0 (bytes are 0x00), the result is returned correctly, it just seems like I did not insert a coin when I have it. I tried using coins, as well as a dime. All coins are “rejected”, and by rejecting, I mean that the “Coin Receiver” does not seem to process these coins (just returns them), on the other hand, when I send a command to get the number of rejected coins, I get 0 again.

So, now the question is for you, do you know about any additional settings necessary for its operation (preferably with Polish coins)? In addition, by default (for example, the coin acceptor is not connected to the PC, but powered), how should the coin acceptor respond to inserted coins? Just return them (as in my case) or "process" them, and then return them or put them in a "bank"?

I assume that it makes no sense for me to post code. I created two different applications, and the problem is the same.

One of python, I took adventage https://github.com/Baldanos/ccTools , the second application is written in C, something like: https://github.com/BitCoding/cctalk .

It is doubtful that the device is broken, because I tried to use another device without a difference. In addition, the devices are brand new.

Any suggestions would be helpful. Thank you in advance.

+1
source share
1 answer

I would write this as a comment, but I don't have enough reputation:

I also used the Baldanos library as a starting point to get my coin acceptor working. I would first replace

ser.read(50) 

with

 time.sleep(0.01) #give it time for all bytes to be in ser.in_waiting ser.read(ser.in_waiting) 

Since, as said in the comments, you do not know if the message will be 50 bytes long.

However, I managed to get it to work without changing too many things. For me, the coin acceptor has already been configured for the euro. What does your coin acceptor return when requesting a coin identifier (sending "184" and range 1.16)?

+1
source

All Articles