Closed YahalomsGuy closed 2 years ago
Found the solution, partly. I have changed the working mode of my printer to ESC/POS (aka Reciept Mode) in the printer nad now it prints. For whom it may concern, if your Xprinter 365B does not have dip switch in the back to change mode, follow the below simple process to change the printing mode from Label to Reciept and vise versa.
Note: In printing mode there is no gap detection and no Form Feed , just a single row feed.
Closing the issue
I have downloaded the package, added all the Bluetooth permissions in AndroidManifest (sdk 30)
I have managed to get the app running (on android device - an old Samsung S7), I get the list of available Bluetooth devices I have managed to connect to the printer (Xprinter XP-365B) - I get a Beep notification from the printer when connected, and the console shows connected: true.
but when I press the PRINT_TEST button nothing happens. I get the below message in the console.
close() this: android.bluetooth.BluetoothSocket@d68f4c8, channel: 1, mSocketIS: android.net.LocalSocketImpl$SocketInputStream@af55961, mSocketOS: android.net.LocalSocketImpl$SocketOutputStream@db8cc86 mSocket: null, mSocketState: CLOSED
I haven't found anything regarding the printer's initialization like codepages, width etc. Isn't it needed?
I know that the printer is working, since I have printed with few native apps (download from stores) on several Android devices and on iPhone
here is a gist of main.dart, gradle and Manifest of the project https://gist.github.com/YahalomsGuy/484f2a0d687ef47c0a9c2f5c4aad1a20
Any help/direction will be greatly appreciated.