Open Boolean2023 opened 1 month ago
with the embeded "usb" package, like this ?
`` usb.getDeviceList().filter((device) => { // has interfaces
return device && device.configDescriptor && device.configDescriptor.interfaces && device.configDescriptor.interfaces.length;
}).map((device) => { // formate
const interfaces = [];
device.configDescriptor.interfaces.forEach((its) => {
its.forEach((it) => {
interfaces.push({
"id": it.bInterfaceNumber,
"type": it.bInterfaceClass
});
});
});
return {
"bus": device.busNumber,
"port": device.deviceAddress,
"vid": device.deviceDescriptor.idVendor,
"pid": device.deviceDescriptor.idProduct,
"interfaces": interfaces
};
}).filter((device) => { // only printers
return !!device.interfaces.find((it) => {
return 7 === it.type;
});
}); ``
can i get Printer List , which is Connect My Lan Network ? is this Possible
You may try to scan every IP on your network with an escpos ping and check which one is responding, I guess ?
OK Thanks
Description
is there a way to retrieve the list of printers paired on the machine with this package? if so, how do I get there?
Additional Information
Printers list node-escpos