EasyManua.ls Logo

TELINK SEMICONDUCTOR TLSR8232 - Link Layer State Machine Initialization; Bls_Ll_Setadvdata

Default Icon
211 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Telink TLSR8232 BLE SDK Developer Handbook
AN-19112700-E1 72 Ver.1.0.0
In 5316 BLE SDK, by calling the interface below public address and “random static
address” will be obtained.
void blc_initMacAddress(int flash_addr, u8 *mac_public,
u8 *mac_random_static)
Fill “flash_addr” with the address for storing MAC address in Flash. From the content
above, the address of 5316 512K Flash should be 0x76000. If “random static address” is
not needed, fill “mac_random_static with “NULL”.
The Link Layer initialization API can be called to load the obtained BLE public MAC
address into BLE protocol stack.
blc_ll_initBasicMCU(mac_public);
In order to use advertising state in Link Layer state machine, MAC address needs to be
loaded.
blc_ll_initAdvertising_module(mac_public);
As introduced above, the 6-byte BLE MAC address will be downloaded into specific
Flash area of the actual products by Telink jig system. Users need to obtain the MAC
address from Bluetooth SIG.
3.2.8.4 Link Layer State Machine Initialization
The APIs below are used to configure initialization of each module when BLE state
machine is established. Please see the previous section for introduction of Link Layer
state machine.
void blc_ll_initBasicMCU (u8 *public_adr)
void blc_ll_initAdvertising_module(u8 *public_adr);
void blc_ll_initSlaveRole_module(void);
3.2.8.5 bls_ll_setAdvData
Please refer to Core_v5.0 (Vol 2/Part E/ 7.8.7 “LE Set Advertising Data Command”) for
details.
Figure 3-22 Adv Packet Format in BLE Stack
As shown above, an Adv packet in BLE stack contains 2-byte header, and Payload. The
maximum length of Payload is 31 bytes.
The API below is used to set AdvData data in Payload:
ble_sts_t bls_ll_setAdvData(u8 *data, u8 len);

Table of Contents