Skip to content

Instantly share code, notes, and snippets.

View breakfastpizza's full-sized avatar

Niko breakfastpizza

View GitHub Profile
@Ircama
Ircama / PT-P300BT.md
Last active September 21, 2024 13:25
Print to Brother PTP300BT from a computer
@dogtopus
dogtopus / Pipfile
Last active March 25, 2024 20:44 — forked from stecman/_readme.md
Brother P-Touch PT-P300BT bluetooth driver python
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
pybluez = "*"
pillow = "*"
packbits = "*"
@stecman
stecman / _readme.md
Last active July 4, 2024 12:24
Brother P-Touch PT-P300BT bluetooth driver python

Controlling the Brother P-Touch Cube label maker from a computer

The Brother PTP300BT label maker is intended to be controlled using the official Brother P-Touch Design & Print iOS/Android app. The app has arbitrary limits on what you can print (1 text object and up to 3 preset icons), so I thought it would be a fun challenge to reverse engineer the protocol to print whatever I wanted.

Python code at the bottom if you want to skip the fine details.

Process

Intitially I had a quick peek at the Android APK to see if there was any useful information inside. The code that handles the communication with the printer in Print&Design turned out to be a native library, but the app clearly prepares a bitmap image and passes it to this native library for printing. Bitmaps are definitely something we can work with.

@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt