Open ladislas opened 2 years ago
Discussed in off, one obstacle of this is to determine "when" should the robot be colored to be recognized?
A possible solution is to explore the use of scan in BLE (ScanResponse): When device advertises, only a limited byte is broadcast. However, there can be a lot more if another device request "more" bytes in broadcasting. This type of request can be detected in OS and trigger an animation.
Source: Gap Class Reference (mbed) / Advertising section
Note. Another device might also ask the robot more information, leading to some unexpected behavior.
Another approximated solution is to check some RSSI, registered devices in preference
Update. → Hardware limitation
Since the BLE module is Bluetooth v4.2 [Link], some features are not available, including notification on scan.
The feature dealing with onScanRequestReceived
[Link] is LE_EXTENDED_ADVERTISING
. It is possible to check if it is available with the following call
_gap.isFeatureSupported(ble::controller_supported_features_t::LE_EXTENDED_ADVERTISING); // In CoreGap.cpp
Note. Some other actions seems to be necessary as explained here: [AdvertisingParameters] and of course use of setScanResponse
Maybe use another way to interact with robot when not connected: IMU with a tap, Touch sensor, Microphone, a mix of all of this, etc.
Moved to Future releases
milestone https://github.com/leka/LekaOS/milestone/5
This will give us time to find a different solution.
on first boot, leka is blue when the user configures Leka for the first time, they are asked to choose a custom name for their Leka and a custom color. this allows the user to always know which Leka they are using and to easily choose amongst multiple Leka