{"id":17241840,"url":"https://github.com/maciekmm/printer-rpi-image","last_synced_at":"2026-04-19T17:01:23.453Z","repository":{"id":79399099,"uuid":"474729825","full_name":"maciekmm/printer-rpi-image","owner":"maciekmm","description":"Packer config to build RaspiOS image with cups and RAW printers","archived":false,"fork":false,"pushed_at":"2022-04-02T15:55:22.000Z","size":233,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-18T18:02:21.287Z","etag":null,"topics":["arm","cups","packer","raspberrypi"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maciekmm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-27T18:51:28.000Z","updated_at":"2024-09-13T09:54:22.000Z","dependencies_parsed_at":"2023-03-09T08:30:33.317Z","dependency_job_id":null,"html_url":"https://github.com/maciekmm/printer-rpi-image","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maciekmm/printer-rpi-image","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maciekmm%2Fprinter-rpi-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maciekmm%2Fprinter-rpi-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maciekmm%2Fprinter-rpi-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maciekmm%2Fprinter-rpi-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maciekmm","download_url":"https://codeload.github.com/maciekmm/printer-rpi-image/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maciekmm%2Fprinter-rpi-image/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271035378,"owners_count":24688396,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arm","cups","packer","raspberrypi"],"created_at":"2024-10-15T06:11:33.111Z","updated_at":"2026-04-19T17:01:23.325Z","avatar_url":"https://github.com/maciekmm.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# USB printer over wifi\n\nThis project builds and configures an ARM RaspiOS image to share local USB printers over WiFi in RAW queue mode.\n\nMy setup consists of a [Raspberry Pi Zero](https://www.raspberrypi.com/products/raspberry-pi-zero/) and Brother DCP-1510 printer, but it should work with any USB printer.\n\n## Building, flashing and running the image\n\n![Architecture](assets/architecture.png)\n\n### Prerequisites\n\nClone this repository along with submodules:\n\n```shell\ngit clone --recurse-submodules https://github.com/maciekmm/printer-rpi-image.git \n```\n\n### Building \n\nThe build process uses [Packer](https://packer.io), [packer-plugin-arm-image](https://github.com/solo-io/packer-plugin-arm-image) and [Vagrant](https://vagrantup.com).\n\nYou will need to install `vagrant` and `virtualbox` or other compatible virtualization provider. You can also run packer directly, but I haven't tried it.\n\nIn order to build the image, run the following command. Substitute `\u003cSSID\u003e`, `\u003cWIFI_PASSWORD\u003e` `\u003cSSH_PUBLIC_KEY\u003e` with appropriate values.\n\n```shell\nWIFI_SSID=\u003cSSID\u003e WIFI_PASSWORD=\u003cPASSWORD\u003e SSH_PUBLIC_KEY=$(cat ~/.ssh/id_ed25519.pub) vagrant up\n```\n\nThis will take a while, an image should be available under `./output-raspberry_pi_os.img`.\n\n### Flashing\n\n1. Connect SD card / flash drive and find which device file in `/dev` belongs to it, e.g. via `lsblk`. You want the device, not a partition. Make sure it's unmounted as well.\n\n2. Flash the image by running `dd bs=4M if=./output-raspberry_pi_os.img of=\u003cdeviceyouhaveidentified\u003e \u0026\u0026 sync`, this might take a while. Depending on your udev rules, you might need root for this operation.\n\n### Live configuration\n\nThis step will:\n- update the system,\n- detect connected printers and configure them in RAW queue mode,\n- configure the firewall.\n\n1. Boot your ARM device and connect printers to it.\n2. Navigate to `./ansible/` folder by running `cd ./ansible`\n3. Run `live.yaml` playbook by running `ansible-playbook  -i hosts live.yaml`\n\nYou should be able to ssh into the Pi by running `ssh pi@pi-print-server.local`,  if you are unable to do so, check your router and find out which ip address the Pi got assigned. If no entry is present check your WiFi credentials.\n\nYou might also need to run `hostnamectl set-hostname pi-print-server` on the Pi after connecting to it.\n\n### Maintenance\n\nYou can periodically run the `live.yaml` playbook to keep your system up to date. You can also configure unattended updates if you fancy doing so.\n\n### Local setup\n\nAs this exposes the printer in RAW queue mode, you will need to configure the driver and the printer locally.\n\nThis is heavily dependant on the manufacturer, operating system you use and other factors.\n\n#### Linux\n\nFor Linux installations you will need `cups` and dnssd mDNS resolver. \n\nThe driver will depend on the printer manufacturer.\n\nThe printer should be automatically discovered by `cups` in `Add Printer` section.\n\n![printer list should include newly configured printers](./assets/add-printer.png)\n\nYou should choose the actual driver in this step, don't choose RAW.\n\n![choose a driver](./assets/add-printer-2.png)\n\n## FAQ\n\n### Why is RAW queue mode used? Can't we use proper drivers?\n\nWe could, but usually the ARM devices that run RaspiOS are underpowered. Many old drivers require ghostscript to process the data sent to the printer which is a computationally expensive process. Using drivers on the client side (your PC or laptop) offloads that computation to a more powerful device. If your embedded device is powerful enough you can go install appropriate drivers and configure printer to use it.\n\n### What about the scanner?\n\nI rarely use the scanner on my printer, so setting it up to be available over network doesn't have too high of a priority for me.\n\n\n## TODO\n\n- Read only file system to extend the longevity of the SD card\n- Unattended updates\n- Scanner setup","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaciekmm%2Fprinter-rpi-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaciekmm%2Fprinter-rpi-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaciekmm%2Fprinter-rpi-image/lists"}