This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Read BLE Characteristics values of an nRF52-based commercial product with nRF52-DK

Hi,

I need to read some BLE characteristics presented by a commercial device nRF52-based, using my nRF52-DK, based on the nRF52832 and PCA10040. I don't have the firmware of this product, so I haven't the basic configurations of the connection. I use SDK17.0.2 and SoftDevice s132.

I can access to all BLE services and characteristics of the product using my phone and the CheckBlue App (only after the bonding and using the correct authentication code, that I know)

Is it possible to extract in some way all the basic information about the connection parameter configuration of the product, in order to develop the suitable firmware capable of connecting to the device, bonding, and reading all the characteristics, using the UUIDs that I can read with the app?

What type of UUIDs should I use in my firmware ( BLE_UUID_TYPE_VENDOR_BEGIN defined in the ble_types.h file)?

Which example of the SDK17.0.2 is a good starting point to develop my application?

Attached you can find some UUID of the characteristics, and services that I can read from CheckBlue App.

Thank you so much in advance,

Best Regars

Parents
  • Hi Ninochila, 

    If you are planning to connect and communicate with a particular device, meaning you know the UUID prior to the connection you can simply add the UUID base into the softdevice and use the ble_db_discvery library to discovery the attribute table. 
    The best source of reference for you would be the ble_app_uart_c example inside ble_central. 

    Please get familiar with the ble_app_uart_c (as central) and the ble_app_uart (as peripheral) and check how the NUS UUID base is added and how the characteristics share the same base as the service. 

  • Thank you so much! The examples are very clarifing about che UUID management! 

    And what about the connection parameters that I should use? It looks like the ble_nus examples don't require any type of authentication codes before starting the connection and exchanging data between the peripheral and the central. Is there a quick way to enable some type of "encryption" (sorry if the term is not adequate), in this examples? Or should I look to other types of examples?

    The last problem is that to access to the characteristics via CheckBlue I have to enter a password, otherwise I can't read any value (only their UUIDs), so I need to develop a firmware capable of sending that password to the commercial product nRF52-based, before accessing to characteristics and services.

    Thank you, best regards.

    Antonino

  • Hi Antonio, 

    1. I assume you are asking about pairing/bonding so that the link will be encrypted. For that you can have a look a the ble_app_hrs_c example. In the example you can find it will make a call pm_conn_secure() after the service has been discoverred (BLE_HRS_C_EVT_DISCOVERY_COMPLETE event). 

    2. Yes you can implement in your code to execute a write to send the "password" 

    I would suggest to get familar with the nRF Sniffer tool . It's a very useful tool to study the protocol and to debug your application. 

Reply
  • Hi Antonio, 

    1. I assume you are asking about pairing/bonding so that the link will be encrypted. For that you can have a look a the ble_app_hrs_c example. In the example you can find it will make a call pm_conn_secure() after the service has been discoverred (BLE_HRS_C_EVT_DISCOVERY_COMPLETE event). 

    2. Yes you can implement in your code to execute a write to send the "password" 

    I would suggest to get familar with the nRF Sniffer tool . It's a very useful tool to study the protocol and to debug your application. 

Children
No Data
Related