Hally
Hally

Reputation: 81

Questions regarding BLE advertise and broadcast

What I have read from many documents of Android Developer and lectures that I searched on the internet is: Advertising is sending signals to a broadcasting device so that the device could be found and Broadcasting is scanning the advertising devices to connect/send data.

Is what I understood correct?

Then is it true that BluetoothLeAdvertiser should be implemented first before scanning activity?

I am keep researching on the internet to find information in order to create an app that can broadcast a short word to other nearby devices through BLE. However, when I was doing research people do not use class LeAdvertiser that was introduced as an example on Android Developer page. Why is it??

Upvotes: 1

Views: 2451

Answers (1)

Youssif Saeed
Youssif Saeed

Reputation: 13295

As Emil said, broadcaster/advertiser is the device that sends out BLE adverts. Broadly speaking, there are 4 main (GAP) roles in Bluetooth Low Energy:-

  • Broadcaster - A devices that just advertises data.
  • Peripheral - A device that advertises data but can be connected to by remote devices as well.
  • Observer - A device that just scans for data.
  • Central - A device that can scan for data as well as connect to them.

When BLE was first introduced, beacons/sensors (e.g. Heart Rate, Thermometer) occupied the first two categories and phones/computers occupied the other two. However, BLE has since evolved and a lot of devices now support all four roles and a device can operate in one or more roles at the same time.

And yes, if you want your device to be found by other observers/scanners, then you should first use LeAdvertiser in order to send out BLE adverts. Have a look at the links below that show how this is used:-

Upvotes: 1

Related Questions