Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Use existing service or create a new one?

Hello all,

I am super new to BLE, and I have been using nRF5_SDK_12.3.0 ble_app_template example on a pca10040 board with SoftDevice S132 on a nice nRF52832 to create a service of my own, but I have found that even though I have already created it, I have no idea how to follow with it. I am trying to create a smart lock, which takes open/close instructions from a certified mobile app. I am in very early stages and I am trying to choose whether to create a new service or use an existing one. For this, I have identified the following desired features:

  • Power is not a constraint
  • I would like to add cryptography to send secure messages
  • Connection should be as fast as possible (is it possible to avoid pairing?)
  • Short range is desirable for improved security
  • Currently, the data flow should be the following:
    1. nRF board advertises itself
    2. Mobile app scans devices looking for devices with a particular service (either existing or new)
    3. Mobile app sends open/close encrypted message to nRF board
    4. nRF validates message and makes a decision

Now, should I use a particular existing service? If so, which one? If not, what characteristics/event handlers/attributes should my service have?

Thanks in advance!

Parents
  • Hey Arturo,

    I suggest you immediately migrate to SDK14.2. SDK12.3 is not suited for nRF52832 development. 

     

    Power is not a constraint

    -Glad to hear, this will make this easier for you, although you use-case should not need a lot of energy.

    General connection procedure: 

    - After you've connected to the device and performed a Service Discovery, you will have access to the Service UUID. You can then decide if you want to pair and bond with this new device thereby establishing an encrypted link, or disconnect from the unwanted device. Once a device has been paired and bonded you will not need to perform the pairing process again. BLE 4.2 introduced a new pairing scheme called LE Secure Connection who improves the security of the encrypted link. See Peer Manager and API documentation for more information. 

    The characteristics of a service can have certain R/W permissions that requires for example an LE Secure Connection in order for you to read or write a characteristics. This ensures that devices that are connected, but not paired cannot access your characteristics. 

    The BLE Blinky Application example is a good place to start, but you will eventually need to create your own service with a unique UUID. 

    Cheers,

    Håkon.

Reply
  • Hey Arturo,

    I suggest you immediately migrate to SDK14.2. SDK12.3 is not suited for nRF52832 development. 

     

    Power is not a constraint

    -Glad to hear, this will make this easier for you, although you use-case should not need a lot of energy.

    General connection procedure: 

    - After you've connected to the device and performed a Service Discovery, you will have access to the Service UUID. You can then decide if you want to pair and bond with this new device thereby establishing an encrypted link, or disconnect from the unwanted device. Once a device has been paired and bonded you will not need to perform the pairing process again. BLE 4.2 introduced a new pairing scheme called LE Secure Connection who improves the security of the encrypted link. See Peer Manager and API documentation for more information. 

    The characteristics of a service can have certain R/W permissions that requires for example an LE Secure Connection in order for you to read or write a characteristics. This ensures that devices that are connected, but not paired cannot access your characteristics. 

    The BLE Blinky Application example is a good place to start, but you will eventually need to create your own service with a unique UUID. 

    Cheers,

    Håkon.

Children
No Data
Related