The module that this project uses to communicate to printers - escpos-python - supports USB, Serial and Network connections to printers. Although this project uses USB connections by default, it is very easy to set it up to use a different connection type. Referring to this page for the escpos-python module documentation will help you with this: https://python-escpos.readthedocs.io/en/latest/user/usage.html (you can navigate to the section for the type of connection you are using.)
If this guidance is not enough and you're still not sure what to do, the documentation above goes into more depth, simply replace each printer = Usb()
with the correct details for your prinnter
- Find your devices vendor and product ids using
lsusb
- Edit 2 variables at the top of the file
USB_vendor
, andUSB_product
. If lsusb says the device is1234:5678
, thenUSB_vendor
is1234
andUSB_product
is5678