This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SimpleBLECentral Connect to Multi SimpleBLEPeripheral devices

Other Parts Discussed in Thread: CC2650

Dear TI Engineers:

I want to make SimpleBLECentral Connect to Multi SimpleBLEPeripheral on CC2650 devices,How can i do?Is there a example about this? thank you very much

  • Hi,

    There isn't an example for this per se. But all you have to do is call GAPCentralRole_EstablishLink() again towards another slave device and you will connect to it. You will get a new event to for example SimpleBLECentral_processRoleEvent with the case GAP_LINK_ESTABLISHED_EVENT, but the value in the status message's pEvent->linkCmpl.connectionHandle will be different from the first connection, usually the first one is 0x0000, number two is 0x0001 etc.

    There is a multi-role example at processors.wiki.ti.com/.../Cc2640_MultiRole_Demo that you could look to for inspiration, but this goes a step further.

    Best regards,
    Aslak
  • I have achieved this successfully, I actually used this example from the CC254x

    http://processors.wiki.ti.com/index.php/SimpleBLECentral_Connect_to_Multi_SimpleBLEPeripheral_devices

    as a guide in what I should change on my CC2650 project (of course they do not use the same stack so there are differences but if you go through the provided code you can figure out what to change). I basically created an array of connection handles and an array of char handles. Then I create connection to first peripheral, find its char handle, then create second connection to other peripheral, find its char handle, etc.

    good luck.

  • Thanks very much,Can you share the code for me?
  • How many connections can be made based on CC2650. Thank you very much
  • There are many changes to be made in simpleBLEcentral which I have modified for my own purposes heavily already so pasting wouldn't be very easy. The best way is to download the code in the link I provided and do a side by side comparison with the CC2650 simpleBLEcentral so you can see what you need to change. I promise its not too difficult.

    As for the number of peripherals, I've gotten 3 successfully, but I'm not sure how many beyond that are possible as it requires resources for each connection. Someone at TI might be able to provide that info.

  • OK Thank you very much for your help!