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

multi-link central connection with thingy having issue.

hi, i am using pca10040 devkit as multi-link central device to connect with 8 nos thingy52. i am using sdk14.2.0 multi-link central example with soft device S132v5.0, i have modified multi-link central code to discover and initialize 5 thingy service 1-config service,2-weather service,3-user interface service,4-motion service,5-battery service and used uart to see outputs. basically i added all 5 db discovery functions to db_discovery_handler and in last battery service discovery handle i started to read read/write data such as thingy connection timeout,battery level,thingy name, and f.w. ver. and and after that i started to enable notification. while testing my code if i turn on all thingy one at a time it will work fine and all thingy's notification enabled. but when i reset my central device and when all thingy are available to connect my central device my central starts reading data from first connected thingy and during that new thingy gets connected and repeted till last thingy conneced and only last few nodes gets notification enabled.

please suggest me any solution how to fix if my device gets restart and all thingys are avilabe to connect.

  • Hi nikunj8086, do you have any log file available? So basically, if you turn off your central device & turn off all your Thingy:52s & then turn the central device back on & then turn on the Thingy devices one by one, the central device is able to discover all of the Thingy services of each Thingy, right? But if you turn off the central device & keep the Thingys on & turn the central device back on, the central is not able to discover all of the services & enable notifications. Is that correct?

    Have you tested this example with less peripheral Thingy devices? Does the same thing happen if you have one central pca10040 dk & two Thingy devices as peripherals?

    I have tested the multilink central example with an nrf52840pdk as the central & two nrf52832dks as peripherals & got this weird behaviour here:

    <info> app: Starting initilization of multilink example.
    <info> app: Multilink example started.
    <info> app: Start scanning for device name Blinky_DC10.
    <info> app: Connection 0x0 established, starting DB discovery.
    <info> app: Start scanning for device name Blinky_DC10.
    <info> app: Connection 0x1 established, starting DB discovery.
    <info> app: Start scanning for device name Blinky_DC10.
    <info> app: LED Button service discovered on conn_handle 0x0
    <info> app: LED Button service discovered on conn_handle 0x0
    <info> app: LED Button service discovered on conn_handle 0x0
    <info> app: LED Button service discovered on conn_handle 0x0
    <info> app: LED Button service discovered on conn_handle 0x0
    <info> app: LED Button service discovered on conn_handle 0x0
    <info> app: LED Button service discovered on conn_handle 0x0
    <info> app: LED Button service discovered on conn_handle 0x1
    
  • The LED button service for the first connected peripheral is for some reason discovered 7 times, whereas the second LED button service is discovered one time.

  • found solution.

    so basically service discovery was happening 7 time for first node and for rest of the node it will be only once.

    so i created a static variable in service discovery function and incremented it at the end of function.

    and after that i put a if condition as count variable is 1 then enable notification.

    this way all of my thingy were able to connect all at once because of discovery time is reduced for first node.

Related