TI E2E Community
Low Power RF & Wireless Connectivity
Low Power RF Bluetooth® Low Energy & ANT Forum
CC2540 USB Dongle as a slave
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 ??
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.
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:
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 ??
How can I test it ?
Is there a way to do this ?
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 :)
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?
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 :)
is there any tutorial ?
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?
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.