iljabauer / python-escpos

Automatically exported from code.google.com/p/python-escpos
GNU General Public License v3.0
0 stars 0 forks source link

Epson TM-T88IV printing garbage #41

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I connected my Epson TM-T88IV thermal receipt printer to my Raspberry Pi via 
serial connection. The printer has a RS232 port, from which I'm using pins no. 
2, 3 and 7, which are used for transmit, read and ground signals. Those pins 
are connected to corresponding Raspberry Pi pins while transmit and read are 
crossed.

I followed the set-up and usage tutorial step by step, but whenever I try to 
print some kind of data (e.g. Hello world!) then the printer prints garbage. At 
first it printed random garbage text, but when I set up the DIP switches (DSW1: 
all pins except 7 are off; DSW2: all pins are off) and changed the settings in 
the code, it keeps printing me the same garbage text every time. For example, 
the text 'Hello world!' prints as 'S ??::'. Whenever I try printing a single 
letter, the printer wouldn't print anything at all.

I think that the problem lays somewhere between the printer and Raspberry Pi 
settings, but could anyone help me get closer to the solution?

Original issue reported on code.google.com by rodionov...@gmail.com on 6 Feb 2015 at 11:58

GoogleCodeExporter commented 9 years ago
Sir, you have connected a port known to have +/-12 volt swings, to a 3.3 volt 
port on your Raspberry Pi. You have destroyed the serial interface, and more, 
on your Pi.

You need to have an ancillary device between the two:

  TM-T88IV --> TTL to RS232 adapter --> Pi

Your Pi expects 3.3v Transistor-Transistor-Logic level signals. It is not a 
true serial port but rather, a more fundamental chip-to-chip interface.

Buy a few of these:

http://www.ebay.com.au/itm/MAX3232-RS232-Serial-Port-To-TTL-Converter-Module-DB9
-Connector-With-Cable-OP-/281540487863?pt=AU_Gadgets&hash=item418d1eeab7

Each one of these can be attached to the TX/RX pins of a full working order Pi, 
Beagle, Arduino, Cubbie and more. You will have to disable Hardware Flow 
Control on any device used, as these adapters typically have no Request-To-Send 
or Clear-To-Send signal lanes.

When you do have this up and running, I can show you how to substitute fonts in 
place. This can be used for new symbols like the Euro or directed quote marks; 
though, I learned it because I needed a better font for all my hexadecimal 
numbers.

Original comment by syncma...@gmail.com on 16 Feb 2015 at 10:21