TI CC2541 's communication clutch.

Source: Internet
Author: User

Preamble: The boot code, which is 1 bytes, does not show up.

Access Address: A 4-byte length, the access address for all broadcast packets is 0X8E89BED6, such as.

When the PDU in the broadcast channel transmission, is the broadcast PDU, if the data channel transmission, is the data PDU, the CRC is based on this PDU calculation.

The PDU of a broadcast channel consists of a 16bit head, followed by a variable-length load.

Send with 0/1 of the accepted address, representing the address of the sending or receiving party:

0: Public Address

1: Random Address

Here, the sender address is a random address, the receiver address is a public address, and the PDU length is 17 bytes.

Say back to the PDU type:

The adv_ind is used in a non-directed broadcast time that can be connected in the following format:

TXADDR is a random address, then this address is in Adva, 6 bytes, which is the MAC address, and is random.

Advdata inside is the data of the broadcaster.

Then look at a scanqeq and SCANRSP two packets:

First, send the requested

Txadd is 1, proving to be a random address.

Adv's PDU head shows the type is 4, namely: ADC_SCAN_RSP

Static uint8 scanrspdata[] =
{
Complete name
0x14,//length of this data
Gap_adtype_local_name_complete,//0x09
0X53,//' S '
0x69,//' I '
0X6D,//' m '
0X70,//' P '
0X6C,//' l '
0X65,//' E '
0x42,//' B '
0X4C,//' L '
0x45,//' E '
0x50,//' P '
0X65,//' E '
0x72,//' R '
0x69,//' I '
0X70,//' P '
0x68,//' H '
0X65,//' E '
0x72,//' R '
0x61,//' a '
0X6C,//' l '

Connection Interval Range
0x05,//length of this data
Gap_adtype_slave_conn_interval_range,
Lo_uint16 (Default_desired_min_conn_interval),//100ms
Hi_uint16 (Default_desired_min_conn_interval),
Lo_uint16 (Default_desired_max_conn_interval),//1s
Hi_uint16 (Default_desired_max_conn_interval),

Tx Power level
0x02,//length of this data
Gap_adtype_power_level,//0x0a
0//0dBm
};

In this case, the scanrspdata contains several parts, including

The 1th byte, is the data length of the name: 0x14, note, yes 20

The 2nd byte, 0x09, is followed by the full name of the BLE, if 0x08 represents a short name.

Next is the name of the BLE simpleperipheral, a total of 19 bytes, plus a previous byte, is 20 bytes.

Then again the data length, 5 bytes

followed by the minimum maximum connection interval set code, 0x12

This is followed by a 4-byte specific setting.

The final is about the TX intensity/power setting of 3 bytes, 0dBm.

Let's look at an example from scan to connection:

First send a connection request:

The format of the connection request is:

Inita is the address of the initiator, and Adva is the address of the broadcaster, which is the destination address to connect to.

Then there are 22 bytes in the Lldata.

Inteval/lantency/timeout is the BLE connection attribute

0x0018/0x0000/0x0048, this is the default setting for the iphone.

Llid is 1, indicating that the load domain is a ll data PDU, the packet, if 3, is the control package.

Nesn:nextexpectedseqnum.

MD is as follows:

See I have to doubt the life, I see this why???

Well, this is the whole process of communication, the wireless architect may be a reference ...

TI CC2541 's communication clutch.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.