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 dropping connection

Other Parts Discussed in Thread: CC2540

I'm transferring CC2540 firmware from keyfob to custom device (on the chip).

They differ in key and LED pin layout (so I changed source respectively).

While testing with UB dongle after standard advertizing and connection,

I'm trying to Discover Characteristic by UUID (no matter which profile)

device answers "Success" then drops connection after 10 sec (Supervision timeout though the timeout was set 20 sec - see log below).

Exactly the same thing happens if I try to load standard example firmware (for ex. heartrate).

Any ideas as to code changes, preprocessor directives, pins to note etc.?

[20] : <Tx> - 03:16:01.730
-Type        : 0x01 (Command)
-Opcode        : 0xFD88 (GATT_DiscCharsByUUID)
-Data Length    : 0x08 (8) byte(s)
 ConnHandle    : 0x0000 (0)
 StartHandle    : 0x0001 (1)
 EndHandle    : 0xFFFF (65535)
 Type        : 08:18
Dump(Tx):
01 88 FD 08 00 00 01 00 FF FF 08 18

------------------------------------------------------------------------------------------------------------------------
[21] : <Rx> - 03:16:01.801
-Type        : 0x04 (Event)
-EventCode    : 0xFF (HCI_LE_ExtEvent)
-Data Length    : 0x06 (6) bytes(s)
 Event        : 0x067F (GAP_HCI_ExtentionCommandStatus)
 Status        : 0x00 (Success)
 OpCode        : 0xFD88 (GATT_DiscCharsByUUID)
 DataLength    : 0x00 (0)
Dump(Rx):
04 FF 06 7F 06 00 88 FD 00

