sending hexadecimal control characters, how to?

Peter Alcibiades palcibiades-first at
Thu Dec 3 06:03:53 EST 2009

Sarah, brilliant!  It is indeed a receipt printer.  So do you maybe know how 
to do the next part?  In order to activate the paper cutter on it, one
is supposed to do this to trigger the auto cutter drive:

<ESC> “d” “0” or <ESC> “d” <0>
(1B)H (64)H (30)H or (1B)H (64)H (00)H
<ESC> “d” “1” or <ESC> “d” <1>
(1B)H (64)H (31)H or (1B)H (64)H (01)H

So do you have to convert some or all of this to ascii, and then
put that into the text?  And if so how?

The cash drawer via control 7 is pretty much essential, the paper cutter
would be very nice if possible.


Sarah Reichelt-2 wrote:
> On Thu, Dec 3, 2009 at 7:53 PM, Peter Alcibiades
> <palcibiades-first at> wrote:
>> I need to send a plain ascii text file to a printer, which is going to be
>> done, let's assume the file is printest, with
>>        cat printest>/dev/usb/lp0
>> Which just dumps the text file to that device.  There might be other ways
>> to do it, but that is verified to work.
>> For this to do some other stuff, it needs to have hex 07 at the end of
>> it.
>> Probably very simple but I never did this before
>> How do you do it?  Do I have to use send a raw key ascii code number
>> somehow?
> I have had a similar case where I had to send binary characters to a
> receipt printer e.g. CHR 27.
> It worked fine when I sent numToChar(27) instead,so I suggest you
> convert your hex to decimal, then try sending numToChar of whatever
> you get.
> (I realise that if it is only hex 07, then sending numToChar(7) is
> what you need to try, but there might be others, which is why I
> explained my logic).
> If this doesn't work, let me know and I will check my old code.
> Cheers,
> Sarah
> _______________________________________________
> use-revolution mailing list
> use-revolution at
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:

View this message in context:
Sent from the Revolution - User mailing list archive at

More information about the Use-livecode mailing list