BLE advertising without being connectable

Some BLE libraries have something like
BLE.setConnectable(bool);

I am unclear how one allows a peripheral device to advertise but not be connectable?

There is BleAdvertisingEventType however no enum with SCANNABLE NOT CONNECTABLE.

Use 'BLE.setAdvertisingType()`.

Type Value
CONNECTABLE_SCANNABLE_UNDIRECTED 0
CONNECTABLE_UNDIRECTED 1
CONNECTABLE_DIRECTED 2
NON_CONNECTABLE_NON_SCANNABLE_UNDIRECTED 3
NON_CONNECTABLE_NON_SCANNABBLE_DIRECTED 4
SCANNABLE_UNDIRECTED 5
SCANNABLE_DIRECTED 6

The SCANNABLE option is what you want for scannable but not connectable even though the constant name does not explictly say that.

1 Like

@rickkas7 Thanks for confirming, not the clearest naming of an enumerator? Also, spelling correction since the enumerator is actually SCANABLE_UNDIRECTED not SCANNABLE_UNDIRECTED!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.