NimBLE-Arduino icon indicating copy to clipboard operation
NimBLE-Arduino copied to clipboard

Connecting to same device as both client & server for ANCS

Open mathcampbell opened this issue 1 year ago • 1 comments

hey there; I'm trying to implement an ANCS (Apple Notification Centre Service) using NimBLE - I'm having real trouble though because it needs you to make a server on your device, solicit the UUID for ANCS, connect the iOS device ("phone" to save me typing device constantly) as a client, authenticate etc, then create a client and connect the phone as a server, at the same time.

I have built my code virtually mirroring an implementation of ANCS for arduino built on bluedroid, but as soon as I try to connect the client it spits out "E NimBLEClient: A connection to xx:xx:xx:xx:xx:xx already exists" (and there isn't a client connection; it's the NimBLEServer connection to the phone). I know the hardware can manage it etc; anyone care to help me out where I'm going wrong?

mathcampbell avatar Aug 27 '24 20:08 mathcampbell

Hi, the master branch has added this capability by creating a client and then assigning the connection handle to it. See commit: 6db0368

h2zero avatar Aug 29 '24 23:08 h2zero

@mathcampbell A new PR #774 was opened to resolve this if you would like to test it. All feedback is greatly appreciated!

h2zero avatar Dec 02 '24 01:12 h2zero