Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

CCS/CC2640: How to analysis the packet sniffer which was captureed in the connecting and pairing process between CC2640 and my android phone?

$
0
0

Part Number:CC2640

Tool/software: Code Composer Studio

1、outline of my problem
The packet sniffer was captured in the connecting and pairing process between CC2640 and my android phone . However ,I cannot figure out the meaning of these packets . The packet sniffer can be downloaded from the "5、attachments".

After reading the bluetooth core specification 《core_V5.0.pdf》, I still cannot figure out the meaning of these packets .《core_V5.0.pdf》 can be downloaded from the "5、attachments".

Can anyone provide me with some reference materials about the packet sniffer ?

2、configure the pair mode
Using CC2640_LAUNCHPAD , which runs the simple_peripheral project . Cofigure the pair mode in SimpleBLEPeripheral_init(void) ,the code is shown as followed:

  // Setup the GAP Bond Manager. For more information see the section in the
  // User's Guide:
  // software-dl.ti.com/.../
  {
    // Don't send a pairing request after connecting; the peer device must
    // initiate pairing
    //uint8_t pairMode = GAPBOND_PAIRING_MODE_WAIT_FOR_REQ;
      uint8_t pairMode = GAPBOND_PAIRING_MODE_INITIATE;
    // Use authenticated pairing: require passcode.
    uint8_t mitm = TRUE;
    // This device only has display capabilities. Therefore, it will display the
    // passcode during pairing. However, since the default passcode is being
    // used, there is no need to display anything.
    uint8_t ioCap = GAPBOND_IO_CAP_DISPLAY_ONLY;   //手机不显示密码,只有这个可用

    // Request bonding (storing long-term keys for re-encryption upon subsequent
    // connections without repairing)
    uint8_t bonding = TRUE;
    //uint8_t scMode = GAPBOND_SECURE_CONNECTION_ALLOW;

    GAPBondMgr_SetParameter(GAPBOND_PAIRING_MODE, sizeof(uint8_t), &pairMode);
    GAPBondMgr_SetParameter(GAPBOND_MITM_PROTECTION, sizeof(uint8_t), &mitm);
    GAPBondMgr_SetParameter(GAPBOND_IO_CAPABILITIES, sizeof(uint8_t), &ioCap);
    GAPBondMgr_SetParameter(GAPBOND_BONDING_ENABLED, sizeof(uint8_t), &bonding);
    //GAPBondMgr_SetParameter(GAPBOND_SECURE_CONNECTION, sizeof(uint8_t), &scMode);
  }


3、my complete procedure of capturing packet sniffer
(1) Running the simple_peripheral project in CC2640_LAUNCHPAD , installing "BLE SCANNER" on my android phone , then connect with CC2640 ,and pair with the default passcode "123456". As shown in picture 1 and 2 .

picture 1

picture 2

(3)In the connecting and pairing process between CC2640 and my android phone , the packet sniffer captured is shown in picture 3:

picture 3


4、detail of my problem
(1)what does "LL_Opcode & LL_Feature_Req" mean? As shown in picture 4

picture 4

(2)what does "Data Type = L2CAP-S" mean? As shown in picture 5

picture 5

(3)what does "L2CAP Header" mean? As shown in picture 6.

picture 6

(4)what does "Empty PDU" mean? As shown in picture 7

picture 7

(4)what does "direction = ?" mean? As shown in picture 8

picture 8


5、attachments
(1)path of simple_peripheral project on my computer:
C:\ti\simplelink_cc2640r2_sdk_1_40_00_45\examples\rtos\CC2640R2_LAUNCHXL\blestack\simple_peripheral

(2)The packet sniffer can be downloaded here:

(Please visit the site to view this file)

(3)《core_V5.0.pdf》can be downloaded here:
www.bluetooth.com/.../bluetooth-core-specification

(4)simplelink_cc2640r2_sdk_1_40_00_45can be downloaded here::
dev.ti.com/.../

(5)CC2640R2 launchpad can be bought here:
www.ti.com/.../launchxl-cc2640r2

6、my developing environment
CCS:Code Composer Studio 7.2.0
SDK:simplelink_cc2640r2_sdk_1_40_00_45
hardware:CC26640R2 launchpad develop kit
VS: Microsoft Visual C++ 2010 Express
OS:win7 64 bit


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>