0 Replies
      Latest reply on Jan 14, 2019 7:59 AM by TomerN
      Franco Level 1 Level 1 (0 points)

        I am receiving data in UART mode from a bluetooth emiter (arduino/BlueFruit).

        i need to handle the case where the emiter is ungplug (powered off)

         

        not sure where the message will come from. I could not find it in CBCentralManager or in CBPeripheral.

        i can't be checking the state continuously.

         

        there must be some sort of StateChanged message for the peripheral somewhere, or a disconnect alert :-)

         

         

        i get in the console - and it make perfect sense.

        [CoreBluetooth] API MISUSE: <CBPeripheral: XXXX, identifier = XXXX, name = Adafruit Bluefruit LE, state = disconnected> can only accept commands while in the connected state

         

        Thank you.