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 FOB status 0x11

Other Parts Discussed in Thread: CC2540

Hi,

I set a secondary address on the CC2540 it was previously reading primary and secondary as fffffff. How do i read the primary address?in the flash programmer i just get the secondary address.

After setting the secondary address I try to establish a connection to it but i get a message immediately with code 11(already performing that task).Where could i be going wrong

Thanks 

  • Some of the early CC2540 silicon does not have a pre-programmed IEEE address, but rather just has FFFF... for the primary address. You still should be able to program a secondary address. The error code 0x11 should only come up if you click "establish" to connect to a peer device that does not exist or is not advertising, and then click "establish" again before a connection has gone through.

  • I was able to program a secondary MAC address so I set it to FF:AA:FF:AA:FF:AA using Smart RF flash program.Then I burned the example code by opening it in IAR 7.62.I rechecked to see if my IEEE address is still there and it works fine now! ....Exited...

    When I needed to search for the device I had to press the right button on the key FOB.This starts bluetooth advertisements and then goes into sleep mode.However Iam able to connnect and reconnect to the device once I get the MAC address so the contoller wakes up automatically when it has a packet addressed to its MAC adress???

    How do i see RSSI of the connected KEYFOB..What could be the way if i want to measure RSSI regularly on the master for example BLE 4.0 phone or PC dongle

    In the BTool what do the high duty cycle and white list in the main page used for?

     

    Thanks

  • To check the RSSI from the last packet received with BTool, go to the "Adv. Commands" tab and send the command "HCIStatus_ReadRSSI". Note that there is a bug in the BLEv1.0 stack (this will be fixed in the BLEv1.1 stack) in that the RSSI value will not get updated unless a host packet is received.

    With the white list parameter enabled, the central device will try to establish a link with devices who's addresses are in the controller white list, as per the BT 4.0 spec. The address of the device in the actual GAP_EstablishLinkRequest parameters is ignored.

    The high duty cycle parameter enabled, the scan interval and scan window used for the initiation of the connection will be based on the GAP parameters TGAP_CONN_HIGH_SCAN_INT and TGAP_CONN_HIGH_SCAN_WIND. If the high duty cycle parameter is not enabled, the scan interval and window will be based on the GAP parameters TGAP_CONN_SCAN_INT and TGAP_CONN_SCAN_WIND.

    More information on the GAP API can be found in the API Guide: C:\Texas Instruments\BLE-CC2540\Documents\BLE_API_Guide_main.htm

    More information on the connection initiation and parameters such as the scan interval and scan window can be found in the BT 4.0 spec.

  • Hi,

          Thanks for sharing that it was helpful,I was able to view the RSSI using HCI functions.I went through the support documents I'm a little confused what protocol to use when developing a BT application.There are GAP ,GATT,HCI interface functions for communication how do I know which one to use when.Can you give me some pointers to start with which protocol will be useful when.Thanks

    Regards,

    Hansen

  • GAP and GATT are not so much separate protocols as they are layers of the BLE protocol stack with different functions. Any BLE application will make use of both of these layers.

    I would recommend recommend reading section 3.3 of the BLE SW Developer's Guide for more detailed information on these layers:

    http://www.ti.com/litv/pdf/swru271

  • Hi

       Im still getting 0x11(already performing that task error) even though I can see my device BDA.Is there a call back fucntion on the which is called when I press establish connection in Btool

    Im believe GAP_LINK_ESTABLISHED_EVENT and GAP_LINK_TERMINATED_EVENT will be called after the link is connected and disconnected,But what about wen the central device is requesting,is there any event for that? or when I recieve a packet addressed to my BDA

    Thanks

  • Sometimes even if im scanning from the central device and when I connect to the slave BDA I get only

     

    [21] : <Rx> - 08:30:55.156

    -Type : 0x04 (Event)

    -EventCode : 0xFF (HCI_LE_ExtEvent)

    -Data Length : 0x06 bytes(s)

     Event : 0x067F (GAP_HCI_ExtentionCommandStatus)

     Status : 0x00 (Success)

     OpCode : 0xFE09 (GAP_EstablishLinkRequest)

     DataLength : 0x00

    Dump(Rx):

    04 FF 06 7F 06 00 09 FE 00 

    Indicating success but i dont get any callback in GAP_LINK_ESTABLISHED_EVENT.
    Then i scan again from the central device It connects directly wen i press the left key and i get the connection packet in BTool
    [26] : <Rx> - 08:33:48.000
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x13 bytes(s)
     Event : 0x0605 (GAP_EstablishLink)
     Status : 0x00 (Success)
     DevAddrType : 0x00 (Public)
     DevAddr : 1F:FF:FF:FF:FF:FF
     ConnHandle : 0x0000
     ConnInterval : 0x0050
     ConnLatency : 0x0000
     ConnTimeout : 0x07D0
     ClockAccuracy : 0x00
    Dump(Rx):
    04 FF 13 05 06 00 00 FF FF FF FF FF 1F 00 00 50 
    00 00 00 D0 07 00 

     

  • Hi it seems that I have got a old CC2540 example, the primary BD addr is not unique ie it is 00:00:00:00:00:00. However when i try to change the secondary BD addr everything seems ok:

    CC2540 - ID1153: IEEE MAC address written successfully to chip

    My problem is that the BD addr does not change. (When i try to read secondary again, the old FF:FF:FF:FF:FF:FF is still there)

    Should it still be changeable even though i got an older kit?

    Br Henrik

     

     

  • There is some issue with the older one the primary address doesnt change,you can use the secondary address to program a BD address.The secondary address is used when the primary address is FFFFF.Since the secondary address is stored on flash you will have to change the settings in the debugger options to leave settings page unchanged.If your using IAR then make sure erase flash is not selected and select retain unchanged pages.If your using Smart RF programmer make sure you dont erase the secondary address page or you will read FFFFFF again