tanelih / phonegap-bluetooth-plugin

Bluetooth plugin for PhoneGap version 2.6.0+
MIT License
57 stars 50 forks source link

How to send ESC Commands? #40

Open danicarla opened 8 years ago

danicarla commented 8 years ago

Hi....

I know that my question is not a phonegap-bluetooth-plugin But I believe you can help me .

I would like to know how to send ESC Commands to a printer Any feedback is appreciated!

Tks !

tanelih commented 8 years ago

Hi,

I've no idea. Sorry. 😓

danicarla commented 8 years ago

I appreciate the help! :)

The support my printer said I'm need to send the command as HEX string, not plain text. But I have no idea how to do it

tanelih commented 8 years ago

You'll need to convert the ESC string to a hexadecimal representation. You can try an online tool like this or just do the conversion in your code.

danicarla commented 8 years ago

Great!!! I think I'm evolving.

I had already tried that way, but even so it prints the hex code... I'm send the HEX code in an application developed by the company that distributes the printer and worked correctly ...

But in my application does not work :(

I 'm thinking I need to add some code at the beginning , to inform you that will be sent "HEX string" instead of "Plain Text"

dannygunawan commented 8 years ago

hi @danicarla have you found any solution for this issue?

danicarla commented 8 years ago

@dannygunawan Sorry.. Unfortunately you still can not print

dannygunawan commented 8 years ago

@danicarla Just in case you still need this feature, I found another plugin as an alternative. [https://github.com/don/BluetoothSerial]

danicarla commented 8 years ago

@dannygunawan Great!!! When I have time.. I will test Tks!