Printing from a webapp using WebBluetooth

// Expert user has replied.
J Joe Westcott 2 years 8 months ago
193 1 0

Hi All,

I'd like to use the WebBluetooth API available in chromium-based browsers to send a print job to Zebra BLE compatible printers. WebBluetooth allows reading and writing to GATT characteristics, but is *not* an environment where Bluetooth Classic is available, unfortunately!

However, it appears printing to Zebra printers is possible via BLE alone, as described in this documentation [0].

The file I wish to print is a ZPL document and averages around 50KB per label. I know bandwidth is limited with BLE, but with Bluetooth 5 and newer devices it appears possible to achieve around 400kbps [1]. This should result in about 1 second for a 50KB label if both devices support it, which is fine for my use case.

My questions:
1. Can zebra devices with Bluetooth 5 achieve BLE transfer speeds in the neighbourhood of 400kbps?
2. The documentation [0] mentions a 512 byte characteristic maximum. Can jobs larger than 512 bytes be split into multiple 512 byte characteristic writes, or is 512 the job limit?
3. Which Zebra printers support this functionality?
Specifically I'm looking at the ZD621 series [2], but the specifications mention "BLE is intended for use with Zebra printer setup mobile app only". Can I print to it via BLE?

I appreciate any assistance!

[0] https://www.zebra.com/content/dam/zebra/software/en/application-notes/A…
[1] https://punchthrough.com/maximizing-ble-throughput-part-3-data-length-e…
[2] https://www.zebra.com/gb/en/products/spec-sheets/printers/desktop/zd621…

Please Register or Login to post a reply

1 Replies

S Steven Si

1. The reference document [0] was written in 2014 prior to Bluetooth 4.0, when the printer models at that time were on Bluetooth 3 radio chipset. Nowadays, most of the newer printer models are already on Bluetooth 5.0 and should be able to achieve a higher data rate. The following SGD can be used to check the Bluetooth version on the printer

! U1 getvar "bluetooth.radio_version"

2. There is no job size limit per se. We can even use the BLE for the firmware update, though it could take a much longer time. It's always recommended to break a large amount of data into small chunks and write one chunk of data one at a time. The 512 byte is the limit at the link layer for each packet of the characteristic. Usually, the Bluetooth stack would split the packet if the data is larger than 512 bytes. It's not something to be concerned at the application layer.

3. Any Zebra printers that have Bluetooth Low Energy equipped can be used for printing over the BLE. The ZD621 is on Bluetooth 5 and can be used for printing. In general the BLE is slower than the Bluetooth Classic (SPP). That's why it is recommended to use SPP for printing and BLE for the printer configuration. If the application can tolerate the performance of the BLE, then the BLE is a right alternative for printing.

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