anastaciocintra / escpos-coffee

Java library for ESC/POS printer
https://anastaciocintra.github.io/escpos-coffee
MIT License
280 stars 74 forks source link

Hope Support Beep Command #56

Open Mfk759853063 opened 3 years ago

Mfk759853063 commented 3 years ago

when i set escpos.write(0x07), but ticket printer not beep? am I wrong? please see: https://pythonhosted.org/python-printer-escpos/_modules/escpos/commandset/generic.html#Generic.beep

Mfk759853063 commented 3 years ago

i find this command byte[] beep = {0x1b,0x42,0x02,0x01}; //// Beeps 2 times for 1*50ms each time escPos.write(a, 0, a.length) :)

anastaciocintra commented 3 years ago

Hi @Mfk759853063

nice, you discovered the command sequence that works on your printer.

I find some issues about beep on escpos-php from mike42 https://github.com/mike42/escpos-php/issues/142 https://github.com/mike42/escpos-php/issues/173 https://github.com/mike42/escpos-php/issues/174

based on these issues: -not all printer models have this feature. -the (beep) command depends on printers model / not a pattern I don't know yet the best whay of how to implement the beep, if it is good to configure on some text file or class enheritance.

The lib have some others similar commands that needs design attention, like "open cach drawer", "line feed" and "character table configuration".

I'm thinking about it.