You are reading a single comment by @jeffmer and its replies. Click here to read the full conversation.
  • I have made quite a lot of progress with this and then hit another roadblock:

    Progress: The Bangle - or actually Puck.js which I am using for testing - can connect and bond reliably to the iPhone such that the iPhone automatically reconnects when it's Bluetooth is turned off and then on again. The Puck can create the required remote service and characteristic objects and send commands to start notifications etc. I can decode the data I get back from the iPhone on messages, calls etc.

    Problem: Data is transferred by the iPhone ANCS service using notifications. Each notification message can transfer 20bytes of user data. The problem arises when the data to be transferred is greater than 20 bytes. In this situation the iPhone sends multiple notification messages. The Puck gets the correct number of characteristicvaluechanged events, however usually, for two events received consecutively,the data associated with the first event will be the data from the last notification message. In other words, each of the two events has the same data values.

    @Gordon: - I have tried increasing the minimum interval which can be set during connection, however, the iPhone can send up to four packets per interval and it is obviously doing this when the data to be transferred is greater than the MTU of 20 bytes. The soft device is clearly getting these messages as I get the right number of events, however somewhere either in the soft device or the transfer to Espruino, the data is getting lost - any suggestions as to where in the code this might be happening?

About

Avatar for jeffmer @jeffmer started