Posts tagged linux

Brother P-touch QL570 on Raspberry Pi

3

I just wanted to use a Brother P-touch QL570 printer on a Raspberry Pi that is used as “Desktop PC” replacement for web-based applications.

Here is how to setup the printer:

1. connect the printer to power and to the PI (via USB)

2. install cups and the printer driver on the pi:
sudo apt-get install cups printer-driver-ptouch

3. set up user rights:
sudo usermod -aG lpadmin pi
This steps enables you to access cups administration pages in the next step

4. install the printer in cups:
– open a browser and go to http://localhost:631
– when asked for a password use user “pi” and password “raspberry”
– add a new printer, select the QL570 which is locally connected
– use the driver for QL550 when asked for the driver you want to use

5. finish – enjoy printing

Distinguishing between different FTDI devices

0

Just a short note for myself and everybody who will find this via google 😉

At work I needed to distinguish between five tty devices in linux, which in this case were almost identical FTDI to TTL UART adapters.

I thought of using udev rules for it and give each one a specific name in the file system based on the FTDI device id/serial number. Fortunately I found an easier solution: you can access the device not via /dev/ttyUSB0 through /dev/ttyUSB4 but via /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AD023MTX-if00-port0, which is a symbolic link to the corresponding /dev/ttyUSB*.

To match the tty device to the physical device I needed to collect all serial numbers of the adapters. In the above example this is AD023MTX. I found this serial number out via executing udevadm info –name=/dev/ttyUSB0 –attribute-walk, where you need to look for a line beginning with ATTRS{serial}.

Go to Top