6 Replies Latest reply on May 22, 2018 8:39 PM by MUHAMMED SALIH T A

    IOS BLE Print (Printer disconnects)

    MUHAMMED SALIH T A

      I am using BLE print to connect and print with a zebra printer (zpl)

       

      my work flow is as follows
      Step 1. Scan printer,
      Step 2. Connect to the selected printer,

      Step 3. discoverServices

      Step 4. discoverCharacteristics,

      Step 5.  peripheral writeValue for Characteristic discovered

      Step 6 wait to complete and disconnect

      And this seems work fine, but in some devices after lots of successful prints just randomly loses connection, (ie the printer is not connecting to the iOS )

       

      is there any solution for this ?

        • Re: IOS BLE Print (Printer disconnects)
          Steven Si

          Does this problem occur while printing? Or do you mean that the printer was not detected during the scan? If the printer was not showing in scan, it could be the printer is connected to a different device, as it stops broadcasting once it's connected.

           

          If the disconnect occurs during the print, then we can use the following callback to monitor the disconnection and do remedy.

          - (void)centralManager:(CBCentralManager *)central didDisconnectPeripheral:(CBPeripheral *)peripheral error:(NSError *)error
          
          1 of 1 people found this helpful
            • Re: IOS BLE Print (Printer disconnects)
              MUHAMMED SALIH T A

              Thanks, Steven

               

                   Actually, its scanning and discovered the device And trying to connect, but it does not get connected
              Once this happened, when we check the IOS Bluetooth list, it shows the same device twice. One as connected and one as not connected,
              Then we have to forget the device, turn on and off again(both printer and ios Bluetooth) 

               

               


              Any Idea ?

                • Re: IOS BLE Print (Printer disconnects)
                  Steven Si

                  The Bluetooth Classic and Low Energy (BLE) work independently. In iOS, if BLE is connected, the device will show up in the Bluetooth settings. When BLE is disconnected, the device will disappear from the Bluetooth settings.

                  For example, the upper on with an icon is the Bluetooth Classic. The lower one is BLE. If you see the BLE is connected in settings, it means the BLE device is already connected to your iOS througn an app. In that case, you cannot scan and connect to it through another app. The BLE will not show in the settings if is not connected or disconnected. Hope this helps.

                  1 of 1 people found this helpful
                    • Re: IOS BLE Print (Printer disconnects)
                      MUHAMMED SALIH T A

                      Hi Stephen

                       

                      The process we have in place at the minute is as follows:

                       

                      1. connect zebra zq520 to ipad via bluetooth - secure pairing code used

                      2. within our app we have a select printer function which allows us to ensure that the app only prints to correct printer (this was an issue at the start)

                      3. when we click print (for the first time) it then asks us to pair again by entering a pairing code

                      3. we then proceed to use our app and it prints many receipts

                      4. then randomly the app/ipad loses connection with the printer

                      5. the process we must go through each time then is to forget device in ipad bluetooth screen (2 devices show here one as connected and one as not connected). shut down the printer and power up and reconnect all over again

                       

                      My questions are:

                      1. should we be asked to pair twice ?

                      2. why are we seeing the device twice in the bluetooth screen ?

                      3. do we need to connect through ipad bluetooth or would it be better connecting directly from the app ?

                      4. any suggestions as to why we losing connection ?

                       

                      Any other suggestions / info you have would be greatly appreciated