I’ve got an old thermal printer (from another project) that I want to be able to use with Gadgeteer.
I found this project on gadgeteering.net: http://www.gadgeteering.net/content/thermal-printer-gadgeteer. But the printer I’ve got must be a bit different to that because using that code won’t work.
Anyway, here are some images of the printer and a link to the two datasheets I’ve managed to find for it online. The on page 33 of the one called 362-dome-plusii you can see some information about the serial connection. On page 26 and 27 there is information on the baud rates etc.
Hardware-wise, I’ve soldered it up to an extender module and am trying to open it as a serial port. I’ve wired the RX and TX opposite to each other (as the gadgeteering.net guy does) and the gnd to gnd and have external power.
On the software side, I am using the following code:
GTI.Serial serial = new GTI.Serial(GT.Socket.GetSocket(9, true, null, ""), 9600, GTI.Serial.SerialParity.None, GTI.Serial.SerialStopBits.Two, 8, GTI.Serial.HardwareFlowControl.NotRequired, null); serial.Open(); serial.Write("dsfsd asdf sdf"); serial.Flush();
But this doesn’t seem to be working. I’ve changed the printers settings so that it is on 9600 but I’ve tried all other baud rates to no avail. If I send the above string, it does print but it always prints a series of crazy characters and changes everytime.
To me this seems like an incorrect baud rate but it is definitely correct. The only thing I can think of is that I don’t have the DTR (Data Terminal Ready) wire attached to anything because I don’t know what to do with it and also I’ve got no handshaking on. In the printers settings it can be XON/XOFF or “Hardware” which I thought might be the K socket stuff but couldn’t seem to get this working either.
Does anyone have any idea what I’m doing wrong? Or anything else I can try? Is it a handshaking problem?
Thanks in advance,