Paul Rolfe
Paul Rolfe

Reputation: 99

Bluetooth Dual LE and Classic Mode Flags

In the Advertising section of a BLE, The Bluetooth SIG Define the "Flags"

which has these plus a few more.

I am having an issue on a CSR chipset design that does not support GATT over BR/EDR.

Apple works great, as it always connects to LE.

..but android devices persistently try to connect GATT over BR/EDR if the audio is already up; therefore fail because CSR cant handle BR/EDR transport for GATT.

I am thinking these flags are at the core of the problem.

In CSR's demo code they do not set "any" of the above flags. I have had limited success with my problem on some handsets by setting the "Not Supported" flag.

The issue is the other two flags. How does Controller/ Host relate to other LE terms. For example Central/Peripheral or later Master/Slave.

I dont know what flags to set for my use case. Any suggestions welcome?

Upvotes: 2

Views: 2738

Answers (1)

Emil
Emil

Reputation: 18452

You can use a Static Random address for all LE operations. That way the Android device thinks it's a different device than when talking over Bluetooth Classic since that uses the public BD_ADDR.

Or, one variant of the connectGatt takes a transport parameter which you can set to TRANSPORT_LE to force communication over BLE.

If your device supports BLE and BR/EDR at the same time you should set these flags:

BR/EDR Not Supported=0
Simultaneous LE and BR/EDR to Same Device Capable (Controller)=1
Simultaneous LE and BR/EDR to Same Device Capable (Host)=1

If the flag data is missing completely, it's the same as if all fields are zero.

Upvotes: 1

Related Questions