lukevp / ESC-POS-.NET

Efficient, Easy to Use Thermal Printing & POS (Windows/Linux/OSX, WiFi/BT/USB/Ethernet)
MIT License
500 stars 161 forks source link

How to use embedded POS printer ? #237

Open ThomasCarltonInPerson opened 11 months ago

ThomasCarltonInPerson commented 11 months ago

Hi team,

I have a POS Terminal with an embedded printer. The printer is shown among the blutooth devices.

On the terminal, when I click device details, I get :

Device's Bluetooth address : 66:11:22:33:44:55

Does anyone know how to use the library to connect to the printer please ?

In the documentation there is :

    //USB, Bluetooth, or Serial
    //var printer = new SerialPrinter(portName: "COM5", baudRate: 115200);

But I don't have any port name to use that. I have the entire bluetooth adress ?

Thank you in advance for your help.

Cheers,

igorocampos commented 10 months ago

Hi Thomas, you can open a connection with that bluetooth port and send all bytes generated by this library directly to the port, and the printer shall print it for you.

In #51 you can find an example of how you could accomplish this. And there are other related issues attached to that as well with more use cases.