From: Michal Pawluk
For peer device identification purpose its remote name is used, so the bt_le_get_adv_device_name() function is called in order to extract
it from the advertisement message. The obtained name is then stored (__add_found_le_device()) and further used to identify the remote device.
-Finally, the entire advertisement message is processed for any additional information acquisition (__adv_data_process()).
+Each remote device is represented by a custom bt_le_device_info_s structure referenced by the
+dev_info variable created internally by the __add_found_le_device()
+function. The mentioned structure is described below and maintained by the model module. Finally, the entire advertisement message is processed for any additional information acquisition
+(__adv_data_process() - refer to the Discovered device's details acquisition section for details).
+
+Once the devices are discovered, their detailed information can be acquired from the advertisement message (refer to the __bt_le_scan_cb()
+callback function described in the Devices discovery section).
+struct _bt_le_device_data {
+ /* The size of the service's data. */
+ int size;
+ /* The UUID of the service's that the data is carried - integral value. */
+ int uuid_value;
+ /* The UUID of the service's that the data is carried - hexadecimal representation. */
+ char *uuid;
+ /* The service's data. */
+ char *data;
+};
+
+typedef struct _bt_le_device_data bt_le_device_data_s;
+
+/* The structure below carries all the peer's related information. */
+struct _bt_le_device_info {
+ /* Device's name. */
+ char *name;
+ /* Transmition power level. */
+ int tx_power_level;
+ /* Device's external appearance identifier. */
+ int appearance;
+ /* Device's manufacturer identifier. */
+ int manufacturer_id;
+ /* The number of exposed services. */
+ int services_count;
+ /* The number of exposed solicitation services. */
+ int services_solicitation_count;
+ /* The number of exposed services' data. */
+ int service_data_count;
+ /* The UUIDs of exposed services. */
+ char **services;
+ /* The UUIDs of exposed solicitation services. */
+ char **services_solicitation;
+ /* The data binded to the services exposed. */
+ bt_le_device_data_s *service_data;
+};
+
+typedef struct _bt_le_device_info bt_le_device_info_s;
+
+
+Discovered device's details acquisition
+
+
@@ -311,12 +363,13 @@ The bt_le_get_adv_{a
Finally, the user interface is updated with view_main_update_peer_info() function to reflect received data.
Once the devices are discovered and the list is populated with available advertisers, the user is able to select one from all discovered peers. After selection, the UI is changed to the device's detailed view where the