i have attached a thermal printer to my raspberry...i used usb port and found idproduct and idvendor and inputendpoint and outputendpoint by
lsusb -D....
i used python-printer-escpos module
my code is :
from escpos.connections import getUSBPrinter
printer = getUSBPrinter()(idVendor=0x0483,
idProduct=0x5720,
inputEndPoint=0x81,
outputEndPoint=0x01) # Create the printer object with the connection params
printer.text("Hello World")
printer.lf()
for setting up it...but i get the following error
Traceback (most recent call last):
File "/home/pi/start/printerr/poss/NEW/py-print-escposs.py", line 8, in <module>
outputEndPoint=0x01) # Create the printer object with the connection params
File "/usr/local/lib/python3.4/dist-packages/escpos/connections.py", line 87, in __init__
self.__open()
File "/usr/local/lib/python3.4/dist-packages/escpos/connections.py", line 106, in __open
if self._device.is_kernel_driver_active(0):
File "/usr/local/lib/python3.4/dist-packages/usb/core.py", line 1061, in is_kernel_driver_active
self._ctx.managed_open()
File "/usr/local/lib/python3.4/dist-packages/usb/core.py", line 102, in wrapper
return f(self, *args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/usb/core.py", line 120, in managed_open
self.handle = self.backend.open_device(self.dev)
File "/usr/local/lib/python3.4/dist-packages/usb/backend/libusb1.py", line 786, in open_device
return _DeviceHandle(dev)
File "/usr/local/lib/python3.4/dist-packages/usb/backend/libusb1.py", line 643, in __init__
_check(_lib.libusb_open(self.devid, byref(self.handle)))
File "/usr/local/lib/python3.4/dist-packages/usb/backend/libusb1.py", line 595, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 13] [b]Access denied[/b] (insufficient permissions)
what is the problem?