This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Is there a way to force Android to use Bluetooth Classic?

The device supports the SPP on Bluetooth classic and an "SPP LE" service using low energy.  Is it possible to force an Android phone to connect and use Bluetooth Classic?  Currently Android seems to randomly connect using either Classic or LE.

Disabling BLE advertisements isn't the preferred solution because it requires user input.

  • Hi Andrew,

    This has to be done on the Android side.
    Please see: e2e.ti.com/.../418446

    Regards,
    Gigi Joseph.
  • Thank you for the quick response.

    I misunderstood the problem.  The problem wasn't with the type of connection, but with pairing.  The advertisement flags field contained this mask

    (a) HCI_LE_ADVERTISING_FLAGS_BR_EDR_NOT_SUPPORTED_FLAGS_BIT_MASK.

    When we changed it to 

    (b) HCI_LE_ADVERTISING_FLAGS_SIMULTANEOUS_LE_BR_EDR_TO_SAME_DEVICE_CONTROLLER_BIT_MASK or

    (c) HCI_LE_ADVERTISING_FLAGS_SIMULTANEOUS_LE_BR_EDR_TO_SAME_DEVICE_HOST_BIT_MASK,

    then the Android phone seemed to only pair on the Classic link as desired.

    What is the difference between (b) and (c)?  The last part of the name isn't clear to me.

  • Hi Andrew,

    It is explained in the BT spec:

    HCI_LE_ADVERTISING_FLAGS_SIMULTANEOUS_LE_BR_EDR_TO_SAME_DEVICE_CONTROLLER_BIT_MASK : bit 49 of LMP Extended Feature
    bits

    This feature indicates that the Controller supports simultaneous LE and BR/EDR links to the same remote device. This bit shall only be set if the LE Supported (Controller) bit is set. The local Host uses this feature bit to determine whether the Controller is capable of supporting simultaneous LE and BR/EDR connections to a remote device. A remote device does not use this feature bit.

    HCI_LE_ADVERTISING_FLAGS_SIMULTANEOUS_LE_BR_EDR_TO_SAME_DEVICE_HOST_BIT_MASK : bit 66 of LMP Extended Feature bits

    This feature indicates that the Host supports LE. This bit shall only be set if the LE Supported (Controller) bit is set on the local Controller.
    The local Host sets this feature bit to indicate to a remote device that the local device is capable of supporting LE. A remote Host uses this feature bit to determine whether an LE connection to the peer device is possible.

    Regards,
    Gigi Joseph.
  • It appears that we should have both of these bits set.  Is that correct?

    Why would a remote device need to know if simultaneous connections are supported in the local host and/or the local controller (vs a single bit that indicated YES/NO support of simultaneous LE and BR connections)?  It what case does the remote device not have to check the value of both bits?  The Android connection is behaving as desired when either bit is set.

  • So, it seems that we should have both of these bits set. Is that correct?

    Why would a remote device need to know if simultaneous connections are supported in the local host and/or the local controller (vs a single bit that indicates YES/NO support of simultaneous connections)? In what case does the remote device not have to check the value of both bits? The Android connection is behaving as desired when either bit is set.
  • Hi Andrew,

    It depends on your usecase - if your need is to enable connections to only LE , then these bits must not be set.

    Regards,
    Gigi Joseph.
  • Andrew,

    The 4.0 spec says that the remote device should use the "Simultaneous LE and BR/EDR to Same Device Capable (Host)" flag and ignore the controller flag, however, the 4.1 spec states the only possible values for this are 0x00, and that the remote device should ignore both flags. It appears that simultaneous BR/EDR/LE connections isn't allowed in the 4.1 spec, however, the spec also says that "It is optional to support both physical transports simultaneously to the same remote device.", so that's not the case either. I submitted a ticket to the SIG for clarification on this. I'll update you if I hear anything from them.

    As the spec states (4.0 & 4.1) for the "Simultaneous LE and BR/EDR to Same Device Capable (Controller)" bit: "The local Host uses this feature bit to determine whether the Controller is capable of supporting simultaneous LE and BR/EDR connections to a remote device." i.e. the local host uses this information to know if the controller supports simultaneous LE and BR/EDR connections.

    As for your problem, did you try clearing the BR/EDR Not Supported flag and leaving the simultaneous connections flags both 0? That alone might be enough.

    Thanks,
    Samuel
  • Thanks for your response.

    If we don't set any of the three flags, then things work as desired.