song940/node-escpos

Can not find printer (vps) ubuntu 20.04

OussJouh opened this issue · 3 comments

Hey,
i have a printer connected using usb and ethernet
in localhost everything works good i can print using USB port (escpos-usb) also using ethernet (escpos-network)
after deploying my app to a vps ubuntu 20.04
my printer couldn't be found, USB.findPrinter() return empty array
knowing that i have installed sudo apt-get install build-essential libudev-dev as it is required
after checking connected usb devices in server using lsusb it doesn't return the connected usb printer

the module escpos-usb works if you run code to which your computer is connected locally.
You cannot perform a print command via usb if the device is not detected in the system manager on the specified device

if my guess is right, your connected device is on another device.

as an alternative, you can use the escpos-network method by forwarding ip and some other things so that your printer can be accessed from outside the network using public ip and DDNS system