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.

CC2540 USB Dongle as a slave

Other Parts Discussed in Thread: CC2540

Hello,

I read in this forum that to make the CC2540USB dongle acting as a slave, we have to follow these steps : 

"

1) Program the CC2540USB Dongle with the HostTestRelease using the "CC2540USB Slave" Configuration

2) Detach/Attach CC2540 Dongle

3) Open BTool, Set the Port corresponding to the one your CC2540 Dongle is populating. 

4) Under Adv. Commands, GAP you will find GAP_DeviceInit, set profileRole to Peripheral and hit Send Command

5) Still in Adv. Commands, GAP you will find GAP_UpdateAdvertisingData, set adType toGAPADVERT_ADVERTISEMENT_DATA and set dataLen to 3 and hit Send Command.

6) Still in Adv. Commands, GAP you will find GAP_MakeDiscoverable, make sure that you see the available options for it (no need to make changes) and hit Send Command.

That works, just tried it. You will need to set 4-5 correct or you will get the "Not Setup Properly To Perform That Task" status message. "

the problem is with the BLE Stack 1.2, when I open the "HostTestRelease" project with IAR, I have just : CC2540USB - CC2540EM - CC2540EM SBL - CC2540USB, I don't have  "CC2540USB Slave", so what can I do to make my CC2540USB acting as a slave ??

Regards.

  • Hi Oscar,

    You can build the CC2540USB option, it contains both central and peripheral (slave) functionality.

    In the buildConfig.cfg file in the TOOLS project file you'll see that -DHOST_CONFIG=PERIPHERAL_CFG+CENTRAL_CFG specifies this.

    Best Regards

  • Hey Nick,

    thank you fo your reply, since that time, I found a way to make the USB CC2540 acting as a slave, I have post it here:

    http://e2e.ti.com/support/low_power_rf/f/538/p/161833/674669.aspx

    Today I have just one and  very important question, It is about BLE Master Slave dynamically switching...is the "DHOST_CONFIG=PERIPHERAL_CFG+CENTRAL_CFG" do this ??

    If (yes)

        How can I test it ?

    else

       Is there a way to do this ?

    Best Regards,

    Oscar  

  • Hi Oscar,

    Have a look at our wiki (www.ti.com/ble-wiki), especially on the MasterSlaveSwitch sample application. I think that it can give you a clue or two :)

    Best Regards. 

  • I want to add some customize services and characteristics in TestHostRelease hex file how can I add those charecteristics?

    Another question, there ate two buttons on cc2540 usb dongle, can you tell me what are there functionality? I want to fire some task on  the button press action, what I have to do for that?

  • Hi Jayanta,

    Have a look at NWPGATT - Network Processor GATT database example found on our wiki. I believetThe two buttons do not have any default functionality, so you can use them to what ever you want :)

    Best Regards

  • is there any tutorial ?

  • Hi Jayanta,

    Are you referring to action  upon button presses? I believe you can start by reading the Software Developers Guide and then take a closer look at our sample applications (SimpleBLEPeripheral and SimpleBLECentral) how button pushes are used. There are no specific tutorial for that (yet).

    You would then have to implements similar functionality for the HostTestRelease (Network Processor) project, because I suppose you still want to run the device from BTool, am I right?

  • I have opened BTool and performed the above instructions which should make the dongle act like a slave.  However, when I have completed this how do I get the dongle to start advertising?

    I look at other items in the list in the GAP for something that will act like the GAPROLE_SetAParameter(GAPROLE_ADVERT_ENABLE, ...) and I don't see anything.  Please help me - what am I missing?