don / BluetoothSerial

Cordova (PhoneGap) Plugin for Serial Communication over Bluetooth
Other
1.07k stars 670 forks source link

Zebra iOS Printer? #423

Open RZR666 opened 4 years ago

RZR666 commented 4 years ago

Hi,

Has anyone successfully used this to connect to a zebra printer on iOS?

#define ZPRINTER_SERV_ID_FOR_CONNECTION         "FE79"
#define ZPRINTER_SERVICE_UUID                   "38EB4A80-C570-11E3-9507-0002A5D5C51B"
#define WRITE_TO_ZPRINTER_CHARACTERISTIC_UUID   "38EB4A82-C570-11E3-9507-0002A5D5C51B"
#define READ_FROM_ZPRINTER_CHARACTERISTIC_UUID  "38EB4A81-C570-11E3-9507-0002A5D5C51B"

I've used the above defines and I've got it connecting but it won't print, no error, just logs write and nothing happens.

Thanks

RZR666 commented 4 years ago
13:31:30.406896+0100 PAL[604:103781] Scanning for BLE Peripherals
13:31:30.408684+0100 PAL[604:103781] scanForPeripheralsWithServices
13:31:31.397547+0100 PAL[604:103781] didDiscoverPeripheral
13:31:33.409219+0100 PAL[604:103781] Stopped Scanning
13:31:33.409550+0100 PAL[604:103781] Known peripherals : 1
13:31:33.409785+0100 PAL[604:103781] List of currently known peripherals :
13:31:33.410042+0100 PAL[604:103781] 0  |  D3B6B57C-2143-B587-7F36-971E92BBCBD5
13:31:33.410278+0100 PAL[604:103781] ------------------------------------
13:31:33.410471+0100 PAL[604:103781] Peripheral Info :
13:31:33.410845+0100 PAL[604:103781] UUID : D3B6B57C-2143-B587-7F36-971E92BBCBD5
13:31:33.414167+0100 PAL[604:103781] Name : XXZFJ194705434
13:31:33.414489+0100 PAL[604:103781] -------------------------------------
13:31:35.613750+0100 PAL[604:103781] connect
13:31:35.614172+0100 PAL[604:103781] Connecting to peripheral with UUID : D3B6B57C-2143-B587-7F36-971E92BBCBD5
13:31:36.376349+0100 PAL[604:103781] Connected to D3B6B57C-2143-B587-7F36-971E92BBCBD5 successful
13:31:36.677439+0100 PAL[604:103781] SERVICE UUID = Device Information
13:31:36.677932+0100 PAL[604:103781] SERVICE UUID = 38EB4A80-C570-11E3-9507-0002A5D5C51B
13:31:36.678210+0100 PAL[604:103781] Zebra Bluetooth
13:31:36.742230+0100 PAL[604:103781] Ignore this Zebra Info Service.
13:31:36.781032+0100 PAL[604:103781] 4 Characteristics for service with UUID : 38EB4A80-C570-11E3-9507-0002A5D5C51B found
13:31:36.782281+0100 PAL[604:103781] Found Read characteristic 38EB4A81-C570-11E3-9507-0002A5D5C51B
13:31:36.783548+0100 PAL[604:103781] Found Write characteristic 38EB4A82-C570-11E3-9507-0002A5D5C51B
13:31:36.783870+0100 PAL[604:103781] bleDidConnect
13:31:36.784591+0100 PAL[604:103781] IS CONNECTED
13:32:22.187487+0100 PAL[604:103781] Write with response
13:32:22.189639+0100 PAL[604:103781] RESULT = <CDVPluginResult: 0x280b16fa0>
13:32:22.189998+0100 PAL[604:103781] THREAD WARNING: ['BluetoothSerial'] took '34.939941' ms. Plugin should use a background thread.
13:32:22.421588+0100 PAL[604:103781] characteristic value : <CBCharacteristic: 0x28217f180, UUID = 38EB4A82-C570-11E3-9507-0002A5D5C51B, properties = 0x8, value = (null), notifying = NO>
13:32:22.421831+0100 PAL[604:103781] Did write characteristic value : (null) with ID 38EB4A82-C570-11E3-9507-0002A5D5C51B
13:32:22.422038+0100 PAL[604:103781] With error: Unknown error.