From: Michal Pawluk Date: Tue, 5 Jan 2016 09:33:00 +0000 (+0100) Subject: [SAMPLE APP][Bluetooth LE Collector] Discovered device's service data acquisition... X-Git-Tag: tizen_3.0/TD_SYNC/20161201~210^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6cdd4a50999a8e8f3096cd01571bf16f4b396725;p=sdk%2Fonline-doc.git [SAMPLE APP][Bluetooth LE Collector] Discovered device's service data acquisition section added Change-Id: I941a8988765337729de159907a83a56e3018b2e1 Signed-off-by: Michal Pawluk --- diff --git a/org.tizen.sampledescriptions/html/mobile_n/bluetooth_le_collector_sd_mn.htm b/org.tizen.sampledescriptions/html/mobile_n/bluetooth_le_collector_sd_mn.htm index 8ffa74f..ed6ff6d 100644 --- a/org.tizen.sampledescriptions/html/mobile_n/bluetooth_le_collector_sd_mn.htm +++ b/org.tizen.sampledescriptions/html/mobile_n/bluetooth_le_collector_sd_mn.htm @@ -369,21 +369,12 @@ All the acquired information is binded to the remote device name (view_main_update_peer_info() function to reflect received data.

-

Discovered device's details acquisition and browsing

+

Discovered device's service data acquisition

-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 -following information is displayed: -

-All the above information is gathered by __bt_le_scan_data_process() function invoked from the -__bt_le_scan_cb() callback function on scan response message received event (for details see the -Devices discovery section). +The device's service data acquisition procedure is very similar to that described in Discovered device's details acquisition section. The process starts in +__bt_le_scan_cb() callback function (refer to the Devices discovery section) with the +__bt_le_scan_data_process() function invocation.

@@ -425,9 +416,12 @@ When a scan response message is received, then one has to obtain the sender's na
 it is already registered (__bt_le_is_device_registered()). If a received message concerns the registered and selected device, the
 received data is processed further by __scan_data_process() function. The scan response message may contain the same information set
 as the advertisement message extended with the service/solicitation service data.
-
-This function's implementation is very similar to __adv_data_process() (see the Devices discovery section). -The only difference concerns the service's data acquisition (bt_le_get_scan_service_data_list()) and its storage in model's structure +

+ +

+This function's implementation is very similar to __adv_data_process() (see the +Discovered device's details acquisition section). The only difference concerns the service's data acquisition +(bt_le_get_scan_service_data_list()) and its storage in model's structure (model_set_device_data()).

@@ -491,10 +485,15 @@ static void __scan_data_process(bt_adapter_le_device_scan_result_info_s *info, b

-If the number of services/solicitation services is non-zero, then the 'Check' button in device's detailed view becomes enabled. Once clicked, the popup with a list of all available services/solicitation -services exposed by the advertiser appears. -
-All the acquired information is binded to the previously obtained remote device name and stored internally for further use. +In contrast to __adv_data_process() function (see the Discovered device's details acquisition section), +the bt_le_get_scan_{scan_info_name}() functions are invoked to acquire the same set of information as from the advertisement +message extended with service's data acquisition (bt_le_get_scan_service_data_list()). +

+ +

+All the acquired information and service's data is binded to the remote device name (model_set_device_info() and +model_set_device_data(), respectively) previously obtained and referenced by the +dev_info variable.
Finally, the user interface is updated with view_main_update_peer_info() function to reflect received data.