This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Pipe status default values

Hello,

After I connect my iPhone with a 8001 nordic chip without opening the characteristic I receive a pipe status event which says that the pipe is opened. This is totally wrong because the application is closed.

Why does this happened? The pipes should be closed after a connect, right?

  • Are you using pairing/bonding in your application ? If the application is paired then the state of the Characteristic i.e. subscribed or open is remembered so when you connect for the first time the pipe is closed, after you subscribe to the Characteristic from the phone (i.e. Start Notify for example), the pipe is opened. The state of the Pipe is remembered by the nRF8001 if the devices were paired and on subsequent re-connects the pipe will directly go to open state as soon as the connection is done and the pairing verified.

    If your application is not using pairing, then you are correct, that the pipes are expected to be closed on every connection.

    Edit: When pairing is used on the iOS device, the connection is most likely established from the iOS framework, while the app may or may not be running. Ideally the application should send some data to signal the peer device that it has started running.

    However if you are using a HID keyboard application, you may need to add additional custom Services to send data from a app as the iOS will not allow access to the HID Service on the device from the app.

  • I'm using bonding, yes. How can I determine if the application is running if the pipe is opened always even if the application is closed?

Related