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

Starting a BLE project

Hello!

I'm pretty new to BLE and Nordic, and hope that someone can give me some good advice.

I'm working on a project were I have 2-4 sensors, each connected to a nRF52832. When one of the different sensors is triggered I want them to transmitt this information over BLE to a central nRF52DK.

I need some advice on the best way to do this. I was thinking of using the nRF52832 as beacons, and make them advertise when a sensor has been triggered, but I don't know if this is the best solution. There isn't any data that needs to be transfered, the central only needs to know if a sensor has been triggered and which sensor. I'm guessing the the central can find out which sensor has been triggered depending on the address or ID of the transmitting nRF52832.

I'm using s132.

What is the best setup of the BLE(peripheral and central), what is the best way to identify the different peripherals and are there any good examples for this?

Hope that someone can help. Many thanks!

Parents
  • Hi,

    The solution you propose with beacons and a scanning central could be used, but it will only give you one-way, unreliable communication. A central/scanner is not guaranteed to receive every advertising packet transmitted by a periheral, and the peripheral will not get any feedback if the packet was received by any devices. The central will also have to continuously scan for peripherals, giving it a high current consumption. More details about how advertising and scanning works, can be read in this blogpost.

    If you have a static environment with only 2-4 peripheral devices, I would recommend going for connections. The latest S132 softdevice v4.0.2 support up to 20 connections as a central. On the peripheral side, you can implement a custom service for the sensor value, and transmitt this to the central using notifications. This will make sure the central receives every sensor value. I would recommend going through the BLE tutorials here on DevZone to learn how to implement custom services/characteristics, and learn more about BLE development in general. A multilink central example is available in our SDK, but you will have to do some modifications to support your own services.

    Best regards,

    Jørgen

Reply
  • Hi,

    The solution you propose with beacons and a scanning central could be used, but it will only give you one-way, unreliable communication. A central/scanner is not guaranteed to receive every advertising packet transmitted by a periheral, and the peripheral will not get any feedback if the packet was received by any devices. The central will also have to continuously scan for peripherals, giving it a high current consumption. More details about how advertising and scanning works, can be read in this blogpost.

    If you have a static environment with only 2-4 peripheral devices, I would recommend going for connections. The latest S132 softdevice v4.0.2 support up to 20 connections as a central. On the peripheral side, you can implement a custom service for the sensor value, and transmitt this to the central using notifications. This will make sure the central receives every sensor value. I would recommend going through the BLE tutorials here on DevZone to learn how to implement custom services/characteristics, and learn more about BLE development in general. A multilink central example is available in our SDK, but you will have to do some modifications to support your own services.

    Best regards,

    Jørgen

Children
Related