AbobosSoftware / cordova-plugin-brother-label-printer

Cordova and Capacitor plugin for Bother Label Printers
MIT License
10 stars 16 forks source link

P750W can not find!! #28

Open ashwin-dongare opened 3 years ago

ashwin-dongare commented 3 years ago

Not able to detect P750W printer using all three methods findnetwork(), findprinter() and findbluetooth()

robr2112 commented 3 years ago

For WIFI search, my best guess is that the P750W is NOT listed in the "supportedPrinterList". It's only listed in the "printerList". c.f. BrotherPrinter.m in the iOS code. I will assume you are on iOS.

Honestly, I don't understand why there are 2 printer lists, as I am not the plugin author. The code for WIFI search is initializing the list of printers to find based only on the "supported" list. So, try adding your printer model to this list and this should resolve that issue, assuming WIFI connectivity is OK. The WIFI search inside printer SDK will only return the models that are requested by the list passed in.

For Bluetooth MFi, it's required to add the MFi protocol string to the info.plist for any MFi devices to be found. Look in the Plugin.xml file and uncomment the part that includes this: "com.brother.ptcbp"

As the comments mention in Plugin.xml, you will be rejected by AppStore unless you have received your PPID. There is a process that must be followed to apply for the PPID. If you need help with this, let me know.

ashwin-dongare commented 3 years ago

Hi @robr2112 , Thanks for replying Now I connected the printer directly without using findPrinter() method But now I am getting the following error after calling printViaSDK.

Error: "Unexpected Internal System Error: IllegalArgumentException"

using printer brother P750W

this is my code let image = "isbase64Image"; //sample actually use base64 cordova.plugins.brotherPrinter.printViaSDK(base64String, (printResult) => { //var printResult = callback; console.log(printResult); },(error) => { console.log(err); });

Thank you. please help

robr2112 commented 3 years ago

Hi @ashwin-dongare, According to the plugin README file, it is necessary to call setPrinter before calling printViaSDK.