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

BLE RELAY EXAMPLE

hello support  team

nRF52 DK , Mesh 2.01

I am trying Experimental BLE RELAY example.

1. In first trial I am using 1 RELAY DK  all works well.

2.In second Trial I am using 3 RELAY DK  nothing happens at collector side

Any check list how can debug or check . nRF connect showing no services.

Parents
  • Hi,

    The BLE Relay Example is a multirole example, where the relay acts both as central and as peripheral. It acts as central in order to scan for and connect to a heart rate sensor and to a running speed sensor. It acts as peripheral in order for a collector to connect to it. It relays the heart rate values and the running speed values from the sensors to the collector, without doing any calculations on them.

    The relay example can connect to one heart rate sensor and one running speed sensor, and it can be connected to from a collector. Our heart rate sensor and running speed sensor examples connect to one central, which means they connect to one relay only.

    If you need more connections than that then you must modify the example. For how to do multiple connections you may have a look at the multiperipheral eample and the (central) multi-link example. The current SoftDevices allows for up to 20 connections total.

    Regards,
    Terje

     

  • Hi everyone, am about to start this project; using Experimental: BLE Relay Example.

    Can i just verify whether the relay (ie Node B) carry it own sensor as well? i understand the relay help to collect data from its peripheral(Node A) then send to collector(aka central).

    As gathered here, the relay can be both peripheral and central. Am i right to say, the collector will collect two set of data, from Node A and Node B each?

  • Hi,

    The BLE Relay Example only relays sensor data. Yes, it can collect from one heart rate peripheral and from one running speed peripheral, and relay that to one central.

    You may of course modify the example as you wish, for instance let sensor readings originate from the relay device. Note that the BLE peripheral examples in the SDK does not use sensors, they show the BLE side of things and only emulate sensor data. Connecting an actual sensor and writing the sensor related code is something you would have to do yourself.

    Regards,
    Terje

  • Hi tesc, Thanks for your prompt reply. 

    i understand i have to write my own sensor related code for the sensor to work on the relay.

    Can i just verify whether the collector (central) in BLE Relay Example; or any other example, able to collect sensor data from two individual two nodes? For my case, Node A - a peripheral with a sensor and Node B - a relay with another same sensor.

    Is the collector refer to, in this case, either another board or android phone?

    Rgds

  • Hi,

    In the BLE Relay Example, "collector" refers to any device implementing the Collector role for the Heart Rate Profile. That profile is specified by the Bluetooth SIG.

    For instance, you can use our BLE Heart Rate Collector Example. That example only connects to one peripheral. To see how to connect to multiple peripherals you can have a look at our BLE Multi-link Example.

    Regards,
    Terje

Reply Children
  • Hi Terje,

    Thanks for your prompt reply again. Noted there is a spec on Collector role. i will look into it. 

    Let me try to be more specific here, at least for the other parts of my question. 

    My first question is whether a "relay" node able to carry its own senor data while he perform the role as a "relay". From this diagram, it seem there are two nodes each has its own sensor. To put it simpler, we say, there is only one sensor, HR, on each node. 

    My second question is whether this "collector" node in BLE Relay Example able to receive sensor data from both peripheral and relay. Please note there are two set of data going to collector but only one connection. If this is possible, can you briefly explain how?

    i suppose my third questions arise when you provide me the idea of a multi-link collector. Can i have a few more "relay", not just more peripherals, to be connected to a collector?

    Appreciate your kind advice soon, pls.  

  • Hi,

    From what I understand, the device should only provide one data set through one service. That means if it should both generate data itself and relay data from a different device it should provide that as two separate services.

    Then in question 2 it becomes a new question if the collector is getting two sets of data from the relay, or if it is connected to two different peripherals at the same time, getting one set of data from each. Both alternatives should be possible.

    I am not quite sure what you mean in question 3. Can you elaborate?

    Regards,
    Terje

  • From the diagram we can see there are three devices and each played a different role. 

    Understand a peripheral device provides its sensor data, and it is pass to relay. Can the relay device generate (connected with same kind of sensor) its own data, and then pass packet 1 (eg HR 110bpm) from peripheral, and packet 2 (HR 70bpm) of itself, to the collectorCan a collector collects these two packets?

    Let me elaborate Q3 (same coin different side). For example, we have 6 devices, and each is connected to same kind of HR sensor. We will like to program 3 of these devices to measure HR as peripherals and it is connected to a relay_A. And another 2 devices is also programmed to measure HR as peripherals but these two pass data to relay_B. The last device is used to collect two 5 sets of data, 3 sets from relay_A and 2 sets from relay_B. Is this possible as we used our multi-peripheral, multi-link, and relay combine?

  • Hi,

    According to the Heart Rate Profile (found in list of GATT Specifications from bluetooth.com), "The Heart Rate Sensor shall instantiate one and only one Heart Rate Service" This means the peripheral and the relay can only provide one instance of the Heart Rate Service, and so you cannot relay measurements in one service and provide measurements from the relay in another service.

    There are no such limitations on the Collector Role, so you could rewrite the collector to connect to and collect data from all 6 Heart Rate Sensors directly.

    Another alternative could be to use a custom service for the relay, for sending heart rate measurements from multiple devices. You can do that if you control the relay and the collector, so that you can make a vendor specific service for that.

    Regards,
    Terje

Related