Overview

This guide walks through configuring a Raspberry Pi 3 as a CUPS print server for a Phomemo PM-241-BT thermal label printer that works correctly with:

  • Windows desktops/laptops
  • Pirate Ship
  • USPS
  • UPS
  • FedEx
  • 4x6 thermal labels
  • Barcode printing

This setup specifically resolves issues where:

  • Labels print blank
  • Bottom barcode does not print
  • Print jobs get stuck
  • “Filter failed” appears in CUPS
  • Barcodes print only partially
  • Thermal labels print incorrectly from Pirate Ship

The final working solution uses:

  • Raspberry Pi OS Lite (32-bit)
  • Native Phomemo ARMHF Linux driver
  • CUPS
  • IPP printing
  • Windows Phomemo driver

Final Working Architecture

Windows PCs

IPP Printing

CUPS on Raspberry Pi
YOUR_IP_ADDRESS

USB

Phomemo PM-241-BT


Hardware Used

  • Raspberry Pi 3
  • MicroSD card
  • Phomemo PM-241-BT thermal printer
  • Windows 11 clients

IMPORTANT LESSONS LEARNED

The following configurations DID NOT work reliably:

  • Raspberry Pi OS 64-bit
  • aarch64 raster filter
  • Samba printer sharing
  • RAW print queues
  • Generic/Text drivers
  • Zebra emulation
  • SMB printing

The final stable solution used:

  • Raspberry Pi OS Lite 32-bit
  • ARMHF raster filter
  • IPP printing only

Step 1 – Install Raspberry Pi OS Lite (32-bit)

Download Raspberry Pi Imager:

https://www.raspberrypi.com/software

Use:

Raspberry Pi OS Lite (32-bit)

During imaging:

  • Set hostname:

rpi-printsvr

  • Enable SSH
  • Configure username/password

Do NOT:

  • install desktop environment
  • install recommended packages

Step 2 – Initial Update

SSH into the Pi:

ssh pi@YOUR_IP_ADDRESS

Update the system:

sudo apt update && sudo apt full-upgrade -y
sudo reboot


Step 3 – Disable IPv6

Create sysctl override:

sudo tee /etc/sysctl.d/99-disable-ipv6.conf > /dev/null <<'EOF'
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
EOF

Apply:

sudo sysctl --system

Verify:

ip a

You should not see inet6 entries.


Step 4 – Install Required Packages

Install only the required packages:

sudo apt install -y \
cups \
samba \
smbclient \
avahi-daemon \
unzip \
wget

Add print permissions:

sudo usermod -aG lpadmin pi
sudo usermod -aG sambashare pi

Reboot:

sudo reboot


Step 5 – Configure CUPS

Backup original config:

sudo cp /etc/cups/cupsd.conf /etc/cups/cupsd.conf.bak

Replace with:

sudo tee /etc/cups/cupsd.conf > /dev/null <<'EOF'
LogLevel warn

Listen 0.0.0.0:631
Listen /run/cups/cups.sock

Browsing On
BrowseLocalProtocols dnssd
DefaultAuthType Basic
WebInterface Yes
DefaultShared Yes

<Location />
Allow all
</Location>

<Location /admin>
AuthType Default
Require valid-user
Allow all
</Location>

<Location /admin/conf>
AuthType Default
Require valid-user
Allow all
</Location>

<Location /printers>
Allow all
</Location>

<Location /jobs>
Allow all
</Location>
EOF

Validate configuration:

sudo cupsd -t

Restart CUPS:

sudo systemctl restart cups
sudo systemctl enable cups


Step 6 – Download Phomemo Linux Driver

Download the driver package:

https://oss.qu-in.ltd/Labelife/Label_Printer_Driver_Linux.zip

Commands:

cd /tmp

wget https://oss.qu-in.ltd/Labelife/Label_Printer_Driver_Linux.zip

rm -rf /tmp/labeldriver
mkdir -p /tmp/labeldriver

unzip Label_Printer_Driver_Linux.zip -d /tmp/labeldriver

cd /tmp/labeldriver

tar -xzf LabelPrinter-2.3.1.001.tar.gz


Step 7 – Install ARMHF Raster Filter

IMPORTANT:

Use the ARMHF filter, NOT the aarch64 filter.

Copy filter:

