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: 

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

    Thanks for your help :)

  • When I add a [0] I've got 8 errors. 

    Code Line: ret_val = ble_nus_c_string_send(&m_ble_nus_c[0], data_array, index);

    Errors: 

    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol app_uart_get (referred from main.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol app_uart_init (referred from main.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol ble_nus_c_handles_assign (referred from main.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol ble_nus_c_init (referred from main.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol ble_nus_c_on_ble_evt (referred from main.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol ble_nus_c_string_send (referred from main.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol ble_nus_c_tx_notif_enable (referred from main.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol ble_nus_chars_received_uart_print (referred from main.o).

  • FormerMember
    0 FormerMember in reply to MootSeeker

    All necessary files have to be included in the project. It may for example be useful to have a look at this thread.

  • 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

Reply
  • 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

Children
  • 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

  • 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