How to reverse engineer an bluetooth HCI log to add a new Printer ? #18
-
|
Hi, I have a Peripage A40+ printer 304 dpi. I wanted to make a PR to add its support, but even with all the bluetooth logs and analysing in wireshark I don't know where to find the necessary informations. Thanks ! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Try this code: import peripage
printer = peripage.Printer(
# MAC
mac='00:15:83:15:BC:5F',
# Doesn't matter:
printer_type=peripage.PrinterType.A6p
)
printer.connect()
# Print many letters in hex to determine the width
printer.writeASCII('0123456789ABCDEF' * 20)
printer.disconnect()This shoud print Next, add your printer spec here: row_characters=SOME_VALUE_YOU_GOT
row_width=row_characters * 12
row_bytes=row_width // 8 |
Beta Was this translation helpful? Give feedback.
Try this code:
This shoud print
0123456789ABCDEFrepeated 20 times. Count length of line in 16base, convert to 10base and you will get the width of line in characters.Next, add your printer spec here:
https://github.com/bitrate16/peripage-python/blob/main/peripage/__init__.py#L46
similar to others, or tell me and i'll add: