This is the second part of the translation of Mohammad Afane's book "Intro to Bluetooth Low Energy". In the chapters presented, we will talk about device types and about advertising, the method by which peripherals communicate their presence. The first part is here.
I would like to note right away that advertising can be used not only to detect devices, but also to send custom data. For example, in the Atmotube portable air quality monitor , the advertise and scan response packages are used to communicate current sensor readings. This is useful for monitoring sensor readings during production and when collecting data from multiple devices.
2. BLE peripherals and central devices
There are several important definitions that you will constantly come across as you learn BLE. The two most important ones relate to device roles: BLE central and BLE peripheral.
Let's consider them in more detail.
2.1 Peripherals
– , , .. , .
– BLE-, , , : . , - , , .
, – (beacon). – , . : .
, , . , , , , .
, . : , . BLE- BLE ( ), , .
, . . , , GAP.
2.2
– , . .
– , , .
2.3
: , , .
|
|
|
|
|
, |
|
, |
|
|
|
|
, BLE |
BLE |
, BLE |
BLE |
. 1:
2.4
BLE . , , , . , BLE , , .
BLE , . , , .
. – , , - .
2.5 BLE
BLE- . , ( ) , .
2.6 BLE
BLE , ZigBee, Z-Wave, Thread .,) , . Bluetooth Classic , Bluetooth BLE, Bluetooth Classic. BLE.
BLE :
. BLE- .
, , . , , BLE-, .
, BLE
: Android iOS. Android BLE API Android 4.3 ( 2012 ), iOS – 2011 .
, . iOS, BLE , iPhone 4s. Android . , , BLE. Android , BLE, Android-.
3.
3.1 (GAP)
, BLE- . :
;
: , , , ;
: , , ;
, , BLE .
BLE- , , . , , – ( 37, 38, 39) , .
, . : .
3.2
, , . , .
BLE 40 , 2 ( ), . , 37 , .
: , , , () , , . , , Wi-Fi .
. . , .
, , , . , .
: 31 . 254 .
, () , ( ) , .
, . , ( ).
3.3
, , , . , , , . , , .
, , , , , , .
3.4
, (37, 38 39). ( ):
.
, .
.
.
.
.
. .
.
.
.
.
.
.
3.5
:
.
– . 20 10.24 , 625 . , . , .
.
. , .
, TLV (Type-Length-Value, --), . , . (PDU, Protocol Data Unit) BLE- :
: , , .
: , TLV.
: .
Bluetooth ( ).
:
Local Name: , , .
Tx Power Level: , .
Flags: (, , [1] [0], :
Limited Discoverable Mode ( );
General Discoverable Mode ( );
BR/EDR Not Supported ( Bluetooth);
Low Energy Bluetooth ;
Low Energy Bluetooth .
: BR (Basic Rate, ) EDR (Enhanced Data Rate, ) Bluetooth Classic.
Service Solicitation: UUID, , GATT- . .
Appearance: , . , , .
, , – .
3.6.
:
Scan Type ( ): .
Scan Window ( ): , .
Scan Interval ( ): .
, , .
__________________________________
?
In the next article, we will look at the issues related to connections, as well as understand the services, characteristics and ways of working with them.