You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Royal PT-300 receipt printer, which supports both Classic Bluetooth and BLE. In order to make BLE work, I had to connect to the printer in setup mode and set the printer to "label mode". Once I did that, the printer started broadcasting as Printer_{first 4 hex of MAC address} i.e. Printer_AAAA. I added Printer_ to the list of valid printer names, and I was able to print images from my Mac using your library without any issues, so adding Printer_ to this list should be an easy way to add support for the Royal PT-300.
One thing I noticed is with larger images, I saw some buffer overrun issues. One image printed with part of it sheared off, and another printed garbled text. This usually happens when the source device's buffer is overwhelmed or when some data is written to the stream but is lost, which results in the printer's ESC/POS commands getting offset. I wonder if there's some issue with the BLE implementation where it's losing bits somewhere, or if this is specific to my printer (and likely a buffering issue)? I don't see the same issue using my library ESCPOS_NET and printing over WiFi to the printer, but the WiFi chip and the BLE chip may have different buffer sizes or something.
The text was updated successfully, but these errors were encountered:
The data loss may be due to the writeWithoutResponse vs writeWithResponse. Some printers can't handle the data being sent too quickly and without responses. Try using writeWithResponse. It will probably go much slower, but the data will be reliable.
For the change to the library, please do a pull request - thanks
I have a Royal PT-300 receipt printer, which supports both Classic Bluetooth and BLE. In order to make BLE work, I had to connect to the printer in setup mode and set the printer to "label mode". Once I did that, the printer started broadcasting as
Printer_{first 4 hex of MAC address}
i.e.Printer_AAAA
. I addedPrinter_
to the list of valid printer names, and I was able to print images from my Mac using your library without any issues, so addingPrinter_
to this list should be an easy way to add support for the Royal PT-300.One thing I noticed is with larger images, I saw some buffer overrun issues. One image printed with part of it sheared off, and another printed garbled text. This usually happens when the source device's buffer is overwhelmed or when some data is written to the stream but is lost, which results in the printer's ESC/POS commands getting offset. I wonder if there's some issue with the BLE implementation where it's losing bits somewhere, or if this is specific to my printer (and likely a buffering issue)? I don't see the same issue using my library ESCPOS_NET and printing over WiFi to the printer, but the WiFi chip and the BLE chip may have different buffer sizes or something.
The text was updated successfully, but these errors were encountered: