Good morning, we are doing an app in ionic where you can print labels on a ZQ510 printer. On the Android side I have no problems since the tag comes out correctly, but on the iPhone side no. We were able to make the iPhone find the printer by BlueToothLE, we do a connection test and it is successful, but it does not print. The printer is not receiving the information.
These are the uuid services we are using: #define HM10_SERVICE_UUID "FE79" // -> by putting this key we were able to make the mobile connect to the printer.
#define HM10_CHAR_TX_UUID "38EB4A82-C570-11E3-9507-0002A5D5C51B" #define HM10_CHAR_RX_UUID "38EB4A81-C570-11E3-9507-0002A5D5C51B"
We believe that these last two are not letting us print.
If someone has the correct TX_UUID and RX_UUID, we would appreciate it if you could pass it to us.
4 Replies
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 =
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 :
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.
I can manage to connect using "FE79" that you mention but not print.
Hi, did you manage to sort this?
#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 got my defines setup as above and I have a connection but I can't print. Android works without issues.
Thanks.
The TX_UUID and RX_UUID are correct. Please note that the TX_UUID and RX_UUID characteristics are under the parser service (with UUID of 38EB4A80-C570-11E3-9507-0002A5D5C51B). This parser service cannot be detected until the BLE is connected. Here is a reference at GitHub - ZebraPrinterBLEDemo for iOS.