Learn MoreFAQsTutorials

4 posts / 0 new
Last post
prasanna
Offline
Last seen:10 hours 42 min ago
加入:2020-09-29 11:56
ble_adv_demo (DA14695)

Hi,

I want to implement different advertising types with DA14695 USB board. In my application DA14695 is the peripheral and the smart phone application is the scanner. I tried to run the "ble_adv_demo" provided in the SDK. It works fine. I have some queries about this example.

  • For the advertising data, the example has used a local name "Dailog Adv Demo". When I run the application, I can see the data type as "Complete local name" in the BLE scanner. The contents of the adv_data[] variable only specifies the "GAP_DATA_TYPE_LOCAL_NAME" but not either the shortened or complete? Where are the data types mentioned in the code like the shortened (0x08) or the complete local name (0x09)?

  • What is the procedure to define our own data types like the service UUID, flags, manufaturer specific data, TX power etc in the sorce code?

  • As per my understanding, DA14695 is the client and the scanning application is the server. But, once both devices are connected, the device name is shown on the client side as "Dialog TTT Demo"? Also, what is this device name exactly saying as we already given the local name for identification?

  • There are some UUID for Device name (0x2A00), appearance (0x2A01) etc which are characteristics on the client side. Are these characteristics are displayed by default? If we want to give new services/characteristics where we have to define in the source code?

  • 对于外围设备/从站的连接参数更新请求,存在定时器(在Change_evt_gap_connected(ble_evt_gap_connected_t * EVT)函数“)设置为5秒后,在连接后,为什么我们需要这个计时器?

Thanks in advance

Device:
PM_Dialog
Offline
Last seen:5 hours 14 min ago
Staff
加入:2018-02-08 11:03
Hi Prasanna,

Hi Prasanna,

  1. Please take a look at theDA1469x Tutorial Advertising Conceptsan dread section 2. You will find an example as well.
static const uint8_t adv_data[] = { 0x14, GAP_DATA_TYPE_LOCAL_NAME, 'H', 'o', 'w', ' ', 'A', 'r', 'e', ' ', 'Y', 'o', 'u', ' ', 'T', 'o', 'd', 'a', 'y', ' ', '?' };

The first element of the array is the size of the data to be sent plus an extra character. In the given example this value should be 19 + 1 = 20 elements or 0x14 in hexadecimal format. If the wrong value is given, it is likely that Bluetooth low energy device will not advertise at all. So, care must be taken when calculating this value.

The GAP Advertising Data Types, as defined by Bluetooth Core 4.2 specification can be found in gap_data_type_t structure in ble_gap.h.

  1. 的GAP_DATA_TYPE_MANUFACTURER_SPEC should be used for the Manufacturer Specific Data. Again you should follow the concept from the GAP_DATA_TYPE_LOCAL_NAME. For creating a custom service and define your own UUIDs please refer toDA1469x Tutorial Advertising Concepts.
  2. To be honest I am not able to understand you question so please clarify it. If the DA14695 is running the ble_adv example, then it is configured as a Peripheral device, so it advertises and a peer device acting a Central device can connect into it.
  3. Please clarify this question too. Can you please point me in the source code?
  4. The answer can be found inDA1469x Tutorial Advertising Concepts. Please read step 5 from the section 2.

Thanks, PM_Dialog

prasanna
Offline
Last seen:10 hours 42 min ago
加入:2020-09-29 11:56
Hi PM_Dialog,

Hi PM_Dialog,

Please find the screenshot attched for my 3rd and 4th queries.

Third question

In the screenshot we can see once the peripheral and scanner are conected we can see their various services of both client(smart phone) and the server(DA14695). So, here what I didn't understand is: There is a property Device name with value "Dialog TTT Perm" as we can see in the screenshot on the client side. So, the device name should be displayed on the server side. Is my assumption correct about the DA14695 as the server/peripheral and the smart phone app as the client/central device in this example.

Fourth question

In the same screenshot attached we can see the characteristics of GAP such as the 0x 2A00, 0x2A01 and 0x2A04. So, where are these characteristics defined in the SDK?

Thanks in advance

Attachment:
PM_Dialog
Offline
Last seen:5 hours 14 min ago
Staff
加入:2018-02-08 11:03
Hi There,

Hi There,

This is the Generic Access service which is created by the target application. The specific UUID is as defined by Bluetooth LE specs. Please take a look at the ATT_CHAR_DEVICE_NAME. This is a characteristic (ATT_CHAR_DEVICE_NAME = 0x2A00) and is mandatory item in the generic access service ( ATT_SVC_GENERIC_ACCESS = 0x1800). I would you to check the Bluetooth LE specs first.

Thanks, PM_Dialog