You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I solved problem by using native android BT lib and his socket to write bytes directly to socket and used Epson class as helper to create commands and payload data to write on opened socket.
I'm getting exception like bellow when I want to use SerialPrinter class object.
Issue is present on both .net 6 and .net 7 based MAUI Android projects.
runtime.native.System.IO.Ports package is present in dependencies (give a shot and update to version 7.0.0 but same issue).
Any way is it possible to use this lib on MAUI Android based devices and how? e.g. for printing on BT POS printer device?
PrinterConnect(printerName, printerBTAddress);
private bool PrinterConnect(string printerName, string printerBTAddress)
{
`
Exception
[0:] ---> PrinterConnect() exception: System.DllNotFoundException: libSystem.IO.Ports.Native
at System.IO.Ports.SafeSerialDeviceHandle.Open(String portName)
at System.IO.Ports.SerialStream..ctor(String portName, Int32 baudRate, Parity parity, Int32 dataBits, StopBits stopBits, Int32 readTimeout, Int32 writeTimeout, Handshake handshake, Boolean dtrEnable, Boolean rtsEnable, Boolean discardNull, Byte parityReplace)
at System.IO.Ports.SerialPort.Open()
at ESCPOS_NET.SerialPrinter..ctor(String portName, Int32 baudRate)
at ESCPOSMauiTestApp.MainPage.PrinterConnect(String printerName, String printerBTAddress) in E:\projects\testing\dotnet\MAUI\ESCPOSMauiTestApp\ESCPOSMauiTestApp\MainPage.xaml.cs:line 29
The text was updated successfully, but these errors were encountered: