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

How to send message from two slave to one master in nRF52

I hope to send a message from two slave to one master using nRF52 through bluetooth.

I send a message from a slave to a master with ble_app_uart_c and ble_app_uart. And I also connected two slave and one master with ble_app_multilink_central and peripheral. But I can't combine and apply that two case.

So please tell me how to send a message in multilink code, or how to use ble_app_uart as multilink.

I also found some information on internet, but I can't understand with them.

Parents
  • FormerMember
    0 FormerMember

    Yes,  on_ble_evt() is the same as ble_evt_handler(). 

    The steps above is based on SDK 12 or 13.

    From SDK 14.0.0, ble_evt_dispatch() was replaced by NRF_SDH_BLE_OBSERVER().

  • On the newest status, I've got 1 Error in Keil:

     error:  #167: argument of type "ble_nus_c_t (*)[8]" is incompatible with parameter of type "ble_nus_c_t *"

    The line is: ret_val = ble_nus_c_string_send(&m_ble_nus_c, data_array, index);

    Thats my code: 

    Fullscreen
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    I don't understand this error 100%, is it because it can't match the pointers? 

    Thanks for your help :)

  • hi kristin ,

         i am implementing osde for gps clock master and slave communication  one master and no of slave ..  which example should i take to to comuanicate  those devices . actually am tested with 

    ble_app _uart();  in this code master sending the data to app (nrf connect), but i want to sen data another  ble.  

  • Hello kishorsherolla,

    If I have understood you question correctly, you might be looking for the BLE Multilink Central example from the SDK. The example demonstrates how one central can be connected to several peripherals simultaneously.

    Please note that the comment you are replying to is over 3 years old. I would recommend that you write a new ticket with your question, in order to get a more detailed answer to your question in addition to keeping the forum easy to navigate.

    Best regards,
    Karl

  • Hello Karl, 

    could we solve this problem now? 

    Did anything changed in the last 3 years (I hope ^^) ?

    Does a clear instruction or a simple example exist which does nearly the same as I wanted to do then? The BLE Multilink Central example does the connection but how to send data like a string between the devices?? 

    Best Regards, 

    MootSeeker

  • Hello MootSeeker,

    MootSeeker said:
    Did anything changed in the last 3 years (I hope ^^) ?

    Certainly there has been a great deal of welcome changes in the last three years, absolutely! :)

    MootSeeker said:
    Does a clear instruction or a simple example exist which does nearly the same as I wanted to do then? The BLE Multilink Central example does the connection but how to send data like a string between the devices?? 

    Unfortunately, we still do not provide a multilink central example with the NUS service in the SDK..
    I would say that the detailed instruction provided by Kristin in her previous replies here still holds, and they are probably the easiest way to achieve this functionality..
    But! Your magnificent patience with this should not have been in vain, so I'll do some digging to see if I cant find somebody who's made such a demonstration in this 3 year timespan - I'm certain that you are not the first nor last to have asked for this exact merge.

    I am out of office the first two days of next week, but I'll ask around and talk to some colleagues now and hopefully I'll have something to show for it when I return to office.

    Best regards,
    Karl

Reply
  • Hello MootSeeker,

    MootSeeker said:
    Did anything changed in the last 3 years (I hope ^^) ?

    Certainly there has been a great deal of welcome changes in the last three years, absolutely! :)

    MootSeeker said:
    Does a clear instruction or a simple example exist which does nearly the same as I wanted to do then? The BLE Multilink Central example does the connection but how to send data like a string between the devices?? 

    Unfortunately, we still do not provide a multilink central example with the NUS service in the SDK..
    I would say that the detailed instruction provided by Kristin in her previous replies here still holds, and they are probably the easiest way to achieve this functionality..
    But! Your magnificent patience with this should not have been in vain, so I'll do some digging to see if I cant find somebody who's made such a demonstration in this 3 year timespan - I'm certain that you are not the first nor last to have asked for this exact merge.

    I am out of office the first two days of next week, but I'll ask around and talk to some colleagues now and hopefully I'll have something to show for it when I return to office.

    Best regards,
    Karl

Children
  • NUS Service? Need to read about that but I think I never heard that. 

    But a thing that I could do in that time... which SDK should I use with the NRF52 devices? 

    With that info I could read me back in the topic Slight smile

  • MootSeeker said:
    NUS Service? Need to read about that but I think I never heard that. 

    NUS service is the Nordic UART Service(NUS) which we have created for the Nordic UART Central and peripheral examples in the SDK.

    MootSeeker said:
    But a thing that I could do in that time... which SDK should I use with the NRF52 devices? 

    In general I would always recommend familiarizing with the latest SDK version when starting a new project, but I just heard back from a colleague that told me he might have a working implementation for SDK v.15.2.0 - so you might want to download that as well.

    I will look into this implementation on Wednesday, and I'll let you know as soon as I've tested it.

    Best regards,
    Karl

  • Hello again Mootseeker,

    I tested the example I received from my colleague, but it seems to require some more tweaking before it is ready to go.
    I'll see what I can do in the coming days, thank you for your patience.

    Best regards,
    Karl

  • Hi Karl, 

    nice to hear that you are working on. I Started to download the right SDK and reading the dokumentation. 
    When I started this post I was working with the NRF52832. Today I have the NRF52840 bords this should not be a problem or should I use the others? 

  • Hello again Mootseeker,

    Thank you for your extreme patience with this matter :)
    I have finally had some time to sit down with this, and now it is up and running!

    To test the example you will need to build and flash it to the nRF52840 DK, and have 2 or more devices flashed with the unmodified BLE UART peripheral example.
    The central scans for devices advertising as Nordic_UART, and connects if any if found.
    The original multilink_central code is commented out, but left present, to emphasize how the example is modified. The original behavior of the multilink example is thus not present, since it is replaced by the NUS example's behavior.
    When connection is established between the peripheral and the central, you can write to the peripheral from a serial terminal, and see that it is received by the NUS central as expected. Please be advised that the central logs to RTT, so you will need either the RTT Viewer application or the SES debug terminal to see the received payload.

    Please see the attached project for the nRF52840 DK. The example is made for the nRF5 SDK v.15.2.0. You will need to unzip the project to the path SDK_ROOT/examples/ble_central/

    Hope this helps!

    Best regards,
    Karl