Showing posts with label Btool. Show all posts
Showing posts with label Btool. Show all posts

Monday, December 16, 2019

How to use indication in simple_peripheral example and use Btool to enable indication.

The following steps show you how to revise CC26xx simple_peripheral example to use indication in simple_peripheral example and use Btool to enable indication.

1. Import CC26xx simple_peripheral example into CCS.

2. Replace "static ICall_EntityID selfEntity;" with "ICall_EntityID selfEntity;" in simple_peripheral.c.

3. Revise the following lines in simple_gatt_profile.c.

    3.a Add "extern ICall_EntityID selfEntity;" in EXTERNAL VARIABLES section.

    3.b Change "static uint8 simpleProfileChar4Props = GATT_PROP_NOTIFY;" to "static uint8 simpleProfileChar4Props = GATT_PROP_INDICATE;".
   
    3.c Change "status = GATTServApp_ProcessCCCWriteReq( connHandle, pAttr, pValue, len,  offset, GATT_CLIENT_CFG_NOTIFY);" to "status = GATTServApp_ProcessCCCWriteReq( connHandle, pAttr, pValue, len,  offset, GATT_CLIENT_CFG_INDICATE );".

    3.d Change

          GATTServApp_ProcessCharCfg( simpleProfileChar4Config, &simpleProfileChar4, FALSE,
                                    simpleProfileAttrTbl, GATT_NUM_ATTRS( simpleProfileAttrTbl ),
                                    INVALID_TASK_ID, simpleProfile_ReadAttrCB );
        
          to

          GATTServApp_ProcessCharCfg( simpleProfileChar4Config, &simpleProfileChar4, FALSE,
                                    simpleProfileAttrTbl, GATT_NUM_ATTRS( simpleProfileAttrTbl ),
                                    selfEntity, simpleProfile_ReadAttrCB );

4. Build simple_peripheral project and download hex to your LaunchPad. Check what BLE MAC address is on Teraterm (or any other terminal tools).



5. Start Btool to do BLE scan and select matched BLE MAC address to establish connection.



6. Write indication enable (02 00 in hex) into Characteristic Value Handle 0x0028 to enable indication and you can receive characteristic 4 indication on Btool.




Friday, June 24, 2016

How to use TI BLE Stack HostTest to send advertising

How to use TI BLE Stack HostTest to send advertising using Btool in Adv. Commands tab:

1. GAP_DeviceInit, set profileRole to Peripheral and hit Send Command
2. GAP_UpdateAdvertisingData, set adType toGAPADVERT_ADVERTISEMENT_DATA and hit Send Command.
3. GAP_MakeDiscoverable and hit Send Command to start advertising.
4. GAP_EndDiscoverable and hit Send Command to stop advertising.

Wednesday, October 28, 2015

How to use SensorTag CC2650STK with CC-DEVPACK-DEBUGGER as HostTest and connect to BLE BTool.

The following steps show you how to use SensorTag CC2650STK with CC-DEVPACK-DEBUGGER as HostTest and connect to BLE BTool.

1. Revise the following code in Board.h

#define Board_UART_RX IOID_2 /* RF1.7 */
#define Board_UART_TX IOID_3 /* RF1.9 */

to

#define Board_UART_RX IOID_28 /* RF1.7 */
#define Board_UART_TX IOID_29 /* RF1.9 */

2. Rebuild HostTest and download it to CC2650STK.
3. Disconnect CC2650STK from CC-DEVPACK-DEBUGGER and connect it to restart.
4. Find COM port of XDS110 Class Application/User UART.



5. Open BTool and select COM port of XDS110 Class Application/User UART. Remember to select Flow to None.




6. You should see CC2650STK BLE HostTest is connected.