sudo cp \
/tmp/labeldriver/LabelPrinter-2.3.1.001/armhf/rastertolabeltspl \
/usr/lib/cups/filter/

Make executable:

sudo chmod +x /usr/lib/cups/filter/rastertolabeltspl

Verify:

file /usr/lib/cups/filter/rastertolabeltspl

Expected:

ELF 32-bit LSB executable, ARM


Step 8 – Install Missing CUPS Dependency

This was the critical fix.

Without this package:

  • CUPS test pages fail
  • “Filter failed” appears
  • labels do not print correctly

Install:

sudo apt install -y libcupsimage2t64

Verify dependency:

ldd /usr/lib/cups/filter/rastertolabeltspl | grep cupsimage

Expected:

libcupsimage.so.2 => /lib/arm-linux-gnueabihf/libcupsimage.so.2


Step 9 – Install PPD

Create model directory:

sudo mkdir -p /usr/share/cups/model/phomemo

Copy PPD:

sudo cp \
"/tmp/labeldriver/LabelPrinter-2.3.1.001/ppds/PM-241-BT.ppd" \
/usr/share/cups/model/phomemo/


Step 10 – Connect Printer

Connect:

  • USB cable
  • power on printer

Verify detection:

lsusb

Expected:

PM PM241-BT


Step 11 – Create Printer Queue

Create printer:

sudo lpadmin \
-p PM241 \
-E \
-v 'usb:///PM-241-BT?serial=Q332E4652470017' \
-P /usr/share/cups/model/phomemo/PM-241-BT.ppd \
-o printer-is-shared=true

Set default printer:

sudo lpadmin -d PM241

Configure 4x6 defaults:

sudo lpadmin -p PM241 \
-o media=w288h432 \
-o PageSize=w288h432 \
-o fit-to-page=true \
-o scaling=100

Restart CUPS:

sudo systemctl restart cups

Verify:

lpstat -t


Step 12 – Test from CUPS

Open:

http://YOUR_IP_ADDRESS:631

Navigate:

  • Printers
  • PM241
  • Print Test Page

If the test page prints:

  • the Linux filter is functioning correctly

Step 13 – Configure Samba (Optional Browsing Only)

Backup Samba config:

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak

Replace with:

sudo tee /etc/samba/smb.conf > /dev/null <<'EOF'
[global]
workgroup = WORKGROUP
server string = Raspberry Pi Print Server
security = user
map to guest = Bad User

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
EOF

Restart Samba:

sudo systemctl restart smbd
sudo systemctl enable smbd

NOTE:

  • Do NOT use SMB printer sharing for actual printing.
  • Use IPP printing only.

Step 14 – Install Printer on Windows

Open:

Settings
→ Printers & scanners
→ Add Printer
→ The printer I want isn't listed

Choose:

Select a shared printer by name

Enter:

http://YOUR_IP_ADDRESS:631/printers/PM241

When prompted for credentials:

Username:

pi

Password:

  • your Raspberry Pi password

Check:

  • Remember my credentials

Step 15 – Windows Driver Selection

Use:

Phomemo PM-246S-BT

This driver worked correctly with:

  • Pirate Ship
  • shipping labels
  • barcodes

Step 16 – Configure Pirate Ship

Inside Pirate Ship:

Printer Type:

Thermal Printer

Label Size:

4x6

Scaling:

100%

Disable:

  • Fit to page
  • Auto rotate

Final Result

This configuration successfully provides:

  • Working barcode printing
  • Working Pirate Ship labels
  • Stable Windows printing
  • Raspberry Pi CUPS print server
  • PM-241-BT support
  • Reliable 4x6 thermal printing

Root Cause Summary

The original failures were caused by:

  1. Raspberry Pi OS 64-bit
  2. Unstable aarch64 filter behavior
  3. Missing:

libcupsimage.so.2

dependency

Switching to:

  • 32-bit Raspberry Pi OS
  • ARMHF filter
  • libcupsimage2t64

resolved the issue completely.


Final Working Versions

ComponentVersion
Raspberry Pi OSLite 32-bit
CUPS2.4.10
PrinterPM-241-BT
Driver FilterARMHF rastertolabeltspl
Windows DriverPM-246S-BT
Connection MethodIPP
IP AddressYOUR_IP_ADDRESS