------------------------------------------------------------------------------------------------------------------------
[22] : <Rx> - 03:16:11.087
-Type        : 0x04 (Event)
-EventCode    : 0xFF (HCI_LE_ExtEvent)
-Data Length    : 0x06 (6) bytes(s)
 Event        : 0x0509 (ATT_ReadByTypeRsp)
 Status        : 0x14 (Can't Perform Function When Not In A Connection)
 ConnHandle    : 0x0000 (0)
 PduLen        : 0x00 (0)
Dump(Rx):
04 FF 06 09 05 14 00 00 00

------------------------------------------------------------------------------------------------------------------------
[23] : <Rx> - 03:16:11.155
-Type        : 0x04 (Event)
-EventCode    : 0xFF (HCI_LE_ExtEvent)
-Data Length    : 0x06 (6) bytes(s)
 Event        : 0x0606 (GAP_TerminateLink)
 Status        : 0x00 (Success)
 ConnHandle    : 0x0000 (0)
 Reason        : 0x08 (Supervisor Timeout)
Dump(Rx):
04 FF 06 06 06 00 00 00 08


  • Hi Evgeny,

    Are you certain that you get the connection up and running in the first place? (seeing the actual device to the left-most part of BTool)

    Can you tell me a bit about your custom device. I assume you mean that you have a custom made PCB with a cc2540, based on our reference design? 

    Br

  • Yes,

    1) Yes, connection appears on the left side with address FF:FF:FF:FF:FF:FF (but sometimes timeouts very fast  - like logs below)

    2) and yes - it's custom made pcb on the cc2540 reference design.

    differences which I could find (with KeyFob) are:

    - added I2C devices flash memory etc. (SCL - port P1_3, SDA - P1_5, flash write protect - P0_5),

    - no keys,

     - LEDs connected to ports P1_7, P2_0 (instead of P1_0, P1_1)

    [47] : <Rx> - 04:05:01.490
    -Type        : 0x04 (Event)
    -EventCode    : 0xFF (HCI_LE_ExtEvent)
    -Data Length    : 0x06 (6) bytes(s)
     Event        : 0x067F (GAP_HCI_ExtentionCommandStatus)
     Status        : 0x00 (Success)
     OpCode        : 0xFE09 (GAP_EstablishLinkRequest)
     DataLength    : 0x00 (0)
    Dump(Rx):
    04 FF 06 7F 06 00 09 FE 00

    ------------------------------------------------------------------------------------------------------------------------
    [48] : <Rx> - 04:05:01.895
    -Type        : 0x04 (Event)
    -EventCode    : 0xFF (HCI_LE_ExtEvent)
    -Data Length    : 0x13 (19) bytes(s)
     Event        : 0x0605 (GAP_EstablishLink)
     Status        : 0x00 (Success)
     DevAddrType    : 0x00 (Public)
     DevAddr        : FF:FF:FF:FF:FF:FF
     ConnHandle    : 0x0000 (0)
     ConnInterval    : 0x0050 (80)
     ConnLatency    : 0x0000 (0)
     ConnTimeout    : 0x0140 (320)
     ClockAccuracy    : 0x00 (0)
    Dump(Rx):
    04 FF 13 05 06 00 00 FF FF FF FF FF FF 00 00 50
    00 00 00 40 01 00

    ------------------------------------------------------------------------------------------------------------------------
    [49] : <Rx> - 04:05:05.246
    -Type        : 0x04 (Event)
    -EventCode    : 0xFF (HCI_LE_ExtEvent)
    -Data Length    : 0x06 (6) bytes(s)
     Event        : 0x0606 (GAP_TerminateLink)
     Status        : 0x00 (Success)
     ConnHandle    : 0x0000 (0)
     Reason        : 0x08 (Supervisor Timeout)
    Dump(Rx):
    04 FF 06 06 06 00 00 00 08


  • and I also can check connected state 'cause it entered (in debug) state change callback function, like

    static void peripheralStateNotificationCB( gaprole_States_t newState )
    {
      uint16 connHandle = INVALID_CONNHANDLE;

      if ( gapProfileState != newState )
      {
        switch( newState )
        {
          //if the state changed to connected, initially assume that velocomputer is in range
          case GAPROLE_CONNECTED:
            {
              GAPRole_GetParameter( GAPROLE_CONNHANDLE, &connHandle );
              
              #if defined ( PLUS_BROADCASTER )
                osal_start_timerEx( velocomputerapp_TaskID, ADV_IN_CONNECTION_EVT, ADV_IN_CONN_WAIT );
              #endif
    .......

    Evgeny

  • Hi Evgeny,

    Evgeny Lunev said:
    Yes, connection appears on the left side with address FF:FF:FF:FF:FF:FF (but sometimes timeouts very fast  - like logs below)

    A device should not have FF:FF:FF:FF:FF:FF (All F's) as address. Can you use the flash programmer and change the secondary address to something more appropriate, maybe 11:22:33:44:55:66, and see if that works?

    Evgeny Lunev said:
    added I2C devices flash memory etc. (SCL - port P1_3, SDA - P1_5, flash write protect - P0_5),

    Have you written a bit banged driver for the I2C communication? Since it is not part of the BLEv1.1 stack. Maybe there is something there causing the problem.

    Br

  • Hi Nick,

    1) Yes, I programmed secondary address with flash programmer but still no answer

    for any request (be it attReqInfo for list of primary services or for pairing).

    >A device should not have FF:FF:FF:FF:FF:FF (All F's) as address. Can you use the flash programmer and

    >change the secondary address to something more appropriate,

    >maybe 11:22:33:44:55:66, and see if that works?

    2) Yes, I wrote custom bit-banging driver for I2C - but the firmware RF section (profile data exchange etc.) works

    fine on CC2540 KeyFob even with port layout changed (custom sensor doesn't have keys; I2C ports wired to other pins..)

    i.e. firware optimized for custom sensor doesn't run on the sensor but works on KeyFob for which it doesn't exactly fit.

    I hoped that ther is some hidden register to be set or some function to be called at init which I have no idea of..

    and you could hint me on that...

    Tnank you.

  • Evgeny,

    If your firmware works on our CC2540 Keyfob but not on your Custom solution, it sounds like an hardware issue to me. Could you provide Schematics and PCB design layout for your custom design, for us to take a look at?

    Br

  • Hi,

    Could we contact via e-mail? my - evgenyl@soundofmotion.com

    Regards,

    Evgeny.

  • Hi Evgeny,

    I understand if you do not want to share your custom design publicly, so as for the HW review, no problem. For further support regarding CC2540 and working with Bluetooth Low Energy, please keep the questions on the forum. 

    Br 

  • Hi,

    I am new to program CC2540. My aim is to get RSSI value of incoming 2402 Mhz unmodulated signal from Signal Generator. So I thought to modify SimpleBLECentral Program. But it needs to be connected first with SimpleBLEPeripheral program on the other board.

    I do not know how can I skip the Connect Handle part so that I can get RSSI value without any connection as its not possible to have connection with signal generator.

    Can somebody please help me?

    Thank you so much,

    Shishir Shah

  • Hi

    I'm experiencing the same problem.

    First, I can establish the link according to the BTool dump:

    ------------------------------------------------------------------------------------------------------------------------
    [21] : <Rx> - 12:42:40.820
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x13 (19) bytes(s)
    Event : 0x0605 (GAP_EstablishLink)
    Status : 0x00 (Success)
    DevAddrType : 0x00 (Public)
    DevAddr : 3C:2D:B7:85:8D:D8
    ConnHandle : 0x0000 (0)
    ConnInterval : 0x0050 (80)
    ConnLatency : 0x0000 (0)
    ConnTimeout : 0x07D0 (2000)
    ClockAccuracy : 0x00 (0)
    Dump(Rx):
    04 FF 13 05 06 00 00 D8 8D 85 B7 2D 3C 00 00 50
    00 00 00 D0 07 00


    If right after getting the message I try to read a characteristic, the device drops the conn:



    ------------------------------------------------------------------------------------------------------------------------
    [22] : <Tx> - 12:42:57.327
    -Type : 0x01 (Command)
    -Opcode : 0xFDB4 (GATT_ReadUsingCharUUID)
    -Data Length : 0x08 (8) byte(s)
    ConnHandle : 0x0000 (0)
    StartHandle : 0x0001 (1)
    EndHandle : 0xFFFF (65535)
    Type : F1:FF
    Dump(Tx):
    01 B4 FD 08 00 00 01 00 FF FF F1 FF

    ------------------------------------------------------------------------------------------------------------------------
    [23] : <Rx> - 12:42:57.407
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x06 (6) bytes(s)
    Event : 0x067F (GAP_HCI_ExtentionCommandStatus)
    Status : 0x00 (Success)
    OpCode : 0xFDB4 (GATT_ReadUsingCharUUID)
    DataLength : 0x00 (0)
    Dump(Rx):
    04 FF 06 7F 06 00 B4 FD 00

    ------------------------------------------------------------------------------------------------------------------------
    [24] : <Rx> - 12:43:02.628
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x06 (6) bytes(s)
    Event : 0x0509 (ATT_ReadByTypeRsp)
    Status : 0x14 (Can't Perform Function When Not In A Connection)
    ConnHandle : 0x0000 (0)
    PduLen : 0x00 (0)
    Dump(Rx):
    04 FF 06 09 05 14 00 00 00

    ------------------------------------------------------------------------------------------------------------------------
    [25] : <Rx> - 12:43:02.716
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x06 (6) bytes(s)
    Event : 0x0606 (GAP_TerminateLink)
    Status : 0x00 (Success)
    ConnHandle : 0x0000 (0)
    Reason : 0x08 (Supervisor Timeout)
    Dump(Rx):
    04 FF 06 06 06 00 00 00 08

    So it looks pretty much the same problem as yours but I always get the right address when discovering.


    Regards,

    Daniel

  • Hi Daniel,

    I found solution of that problem (Avoiding Connection Handle problem atleast to read RSSI value) laterly. I did following additional coding in sample program "HostTestApp".

    void spi_recieve(uint8 *rxBufferSlave)
    {
      //SPI Slave
      for (uint8 i = 0; i <= N; i++)
      {
        while ((~U1CSR)&0x04);
        U1CSR &= ~0x04;
        rxBufferSlave[i] = U1DBUF;
      }
    }

    void main()

    {

     spi_recieve(rxBufferSlave);
        
         RFST = 0xEF; //disable TX/RX
         halWait(10);
        
        
         RFST = 0xE3; //Enable and calibrate frequency synthesizer for RX
         VOID HCI_EXT_ModemTestRxCmd(rxBufferSlave[1]);
         VOID HCI_ReadRssiCmd( 0 );
         while((~RFSTAT)&0x01);
         rxBufferSlave[4] = RSSI;

    HCI_ResetCmd();

    }

     

    My application required some SPI communication too but apart from that you can do conventional type programming accessing registers directly. Dont forget to include "iocc2540.h".

    And externally you might have to define some register names (eg. SFR(  RFST      ,  0xE1  )   /*  RF Command Strobe                                  */
    #define RSSI  XREG( 0x618E ) ).

    Following website lists down some undefined but still existing registers of CC2540. check it out pls.

    http://pastebin.com/BDDTMV4N

    Hope you might get good help from this.

    Still I am not able to receive packets using this method even without connection handle. So if anybody have more idea, please let me know.

    Thanks & Cheers,

    Shishir

  • I'm also expierincing the same behaviour:

    The Connection is established with 6B:3E:9C:9F:DE:23 after that I'm trying to discover characteristics by UUID using GATT_DiscCharsByUUID after which a success report comes in (which I don't really understand). 3 Seconds after that the connection is dropped, and I'm left without characteristics.

    [73] : <Tx> - 01:58:29.863
    -Type : 0x01 (Command)
    -Opcode : 0xFE09 (GAP_EstablishLinkRequest)
    -Data Length : 0x09 (9) byte(s)
    HighDutyCycle : 0x00 (Disable)
    WhiteList : 0x00 (Disable)
    AddrTypePeer : 0x03 (PrivateResolve)
    PeerAddr : 23:DE:9F:9C:3E:6B
    Dump(Tx):
    01 09 FE 09 00 00 03 23 DE 9F 9C 3E 6B
    ------------------------------------------------------------------------------------------------------------------------
    [74] : <Rx> - 01:58:29.910
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x06 (6) bytes(s)
    Event : 0x067F (GAP_HCI_ExtentionCommandStatus)
    Status : 0x00 (Success)
    OpCode : 0xFE09 (GAP_EstablishLinkRequest)
    DataLength : 0x00 (0)
    Dump(Rx):
    04 FF 06 7F 06 00 09 FE 00
    ------------------------------------------------------------------------------------------------------------------------
    [75] : <Info> - 01:58:30.035
    Device Connected
    Handle = 0x0000
    Addr Type = 0x03 (PrivateResolve)
    BDAddr = 6B:3E:9C:9F:DE:23
    ------------------------------------------------------------------------------------------------------------------------
    [76] : <Rx> - 01:58:30.035
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x13 (19) bytes(s)
    Event : 0x0605 (GAP_EstablishLink)
    Status : 0x00 (Success)
    DevAddrType : 0x03 (PrivateResolve)
    DevAddr : 6B:3E:9C:9F:DE:23
    ConnHandle : 0x0000 (0)
    ConnInterval : 0x0C80 (3200)
    ConnLatency : 0x0000 (0)
    ConnTimeout : 0x0C80 (3200)
    ClockAccuracy : 0x00 (0)
    Dump(Rx):
    04 FF 13 05 06 00 03 23 DE 9F 9C 3E 6B 00 00 80
    0C 00 00 80 0C 00
    ------------------------------------------------------------------------------------------------------------------------
    [77] : <Tx> - 01:58:45.448
    -Type : 0x01 (Command)
    -Opcode : 0xFD88 (GATT_DiscCharsByUUID)
    -Data Length : 0x08 (8) byte(s)
    ConnHandle : 0x0000 (0)
    StartHandle : 0x0001 (1)
    EndHandle : 0xFFFF (65535)
    Type : F8:01
    Dump(Tx):
    01 88 FD 08 00 00 01 00 FF FF F8 01
    ------------------------------------------------------------------------------------------------------------------------
    [78] : <Rx> - 01:58:45.479
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x06 (6) bytes(s)
    Event : 0x067F (GAP_HCI_ExtentionCommandStatus)
    Status : 0x00 (Success)
    OpCode : 0xFD88 (GATT_DiscCharsByUUID)
    DataLength : 0x00 (0)
    Dump(Rx):
    04 FF 06 7F 06 00 88 FD 00
    ------------------------------------------------------------------------------------------------------------------------
    [79] : <Rx> - 01:58:48.911
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x06 (6) bytes(s)
    Event : 0x0509 (ATT_ReadByTypeRsp)
    Status : 0x14 (Can't Perform Function When Not In A Connection)
    ConnHandle : 0x0000 (0)
    PduLen : 0x00 (0)
    Dump(Rx):
    04 FF 06 09 05 14 00 00 00
    ------------------------------------------------------------------------------------------------------------------------
    [80] : <Info> - 01:58:48.927
    Device Disconnected
    Handle = 0x0000
    Addr Type = 0x03 (PrivateResolve)
    BDAddr = 6B:3E:9C:9F:DE:23
    ------------------------------------------------------------------------------------------------------------------------
    [81] : <Rx> - 01:58:48.927
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x06 (6) bytes(s)
    Event : 0x0606 (GAP_TerminateLink)
    Status : 0x00 (Success)
    ConnHandle : 0x0000 (0)
    Reason : 0x13 (Peer Requested)
    Dump(Rx):
    04 FF 06 06 06 00 00 00 13
    ------------------------------------------------------------------------------------------------------------------------


    Any help will be greatly appreciated.
  • Hey,
    What device are you trying to connect to? It seems like the connection is dropped before you can do anything... "Status : 0x14 (Can't Perform Function When Not In A Connection". This can happen due to many things, please provide more information regarding software and hardware (including versions) so that we might be able to help out.

    Best Regards
    Joakim
  • It's an iOS Device and I got it to work setting some parameters (see below for the full protocol). Basically I had to set the connection settings once it was connected.
    I set them to
    Min Connection Interval: 24,
    Max Connection Interval: 312,
    Slave Latency: 4,
    Supervision Timeout: 600

    I found these values here: e2e.ti.com/.../363279 See the Answer by Martin Petřík.

    The only question I still have, is how can I do that using code? What function do I need to call to change the connection settings of an already active connection?

    [1] : <Info> - 06:06:22.732
    Port opened at 27.02.2015 18:06:22
    ------------------------------------------------------------------------------------------------------------------------
    [2] : <Tx> - 06:06:23.075
    -Type : 0x01 (Command)
    -Opcode : 0xFE00 (GAP_DeviceInit)
    -Data Length : 0x26 (38) byte(s)
    ProfileRole : 0x08 ( Central )
    MaxScanRsps : 0x05 (5)
    IRK : 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
    CSRK : 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
    SignCounter : 0x00000001 (1)
    Dump(Tx):
    01 00 FE 26 08 05 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 01 00 00 00
    ------------------------------------------------------------------------------------------------------------------------
    [3] : <Rx> - 06:06:23.293
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x06 (6) bytes(s)
    Event : 0x067F (GAP_HCI_ExtentionCommandStatus)
    Status : 0x00 (Success)
    OpCode : 0xFE00 (GAP_DeviceInit)
    DataLength : 0x00 (0)
    Dump(Rx):
    04 FF 06 7F 06 00 00 FE 00
    ------------------------------------------------------------------------------------------------------------------------
    [4] : <Rx> - 06:06:23.309
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x2C (44) bytes(s)
    Event : 0x0600 (GAP_DeviceInitDone)
    Status : 0x00 (Success)
    DevAddr : 54:4A:16:48:A9:DE
    DataPktLen : 0x001B (27)
    NumDataPkts : 0x0C (12)
    IRK : 3F:51:7F:51:EB:61:06:0E:D0:C0:59:DC:81:F9:48:E3
    CSRK : D5:CF:09:1C:60:85:1E:28:C5:0A:FC:50:D3:C1:39:5C
    Dump(Rx):
    04 FF 2C 00 06 00 DE A9 48 16 4A 54 1B 00 0C 3F
    51 7F 51 EB 61 06 0E D0 C0 59 DC 81 F9 48 E3 D5
    CF 09 1C 60 85 1E 28 C5 0A FC 50 D3 C1 39 5C
    ------------------------------------------------------------------------------------------------------------------------
    [5] : <Tx> - 06:06:23.543
    -Type : 0x01 (Command)
    -Opcode : 0xFE31 (GAP_GetParam)
    -Data Length : 0x01 (1) byte(s)
    ParamID : 0x15 (Minimum Link Layer Connection Interval,
    When Using Connection Establishment
    Proc (mSec). TGAP_CONN_EST_INT_MIN)
    Dump(Tx):
    01 31 FE 01 15
    ------------------------------------------------------------------------------------------------------------------------
    [6] : <Tx> - 06:06:23.558
    -Type : 0x01 (Command)
    -Opcode : 0xFE31 (GAP_GetParam)
    -Data Length : 0x01 (1) byte(s)
    ParamID : 0x16 (Maximum Link Layer Connection Interval,
    When Using Connection Establishment
    Proc (mSec). TGAP_CONN_EST_INT_MAX)
    Dump(Tx):
    01 31 FE 01 16
    ------------------------------------------------------------------------------------------------------------------------
    [7] : <Tx> - 06:06:23.574
    -Type : 0x01 (Command)
    -Opcode : 0xFE31 (GAP_GetParam)
    -Data Length : 0x01 (1) byte(s)
    ParamID : 0x1A (Link Layer Connection Slave Latency, When Using
    Connection Establishment Proc (mSec) TGAP_CONN_EST_LATENCY)
    Dump(Tx):
    01 31 FE 01 1A
    ------------------------------------------------------------------------------------------------------------------------
    [8] : <Tx> - 06:06:23.590
    -Type : 0x01 (Command)
    -Opcode : 0xFE31 (GAP_GetParam)
    -Data Length : 0x01 (1) byte(s)
    ParamID : 0x19 (Link Layer Connection Supervision Timeout,
    When Using Connection Establishment
    Proc (mSec). TGAP_CONN_EST_SUPERV_TIMEOUT)
    Dump(Tx):
    01 31 FE 01 19
    ------------------------------------------------------------------------------------------------------------------------
    [9] : <Rx> - 06:06:23.590
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x08 (8) bytes(s)
    Event : 0x067F (GAP_HCI_ExtentionCommandStatus)
    Status : 0x00 (Success)
    OpCode : 0xFE31 (GAP_GetParam)
    DataLength : 0x02 (2)
    ParamValue : 0x0018 (24)
    Dump(Rx):
    04 FF 08 7F 06 00 31 FE 02 18 00
    ------------------------------------------------------------------------------------------------------------------------
    [10] : <Rx> - 06:06:23.605
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x08 (8) bytes(s)
    Event : 0x067F (GAP_HCI_ExtentionCommandStatus)
    Status : 0x00 (Success)
    OpCode : 0xFE31 (GAP_GetParam)
    DataLength : 0x02 (2)
    ParamValue : 0x0138 (312)
    Dump(Rx):
    04 FF 08 7F 06 00 31 FE 02 38 01
    ------------------------------------------------------------------------------------------------------------------------
    [11] : <Rx> - 06:06:23.621
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x08 (8) bytes(s)
    Event : 0x067F (GAP_HCI_ExtentionCommandStatus)
    Status : 0x00 (Success)
    OpCode : 0xFE31 (GAP_GetParam)
    DataLength : 0x02 (2)
    ParamValue : 0x0004 (4)
    Dump(Rx):
    04 FF 08 7F 06 00 31 FE 02 04 00
    ------------------------------------------------------------------------------------------------------------------------
    [12] : <Rx> - 06:06:23.636
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x08 (8) bytes(s)
    Event : 0x067F (GAP_HCI_ExtentionCommandStatus)
    Status : 0x00 (Success)
    OpCode : 0xFE31 (GAP_GetParam)
    DataLength : 0x02 (2)
    ParamValue : 0x0258 (600)
    Dump(Rx):
    04 FF 08 7F 06 00 31 FE 02 58 02
    ------------------------------------------------------------------------------------------------------------------------
    [13] : <Tx> - 06:06:28.722
    -Type : 0x01 (Command)
    -Opcode : 0xFE04 (GAP_DeviceDiscoveryRequest)
    -Data Length : 0x03 (3) byte(s)
    Mode : 0x03 (All)
    ActiveScan : 0x01 (Enable)
    WhiteList : 0x00 (Disable)
    Dump(Tx):
    01 04 FE 03 03 01 00
    ------------------------------------------------------------------------------------------------------------------------
    [14] : <Rx> - 06:06:28.753
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x06 (6) bytes(s)
    Event : 0x067F (GAP_HCI_ExtentionCommandStatus)
    Status : 0x00 (Success)
    OpCode : 0xFE04 (GAP_DeviceDiscoveryRequest)
    DataLength : 0x00 (0)
    Dump(Rx):
    04 FF 06 7F 06 00 04 FE 00
    ------------------------------------------------------------------------------------------------------------------------
    [15] : <Rx> - 06:06:28.769
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x29 (41) bytes(s)
    Event : 0x060D (GAP_DeviceInformation)
    Status : 0x00 (Success)
    EventType : 0x00 (Connectable Undirect Advertisement)
    AddrType : 0x03 (PrivateResolve)
    Addr : 5E:27:9C:52:B8:13
    Rssi : 0xD0 (208)
    DataLength : 0x1C (28)
    Data : 02:01:1A:09:03:0A:18:0F:F8:12:F8:01:F8:0E:09:48:
    49:44:20:41:64:76:52:65:6D:6F:74:65
    Dump(Rx):
    04 FF 29 0D 06 00 00 03 13 B8 52 9C 27 5E D0 1C
    02 01 1A 09 03 0A 18 0F F8 12 F8 01 F8 0E 09 48
    49 44 20 41 64 76 52 65 6D 6F 74 65
    ------------------------------------------------------------------------------------------------------------------------
    [16] : <Tx> - 06:06:29.564
    -Type : 0x01 (Command)
    -Opcode : 0xFE05 (GAP_DeviceDiscoveryCancel)
    -Data Length : 0x00 (0) byte(s)
    Dump(Tx):
    01 05 FE 00
    ------------------------------------------------------------------------------------------------------------------------
    [17] : <Rx> - 06:06:29.596
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x06 (6) bytes(s)
    Event : 0x067F (GAP_HCI_ExtentionCommandStatus)
    Status : 0x00 (Success)
    OpCode : 0xFE05 (GAP_DeviceDiscoveryCancel)
    DataLength : 0x00 (0)
    Dump(Rx):
    04 FF 06 7F 06 00 05 FE 00
    ------------------------------------------------------------------------------------------------------------------------
    [18] : <Rx> - 06:06:29.611
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x04 (4) bytes(s)
    Event : 0x0601 (GAP_DeviceDiscoveryDone)
    Status : 0x30 (The User Canceled The Task)
    NumDevs : 0x00 (0)
    Dump(Rx):
    04 FF 04 01 06 30 00
    ------------------------------------------------------------------------------------------------------------------------
    [19] : <Tx> - 06:06:30.313
    -Type : 0x01 (Command)
    -Opcode : 0xFE09 (GAP_EstablishLinkRequest)
    -Data Length : 0x09 (9) byte(s)
    HighDutyCycle : 0x00 (Disable)
    WhiteList : 0x00 (Disable)
    AddrTypePeer : 0x03 (PrivateResolve)
    PeerAddr : 13:B8:52:9C:27:5E
    Dump(Tx):
    01 09 FE 09 00 00 03 13 B8 52 9C 27 5E
    ------------------------------------------------------------------------------------------------------------------------
    [20] : <Rx> - 06:06:30.344
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x06 (6) bytes(s)
    Event : 0x067F (GAP_HCI_ExtentionCommandStatus)
    Status : 0x00 (Success)
    OpCode : 0xFE09 (GAP_EstablishLinkRequest)
    DataLength : 0x00 (0)
    Dump(Rx):
    04 FF 06 7F 06 00 09 FE 00
    ------------------------------------------------------------------------------------------------------------------------
    [21] : <Info> - 06:06:30.454
    Device Connected
    Handle = 0x0000
    Addr Type = 0x03 (PrivateResolve)
    BDAddr = 5E:27:9C:52:B8:13
    ------------------------------------------------------------------------------------------------------------------------
    [22] : <Rx> - 06:06:30.454
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x13 (19) bytes(s)
    Event : 0x0605 (GAP_EstablishLink)
    Status : 0x00 (Success)
    DevAddrType : 0x03 (PrivateResolve)
    DevAddr : 5E:27:9C:52:B8:13
    ConnHandle : 0x0000 (0)
    ConnInterval : 0x0138 (312)
    ConnLatency : 0x0004 (4)
    ConnTimeout : 0x0258 (600)
    ClockAccuracy : 0x00 (0)
    Dump(Rx):
    04 FF 13 05 06 00 03 13 B8 52 9C 27 5E 00 00 38
    01 04 00 58 02 00
    ------------------------------------------------------------------------------------------------------------------------
    [23] : <Tx> - 06:06:36.834
    -Type : 0x01 (Command)
    -Opcode : 0xFE30 (GAP_SetParam)
    -Data Length : 0x03 (3) byte(s)
    ParamID : 0x15 (Minimum Link Layer Connection Interval,
    When Using Connection Establishment
    Proc (mSec). TGAP_CONN_EST_INT_MIN)
    ParamValue : 0x0018 (24)
    Dump(Tx):
    01 30 FE 03 15 18 00
    ------------------------------------------------------------------------------------------------------------------------
    [24] : <Tx> - 06:06:36.850
    -Type : 0x01 (Command)
    -Opcode : 0xFE30 (GAP_SetParam)
    -Data Length : 0x03 (3) byte(s)
    ParamID : 0x16 (Maximum Link Layer Connection Interval,
    When Using Connection Establishment
    Proc (mSec). TGAP_CONN_EST_INT_MAX)
    ParamValue : 0x0138 (312)
    Dump(Tx):
    01 30 FE 03 16 38 01
    ------------------------------------------------------------------------------------------------------------------------
    [25] : <Tx> - 06:06:36.865
    -Type : 0x01 (Command)
    -Opcode : 0xFE30 (GAP_SetParam)
    -Data Length : 0x03 (3) byte(s)
    ParamID : 0x1A (Link Layer Connection Slave Latency, When Using
    Connection Establishment Proc (mSec) TGAP_CONN_EST_LATENCY)
    ParamValue : 0x0004 (4)
    Dump(Tx):
    01 30 FE 03 1A 04 00
    ------------------------------------------------------------------------------------------------------------------------
    [26] : <Tx> - 06:06:36.881
    -Type : 0x01 (Command)
    -Opcode : 0xFE30 (GAP_SetParam)
    -Data Length : 0x03 (3) byte(s)
    ParamID : 0x19 (Link Layer Connection Supervision Timeout,
    When Using Connection Establishment
    Proc (mSec). TGAP_CONN_EST_SUPERV_TIMEOUT)
    ParamValue : 0x0258 (600)
    Dump(Tx):
    01 30 FE 03 19 58 02
    ------------------------------------------------------------------------------------------------------------------------
    [27] : <Rx> - 06:06:36.881
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x06 (6) bytes(s)
    Event : 0x067F (GAP_HCI_ExtentionCommandStatus)
    Status : 0x00 (Success)
    OpCode : 0xFE30 (GAP_SetParam)
    DataLength : 0x00 (0)
    Dump(Rx):
    04 FF 06 7F 06 00 30 FE 00
    ------------------------------------------------------------------------------------------------------------------------
    [28] : <Rx> - 06:06:36.896
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x06 (6) bytes(s)
    Event : 0x067F (GAP_HCI_ExtentionCommandStatus)
    Status : 0x00 (Success)
    OpCode : 0xFE30 (GAP_SetParam)
    DataLength : 0x00 (0)
    Dump(Rx):
    04 FF 06 7F 06 00 30 FE 00
    ------------------------------------------------------------------------------------------------------------------------
    [29] : <Rx> - 06:06:36.912
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x06 (6) bytes(s)
    Event : 0x067F (GAP_HCI_ExtentionCommandStatus)
    Status : 0x00 (Success)
    OpCode : 0xFE30 (GAP_SetParam)
    DataLength : 0x00 (0)
    Dump(Rx):
    04 FF 06 7F 06 00 30 FE 00
    ------------------------------------------------------------------------------------------------------------------------
    [30] : <Rx> - 06:06:36.928
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x06 (6) bytes(s)
    Event : 0x067F (GAP_HCI_ExtentionCommandStatus)
    Status : 0x00 (Success)
    OpCode : 0xFE30 (GAP_SetParam)
    DataLength : 0x00 (0)
    Dump(Rx):
    04 FF 06 7F 06 00 30 FE 00
    ------------------------------------------------------------------------------------------------------------------------
    [31] : <Info> - 06:06:42.606
    Device Disconnected
    Handle = 0x0000
    Addr Type = 0x03 (PrivateResolve)
    BDAddr = 5E:27:9C:52:B8:13
    ------------------------------------------------------------------------------------------------------------------------
    [32] : <Rx> - 06:06:42.606
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x06 (6) bytes(s)
    Event : 0x0606 (GAP_TerminateLink)
    Status : 0x00 (Success)
    ConnHandle : 0x0000 (0)
    Reason : 0x13 (Peer Requested)
    Dump(Rx):
    04 FF 06 06 06 00 00 00 13
    ------------------------------------------------------------------------------------------------------------------------
    [33] : <Tx> - 06:06:47.239
    -Type : 0x01 (Command)
    -Opcode : 0xFE09 (GAP_EstablishLinkRequest)
    -Data Length : 0x09 (9) byte(s)
    HighDutyCycle : 0x00 (Disable)
    WhiteList : 0x00 (Disable)
    AddrTypePeer : 0x03 (PrivateResolve)
    PeerAddr : 13:B8:52:9C:27:5E
    Dump(Tx):
    01 09 FE 09 00 00 03 13 B8 52 9C 27 5E
    ------------------------------------------------------------------------------------------------------------------------
    [34] : <Rx> - 06:06:47.286
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x06 (6) bytes(s)
    Event : 0x067F (GAP_HCI_ExtentionCommandStatus)
    Status : 0x00 (Success)
    OpCode : 0xFE09 (GAP_EstablishLinkRequest)
    DataLength : 0x00 (0)
    Dump(Rx):
    04 FF 06 7F 06 00 09 FE 00
    ------------------------------------------------------------------------------------------------------------------------
    [35] : <Info> - 06:06:47.411
    Device Connected
    Handle = 0x0000
    Addr Type = 0x03 (PrivateResolve)
    BDAddr = 5E:27:9C:52:B8:13
    ------------------------------------------------------------------------------------------------------------------------
    [36] : <Rx> - 06:06:47.411
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x13 (19) bytes(s)
    Event : 0x0605 (GAP_EstablishLink)
    Status : 0x00 (Success)
    DevAddrType : 0x03 (PrivateResolve)
    DevAddr : 5E:27:9C:52:B8:13
    ConnHandle : 0x0000 (0)
    ConnInterval : 0x0138 (312)
    ConnLatency : 0x0004 (4)
    ConnTimeout : 0x0258 (600)
    ClockAccuracy : 0x00 (0)
    Dump(Rx):
    04 FF 13 05 06 00 03 13 B8 52 9C 27 5E 00 00 38
    01 04 00 58 02 00
    ------------------------------------------------------------------------------------------------------------------------
    [37] : <Tx> - 06:06:53.105
    -Type : 0x01 (Command)
    -Opcode : 0xFD88 (GATT_DiscCharsByUUID)
    -Data Length : 0x08 (8) byte(s)
    ConnHandle : 0x0000 (0)
    StartHandle : 0x0001 (1)
    EndHandle : 0xFFFF (65535)
    Type : 00:2A
    Dump(Tx):
    01 88 FD 08 00 00 01 00 FF FF 00 2A
    ------------------------------------------------------------------------------------------------------------------------
    [38] : <Rx> - 06:06:53.136
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x06 (6) bytes(s)
    Event : 0x067F (GAP_HCI_ExtentionCommandStatus)
    Status : 0x00 (Success)
    OpCode : 0xFD88 (GATT_DiscCharsByUUID)
    DataLength : 0x00 (0)
    Dump(Rx):
    04 FF 06 7F 06 00 88 FD 00
    ------------------------------------------------------------------------------------------------------------------------
    [39] : <Rx> - 06:06:55.476
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x0E (14) bytes(s)
    Event : 0x0509 (ATT_ReadByTypeRsp)
    Status : 0x00 (Success)
    ConnHandle : 0x0000 (0)
    PduLen : 0x08 (8)
    Length : 0x07 (7)
    Handle : 0x0002
    Data : 02:03:00:00:2A
    Dump(Rx):
    04 FF 0E 09 05 00 00 00 08 07 02 00 02 03 00 00
    2A
    ------------------------------------------------------------------------------------------------------------------------
    [40] : <Rx> - 06:07:10.686
    -Type : 0x04 (Event)
    -EventCode : 0xFF (HCI_LE_ExtEvent)
    -Data Length : 0x06 (6) bytes(s)
    Event : 0x0509 (ATT_ReadByTypeRsp)
    Status : 0x1A (The Procedure Is Completed)
    ConnHandle : 0x0000 (0)
    PduLen : 0x00 (0)
    Dump(Rx):
    04 FF 06 09 05 1A 00 00 00
    ------------------------------------------------------------------------------------------------------------------------