5 Replies Latest reply on Feb 14, 2019 12:33 PM by Steven Si

    Zebra ZQ520 connected via Bluetooth, but cannot print

    Daniel Beich

      I am using a Zebra ZQ520 printer and using a Zebra Printer demo (click here to see it on Github) using Swift 4.2 on Xcode. The demo, running on an iPad that connects to the printer via bluetooth, checks the printer connection using "printerConnection?.open( )" and the app confirms that the connection has succeeded (printManager.isConnected = true). However, when I send a command, like

       

      ! 0 200 200 150 1 \nT 7 0 50 0 Aztec Code - Label Spec 5-1 EC=47 \nBARCODE AZTEC 30 50 \n72819381828 \nENDAZTEC \nPRINT

       

      The printer does not respond despite the "printerConnection?.write" function successfully running. There are no errors displayed, so I am not sure what is wrong. I have tried other commands, like simple text:

       

      ! 0 200 200 210 1 \nTEXT 4 0 30 40 TestText \nFORM\nPRINT

       

      I've followed the commands in the Mobile Printing Manual, so I'm thinking the commands aren't the problem. Should I try to query the connection's status (I'm not quite sure how to do that) or is there some sort of error or misstep I've taken? Any help would be appreciated.

        • Re: Zebra ZQ520 connected via Bluetooth, but cannot print
          Steven Si

          It looks like that a carriage return is missing at the end of the CPCL script. Please try to add "\n" to the end as shown below.

          ! 0 200 200 150 1 \nT 7 0 50 0 Aztec Code - Label Spec 5-1 EC=47 \nBARCODE AZTEC 30 50 \n72819381828 \nENDAZTEC \nPRINT\n

            • Re: Zebra ZQ520 connected via Bluetooth, but cannot print
              Daniel Beich

              Thanks for the response, I did find that the missing carriage return did make the "TestText" work, but I still had problems with the Aztec barcode generating text. I tried pasting the command for that text and it failed to print, but it didn't throw an error.  I tried out some other prints, like PATTERN and QR codes, and neither of those two would work either. Might you have an idea of what's going on?

                • Re: Zebra ZQ520 connected via Bluetooth, but cannot print
                  Steven Si

                  Since it prints after appending the "\n" to the end of the script, it means the Bluetooth connection works, which means you can send whatever ASCII text over the Bluetoot to the printer. Whether it prints or not, it depends on what's been sent. Now, you can focus on the Aztec barcode command text. I would suggest that you download the Zebra Printer Setup Utilities and connect the printer to the PC via USB. Then you can test out the Zetac barcode command. If the command works and prints, the ASCII text of the command should work too over the Bluetooth. Hope this helps.

                    • Re: Zebra ZQ520 connected via Bluetooth, but cannot print
                      Daniel Beich

                      Steven,

                      I was able to test out the Aztec commands from the USB connection and it was successful. However, no matter how many times I try Aztec from my app, it fails. I've ensured that the text is being taken in ASCII format with no unnecessary characters or spaces. I've tried several formats from my code now and here's what I've figured out:

                       

                      Worked: Text commands, Barcode 128, Maxicode

                      Did not work: Aztec, QR Code, Pattern, PDF417

                       

                      Is there something up with Aztec/QR Code/PDF417 that I'm missing?

                        • Re: Zebra ZQ520 connected via Bluetooth, but cannot print
                          Steven Si

                          There should be no difference whether you send text commands or Aztec barcode, because they are all represented in text format in ZPL. There are a few ways to debug your issue. You can try to let the app send the exact text string that you sent from Setup Utilitye, to see if the printer prints the same label. If the printer doesn't, then you can try to set up the printer to input.capture mode and check what's been received by the printer through the file dump.

                          ! U1 do "file.dir" "E:"
                          ! U1 do "file.type" "IN001.DMP" // This is just an example. Your dump filename might be IN003.DMP.