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.

LAUNCHXL-CC26X2R1: Problems with long range mode (coded phy)

Part Number: LAUNCHXL-CC26X2R1


Hello,


i'm trying to send and scan some advertising data with coded phy. I'm using the following development tools/software/controller:

- 2 x LaunchXL-CC26x2R1 Rev, 1.0.1

- Code Composer Studio

- simplelink_cc26x2_sdk_2_30_00_34


I tried several projects and followed the instruction of articles to evaluate the ble 5 longrange mode:


http://dev.ti.com/tirex/content/simplelink_academy_cc26x2sdk_2_30_02_00/modules/ble5stack/ble_01_basic/ble_01_basic.html

http://dev.ti.com/tirex/content/simplelink_academy_cc26x2sdk_2_30_02_00/modules/ble5stack/ble_2Mbps/ble_2Mbps.html

http://dev.ti.com/tirex/content/simplelink_cc26x2_sdk_2_30_00_34/docs/ble5stack/ble_user_guide/html/ble-stack-5.x/gap.html#gap-advertiser

http://dev.ti.com/tirex/content/simplelink_academy_cc26x2sdk_2_30_02_00/modules/ble5stack/ble_scan_adv_basic/ble_scan_adv_basic.html

http://dev.ti.com/tirex/content/simplelink_cc26x2_sdk_1_60_00_43/docs/ble5stack/ble_user_guide/html/ble-stack-5.x/phy-coded.html#advertise-on-le-coded-phy

