This page has been robot translated, sorry for typos if any. Original content here.

The principle of telephone cards

There are two main types of chip phone cards: 8 contact and 6 contact, usually in 6 contact cards, 5 contacts are used, among 8 contact cards there are also instances in which only 5 contacts are used, the rest are in load. The cards contain an electrically programmable ROM with a capacity of 256 * 1 bits with sequential bit-wise output of information and an internal incremental address counter. The write operation produces a change in the state of the memory cells "in one direction", the reverse change (erasing) by the interface of the card is not provided. Connecting cards to a computer for reading and writing is mainly carried out through the LPT port. Unfortunately, many cards can not be overwritten, because after the first record the fuse is burned. Need to build a calling card emulator.

The procedure of actions performed by the potato when you call.

  1. Power up.

  2. Reset.

  3. Reading the first 8 bytes and determining whether the card is valid in the region, storing them in RAM (with decoding if necessary).

  4. Read five byte units and save to RAM. Verify that the available capacity units of the card are encoded in the first 8 bytes.

  5. Power off.

After receiving the callee answer signal:

  1. Power up.

  2. Calculating the address of the last non-written bit. (approximately 1-3 seconds after pressing the "answer" key)

  3. Reset.

  4. Feed the number of imp. CLK to the corresponding address of the last non-written bit.

  5. Submission of the WRITE team.

  6. Giving command W \ C.

  7. Reading the first 8 bytes and determining whether the card is valid in the region, storing them in RAM (with decoding if necessary).

  8. Read five byte units and save to RAM. Verification of the compliance of the available units of the card capacity encoded in the first 8 bytes, checking whether the units have decreased in comparison with the previous reading.

Power off.

After a minute, if the connection is not broken, then the actions from the first to the ninth are repeated cyclically.