Reputation: 101
I have a Bluetooth Low Energy device(smartwatch) that works on BLE v4.1 and am developing an Android application for the same.
I have basic understanding related to BLE PHY but couldn't find anything related to PHY LE 1M and PHY LE 1M MASK. There is a brief here in Android app about PHY_LE_1M and PHY_LE_1M_MASK but couldn't understand it well.
Can you please share some details related to the same? I want to use it in connect method here.
Also what is the default selection in Android if not specified and do I have to specify the same? Main concern is because the device in BLE v4.1 and commonly used BLE in phones are v4.2 and v5.0 as I have found for now.
Upvotes: 3
Views: 1428
Reputation: 78835
The easiest approach is probably to pass 0 as the phy
parameter (the same as passing PHY_OPTION_NO_PREFERRED
, which evaluates to 0 as well).
If you want to specify an explicit transmission mode, use PHY_LE_1M_MASK
as it is the only one supported by BLE 4. The other ones have been introduced with BLE 5.
The constants ending in _MASK
seem to be for use in connectGatt
while the constants without _MASK
are for use in onPhyUpdate
.
I don't know what the default transmission mode / PHY is. It might be LE 1M, or it might be determined once more information about the BLE device is available.
Upvotes: 4