I can scan coded advertising data but only in range of 1mbps. I have also tried to connect and changed the phy during the connection. That worked, but the distance (where im losing the connection) is always the same as with each other ble device. I need your advice.

  • Marco,

    Could you please let me know what Coded PHY you are using? S = 2 or S = 8?
    What distance are you seeing when you refer to a range of 1mbps?

    Best,
    Kris
  • Marco,

    I tested the simple central and simple peripheral from the simplelink_cc26x2_sdk_2_30_00_34 sdk and had great luck with it.

    I have a set of instructions for you to test out.

    Materials

    2x CC26X2 LaunchPads

    2x USB

    1) Download the SimpleLink CC26X2 SDK v2.30.

    2) Connect LaunchPad A to computer.

    3) Start Uniflash

    5) Click start for the device that is plugged in and click browse and navigate to C:\ti\simplelink_cc26x2_sdk_2_30_00_34\examples\rtos\CC26X2R1_LAUNCHXL\ble5stack\hexfiles and flash simple_peripheral by clicking Load Image.

    6) Start a new session and disconnect LaunchPad A

    7) Connect LaunchPad B and navigate to C:\ti\simplelink_cc26x2_sdk_2_30_00_34\examples\rtos\CC26X2R1_LAUNCHXL\ble5stack\hexfiles and flash simple_central

    8) Connect LaunchPad A to another power source (like a portable battery or another laptop).

    9) Start a PuTTy session for LaunchPad B running the central project.

    a. Enter COM port settings (can be found in device manager) and for baud enter 115200.

    10) Click reset to see the device menu.

    11) The menu system uses the buttons on the launchpad. The left button is for doing an action where you see the “<” symbol. The right button is for the “>” symbol.

    12) When both devices are connected to power,  click the left button once to navigate down to “Discover Devices” and click the right button once to start discovering devices.

    13) 1 device should be discovered, click the left button twice to navigate down to “Connect To” and click the right button.

    14) Click the right button once again to connect to the device with the displayed BD Address.

    15) This will connect the devices and pair the device.

    16) Click the left button twice to go down to “Work With” and select the device you wish to work with.

    17) Here you can navigate to a number of options such as GATT Read, GATT Write, Start RSSI reading Connection Update and Set Conn Phy Preference. Navigate to the Set Conn PHY Preference and select Coded in that menu.

    18) Coded will automatically use Coded S=8 of the coded PHY giving you the longest range. The device will return a status of 0x00 and give the message “BD Addr: PHY updated to CODED”

    19) You can confirm that this is using the Coded PHY by using a BLE 5 capable sniffer like an Ellisys to see that the device is in fact using a coded session. I’ve confirmed this myself with this project before.

    =====

    If you would like to clean the traffic up even further we can make changes to the oob examples instead of using the prebuilt hexfiles.

    First change the default init phy so that we can connect when we feel like doing so properly.

    In Simple_central:

    #define DEFAULT_INIT_PHY                     INIT_PHY_CODED

    Then let's remove the legacyAdv set

    In Simple_Peripheral::SimplePeripheral_processAppMsg()

    comment out the following.

           // Setup and start Advertising
            // For more information, see the GAP section in the User's Guide:
            // software-dl.ti.com/.../
    
            // Temporary memory for advertising parameters for set #1. These will be copied
            // by the GapAdv module
    //        GapAdv_params_t advParamLegacy = GAPADV_PARAMS_LEGACY_SCANN_CONN;
    
            // Create Advertisement set #1 and assign handle
    //        status = GapAdv_create(&SimplePeripheral_advCallback, &advParamLegacy,
    //                               &advHandleLegacy);
    //        SIMPLEPERIPHERAL_ASSERT(status == SUCCESS);
    
            // Load advertising data for set #1 that is statically allocated by the app
    //        status = GapAdv_loadByHandle(advHandleLegacy, GAP_ADV_DATA_TYPE_ADV,
    //                                     sizeof(advertData), advertData);
    //        SIMPLEPERIPHERAL_ASSERT(status == SUCCESS);
    
            // Load scan response data for set #1 that is statically allocated by the app
    //        status = GapAdv_loadByHandle(advHandleLegacy, GAP_ADV_DATA_TYPE_SCAN_RSP,
    //                                     sizeof(scanRspData), scanRspData);
    //        SIMPLEPERIPHERAL_ASSERT(status == SUCCESS);
    
            // Set event mask for set #1
    //        status = GapAdv_setEventMask(advHandleLegacy,
    //                                     GAP_ADV_EVT_MASK_START_AFTER_ENABLE |
    //                                     GAP_ADV_EVT_MASK_END_AFTER_DISABLE |
    //                                     GAP_ADV_EVT_MASK_SET_TERMINATED);
    //
    //        // Enable legacy advertising for set #1
    //        status = GapAdv_enable(advHandleLegacy, GAP_ADV_ENABLE_OPTIONS_USE_MAX , 0);
    //        SIMPLEPERIPHERAL_ASSERT(status == SUCCESS);
    

    Finally in gap_advertiser.h:

    change the GAP_ADV_PRIM_PHY_CODED_S8.primPhy and .secPhy values

    #define GAP_ADV_PRIM_PHY_CODED_S8 {                                 \
      .eventProps = GAP_ADV_PROP_CONNECTABLE,                                  \
      .primIntMin = 160,                                                       \
      .primIntMax = 160,                                                       \
      .primChanMap = GAP_ADV_CHAN_ALL,                                         \
      .peerAddrType = PEER_ADDRTYPE_PUBLIC_OR_PUBLIC_ID,                       \
      .peerAddr = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa },                      \
      .filterPolicy = GAP_ADV_WL_POLICY_ANY_REQ,                               \
      .txPower = GAP_ADV_TX_POWER_NO_PREFERENCE,                               \
      .primPhy = GAP_ADV_PRIM_PHY_CODED_S8,                                    \
      .secPhy = GAP_ADV_SEC_PHY_CODED_S8,                                      \
      .sid = 0                                                                 \
    }

    This will allow you to test the long range functionality.

    Best,

    Kris

  • Marco,

    I haven’t heard from you for a couple weeks, so I’m assuming you were able to resolve your issue. If this isn’t the case, please click the "This did NOT resolve my issue" button and reply to this thread with more information. If this thread locks, please click the "Ask a related question" button and in the new thread describe the current status of your issue and any additional details you may have to assist us in helping to solve your issues.

    Best,
    Kris
  • Kris,

    thank you a lot. I was able to move 200m away from the simple peripheral(Street was only 200 m long). I still wonder why it didnt't work.