2017-08-12 12:51 PM
Hi,
I'm investigating how to send ZPLII commands to an USB printer using a STM32F4 or F7 MCU.
So far i did some testing with USB FS Host examples. The printer is being recognized, but I'm not able to send a ZPLII string like: '^XA^FO10,10,^AO,30,20^FDFDTesting^FS^XZ';
Anybody experience with sending ZPLII commands to zebra printer via USB? Or how to send a raw string like mentioned above?
Thanks
2017-08-12 04:07 PM
Can you send any commands to it at all? Start with 'give me your version number.' Get command/response working first.
I can't help with USB commands, but programmatically building a string, we can do with sprintf()
2017-08-13 01:55 PM
Hi,
yes, I managed to receive to device description like Product & Vendor ID etc.
I was thinking/trying to use HAL_HCD_HC_SubmitRequest in order send the ZPLII string as data.
USB_status = HAL_HCD_HC_SubmitRequest(hUSBHost.pData,
hUSBHost.Control.pipe_out, 0, USBH_EP_BULK, USBH_PID_DATA, (uint8_t*) &txdata, 97, 0);But no success so far..
Function returns USBH_OK, but the printer doesn't respond accordingly.