https://github.com/masatomizuta/py-brotherlabel
Raster print package for Brother P-Touch label printers
https://github.com/masatomizuta/py-brotherlabel
brother label p-touch pt-p900 pt-p900w pt-p950nw raspberrypi
Last synced: 5 months ago
JSON representation
Raster print package for Brother P-Touch label printers
- Host: GitHub
- URL: https://github.com/masatomizuta/py-brotherlabel
- Owner: masatomizuta
- License: gpl-3.0
- Created: 2018-11-08T07:06:08.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-05-08T17:02:56.000Z (about 1 year ago)
- Last Synced: 2025-05-08T18:22:17.831Z (about 1 year ago)
- Topics: brother, label, p-touch, pt-p900, pt-p900w, pt-p950nw, raspberrypi
- Language: Python
- Homepage:
- Size: 28.3 KB
- Stars: 14
- Watchers: 4
- Forks: 9
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# py-brotherlabel
py-brotherlabel is a Python package to control Brother P-Touch label printers in raster printing mode.
Intended to use on a Raspberry Pi board.
## Compatible Printers
- PT-P900
- PT-P900W
- PT-P950NW
## Usage
1. Connect the printer to the Raspberry Pi via USB cable and turn on the pritner.
2. Run command `lsusb`. The device ID will be listed along with the company name **Brother**.
```
Bus 001 Device 004: ID 04f9:2086 Brother Industries, Ltd
```
3. See `example_usb.py`. Pass the device ID to `USBBackend` constructor.
## USB Device Permission
When pyusb shows the error `usb.core.USBError: [Errno 13] Access denied (insufficient permissions)`,
see https://www.raspberrypi.org/forums/viewtopic.php?t=186839
### 1. Create Rule
Example rule `/etc/udev/rules.d/50-usb-perms.rules` for PT-P900/P900W/P950NW:
```
SUBSYSTEM=="usb", ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="2083", GROUP="plugdev", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="2085", GROUP="plugdev", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="2086", GROUP="plugdev", MODE="0666"
```
### 2. Reload Rule
```
sudo udevadm control --reload; sudo udevadm trigger
```
## Reference
- Software Developer's Manual Raster Command Reference PT-P900/P900W/P950NW
- [English](https://download.brother.com/welcome/docp100407/cv_ptp900_eng_raster_102.pdf)
- [Japanese](https://download.brother.com/welcome/docp100407/cv_ptp900_jpn_raster_102.pdf)