CPCL commands printing at start of label

D Dave Sanders 3 years 7 months ago
168 1 0

I'm working on an Android tablet app for a client. We've been using the RW 420 printers and everything was working fine for about a year. Then we decided to add two images to the label, a logo and a signature. (Though I don't believe this is the issue, as I can remove them and still have the same problem.)

What's happening is that I send the CPCL to the printer, via the printer.SendCommand() function, and then I send two printer.printImage commands, giving it the ZebraImageI objects I've created from android bitmaps.

Since I've implemented this we are getting random cases when a portion of the CPCL text sent to the printer gets printed as text on the label, and then the rest of the label tries to print as normal - but is malformed because some formatting commands weren't actually called.  If I immediately tell the app to print again, then it might work fine, or it might fail again.  I can't find any pattern on why its doing this, doesn't seem to be timing related, or have to do with me disconnecting or reconnecting the printer. Its as if every so often the printer just decides to print part of the commands in plain text.

Strangely, these commands are NOT the start of the text that I'm sending to the printer. Sometimes its near the top, after the printer setup commands. Other times its text from the middle of the print commands.  And then I can suddenly print 20 of the labels in a row without any problem, and then get an error.

Very frustrating since I can't see a code issue, nor can I recreate it consistently.

Is there possibly a communication / Bluetooth error going on?  I'm not seeing errors generated in the app at all. Has anyone else had to debug something like this and what steps should I take to track this down?

Please Register or Login to post a reply

1 Replies

D Dave Sanders

Solved! At least so far. We updated our printer firmware to the latest, and it updated the Bluetooth connection.  Apparently the test printer we had was very, very behind in firmware.

All good now.

CONTACT
Can’t find what you’re looking for?