Close

A Hello World for ccTalk: Send a Poll Command

A project log for Un-Inhibiting my Microcoin QL

Let me describe how I got my Microcoin QL coin acceptor to work.

mikeMike 02/22/2024 at 17:490 Comments

Bottom Line Up Front

Send the following bytes: 2 0 1 254 255. This is a ccTalk poll command. Get an acknowledgement back: 1 0 2 00 253. Know that your coin acceptor is communicating with you. Try other ccTalk commands hereafter.

TL;DR

As my efforts continue, I acknowledge that this has all been done before. And nothing new to those in the industry. 

So let’s begin by sending the ccTalk “poll command”, essentially “ping” by a different name. Above, the five bytes were presented: 2 0 1 254 255. Let me make two points:

  1. Bytes should be shown in hex. I should present: 0x02 0x00 0x01 0xfe 0xff. But RealTerm accepts either form, I’m lazy, didn’t want to type the prefix, so I'll show you decimal.
  2. Stating “poll command” and showing five bytes is technically incorrect. The five bytes actually comprise the ccTalk packet. The command is actually 254. The packet thus consists of the destination, 2, the number of data bytes, 0, the destination, 1, the (actual) poll command, 254, and the checksum, 255. Where the checksum is computed as 256 minus the remanding of the sum divided by 256, i.e., take the modulo operation by 256:   256 – (2+0+1+254)%256. I like using Python’s shell to quickly compute the ccTalk packet checksum:

Note further, that Python only returns positive values when computing a mod; you can mod the inverse to get the checksum.

To make a long story short, the result from the coin acceptor is an acknowledge (ACK) packet. The image of the command shows the poll and ACK in RealTerm:

The sent poll command (packet), 2 0 1 254 255 is underlined in green.

The ACK (response), 1 0 2 0 253 is underlined in blue.

For brevity, I did not show how to set the baud to 9600 8N1, (eight data bits, no parity, 1 stop bit), nor my choice to show hex values + a space as my RealTerm setup.

From here, it is a matter is issuing a variety of other ccTalk commands. Namely, those to retrieve information about the coin acceptor, and then setting values to control the device. And then hope there's no security controls (passwords / PINs) to restrict what can be done:

Discussions