Hi, in our application on a custom board we have an SPP server and we would like to allow two SPP clients to connect at the same time.
Starting from the examples (Bluetopia stack 5.1.1.1), we have successfully implemented the SPP server for a single connection.
For now, we open two server ports by calling the OpenServer() twice (with two different ServerPort numbers). Then the first client connects correctly and opens a connection up to the SPP layer. After this, the second client seems to establish a connection but no more SPP port becames available.
I'm pasting some stack log:
------- first client requests to connect -------------------------
atLinkKeyRequest: 0x1237800CF82B
GAP_Authentication_Response() Success.
atPINCodeRequest: 0x1237800CF82B
Respond with the command: PINCodeResponse
PIN Code Response: 000000000
atLinkKeyCreation: 0x1237800CF82B
Link Key: 0x94DE7901CA9F44C75E9C130D7D7205B8
Link Key NOT Stored
SPP Open Indication, ID: 0x0001, Board: 0x1237800CF82B.
SPP Port Status Indication: 0x0001, Status: 0x000B, Break Status: 0x0000, Length: 0x0000.
--------------- first connection accepted and working correctly ------------------
--------------- second client requests to connect -------------------
atIOCapabilityResponse: 0xC0B6F9F9B7DE
Remote Capabilities: Display Yes/No, MITM
atIOCapabilityRequest: 0xC0B6F9F9B7DE
GAP_Authentication_Response() Success.
Auto Accepting: 514050
GAP_Authentication_Response() Success.
Secure Simple Pairing Complete
atLinkKeyCreation: 0xC0B6F9F9B7DE
Link Key: 0xFC49601DBE3A19BD4A1734D157CD9321
Link Key NOT Stored
------ second connection doesn't get the SPP Open Indication ---------
What is the correct approach to implement support for multiple clients?
Is it correct to use the OpenServer() twice? Or the server is one and the in the SPP callback we have to distinguish the data from the two clients by using the BDADDR or other fields?
thanks






