I want to use the p910nd application, as is it lightweight and works really well on my raspberry pi using arch linux.
I would like to move to using Ubuntu Core, with p910nd packaged as a snap.
Is this possible?
I want to use the p910nd application, as is it lightweight and works really well on my raspberry pi using arch linux.
I would like to move to using Ubuntu Core, with p910nd packaged as a snap.
Is this possible?
it is in the edge channel now, and still untested …
if you could try it on a core device with usb printer attached and give feedback here, i can move it to the stable channel:
snap install --edge p910nd-ogra
snap connect p910nd-ogra:raw-usb
should be sufficient to get it working …
Hello
I have loaded it onto a raspberry pi running core18.
I have loaded the p910nd-ogra snap as listed above.
I have connected my Dell1250c printer (in the same way as it is currently connected to my Archlinux rpi).
Attempting to print does not produce any pages.
Is there any debug i could run to test?
Thanks
I have also tried this command:
snap set p910nd-ogra device="/dev/usb/lp0"
But it is still not printing
did you connect the iterface ?
snap connect p910nd-ogra:raw-usb
also … you might need to append “usbcore.autosuspend=0” to the end of the line of /boot/uboot/cmdline.txt (and reboot) to make sure the usb port does not suspend all the time …
i have connected the interface:
snap connections p910nd-ogra
Interface Plug Slot Notes
network p910nd-ogra:network :network -
network-bind p910nd-ogra:network-bind :network-bind -
raw-usb p910nd-ogra:raw-usb :raw-usb manual
I have updated the cmdline.txt file as well.
It still does not print.
The rpi is listening on port 9100, and there is a device on /dev/usb/lp0
I have reinstalled the application with --devmode, and it then prints, so there is something not quite right with permissions.
thanks, that helps a lot, tomorrow i should have access to printer to try to reproduce … meanwhile, if you re-install without --devmode does:
sudo journalctl | grep p910nd | grep DENIED
return any apparmor denials ?
i wonder if
https://github.com/snapcore/snapd/pull/8329
has simply not landed in the stable channel yet …
i’ve reinstalled, but still no printing.
does not show any results.
well, if it works in devmode it clearly shows that the app itself got built fine … i’ll take a deeper look myself once i have access to a printer to play with.
okay … i did some research today (and also added some fixes to the snap in the store) …
it seems https://github.com/snapcore/snapd/pull/8329 is not enough to grant access to /dev/usb/lp* there are apparently further changes to snapd needed to allow udev tagging of that device.
btw, the snap also ships a copy of the binary that can be run by hand to get better debug info:
ogra@localhost:~$ snap stop p910nd-ogra
Stopped.
ogra@localhost:~$ sudo p910nd-ogra -d -b -f /dev/usb/lp0
Connection from 192.168.2.48 port 34074 accepted
/dev/usb/lp0: Operation not permitted
/dev/usb/lp0: Operation not permitted, will try opening later
...
i’ll try to work with the snapd team to get the missing bits added to snapd, then it should just work …
any updates on this?
I have tested again today, but am still getting the same issues.
Is there anything else i can provide to help?
udevadm info /dev/usb/lp0
P: /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/usbmisc/lp0
N: usb/lp0
E: DEVNAME=/dev/usb/lp0
E: DEVPATH=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/usbmisc/lp0
E: MAJOR=180
E: MINOR=0
E: SUBSYSTEM=usbmisc
E: USEC_INITIALIZED=244418677
E: net.ifnames=0
nope, we’ll need to wait for snapd to land the interface changes (i notified @jdstrand and i know he made a note about it, but i have no idea where on the TODO list it resides) … meanwhile you can indeed always install it in --devmode
Ooops, i totally forgot to notify here, access to /dev/usb/lpX
has landed a while ago in the raw-usb interface.
The p910nd-ogra
snap should technically work now (I had no opportunity to test it yet but would indeed appreciate feedback)