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.

CC2640R2F: Advertising interval of Slave

Part Number: CC2640R2F
Other Parts Discussed in Thread: BLE-STACK

Hi,

I want my slave to advertise after 0.5 second for that i changed the #define DEFAULT_ADVERTISING_INTERVAL to 800.


After that when i tried to connect master to slave then the connection is getting terminated.

Do i need to make changes anywhere else in the code.

I am using SDk version 3_20_00_21.

Thanks

Akansha

  • Hi Akansha,

    What BLE-stack are you using; blestack or ble5stack? Are you modifying the simple_peripheral example project?

    Best regards,

    Vetle

  • H,

    I am using BLE-Stack.

    And using rtls_Slave example.


    I want to change the advertising interval of slave, for that i changed the #define DEFAULT_ADVERTISING_INTERVAL but it not worked.

    Can you share some other ways to do this?

    Thanks

    Akansha

  • Hi,

    Are you sure you are talking about the advertising interval? In BLE, the advertising phase occurs while the slave is not connected to the master (I simplified this on purpose, please have a look to the BLE core specifications for details). In other words, there is no CTE transmitted during the advertisement phase. So I assume you wanted to change the connection interval.

    ==> Now, if you really want to modify the advertising interval, then it is the same procedure as the one used for any other BLE project. So I do believe you did well by basically modify DEFAULT_ADVERTISING_INTERVAL's value. Can you explain how you managed to measure the advertising interval?

    ==> If you meant "connection interval", the connection interval can be modified using the python script. The connection interval is the third parameter of the function connect() [this function is used to ask the master to establish a connection with the master]. Please have a look to the file rtls_example.py (especially line 197 for the details):

    master_node.rtls.connect(address_type, address, conn_interval)

    Note 1: in SDK 3.20, the value of the connection interval is expressed in 1.25 ms unity. In the SDK 3.30 and latter, the python script expresses the connection interval directly in ms.

    Note 2: in BLE, the connection interval is negotiated between the master and the slave (the master has the final say). So if you want to change the connection interval in the embedded code, you have to modify the corresponding value on both the slave and the master

    I hope this will help,

    Regards,