coded phy concurrent connections with central

Hi All!

I am using Zephyr RTOS NCS v2.0.2.I used uart_central and uart_peripheral apps. But it Can only connect one peripheral with central at a time. Is it possible to connect the multiple peripheral connections with central like 20+ as promised by the zephyr? 

My main goal is to send the sensor data from each node/peripheral to the central. Can you please guide me in this regard?

Thanks

Regards,

Parents
  • Hi  

    I tried to compile the Multi Nus project in Vs code studio. I am using NCS V2.0.2. I got the following errors can you help me in this regard?

    urity -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:/Nordic/myapps/multi-NUS-master=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/NordicSemi/v2.0.2/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/NordicSemi/v2.0.2=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles\app.dir\src\main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj -c ../src/main.c
    ../src/main.c: In function 'uart_cb':
    c:\Nordic\myapps\multi-NUS-master\src\main.c:336:4: warning: 'k_delayed_work_submit' is deprecated [-Wdeprecated-declarations]
      336 |    k_delayed_work_submit(&uart_work,
          |    ^~~~~~~~~~~~~~~~~~~~~
    In file included from C:\NordicSemi\v2.0.2\zephyr\include\zephyr\zephyr.h:18,
                     from c:\Nordic\myapps\multi-NUS-master\src\main.c:12:
    C:\NordicSemi\v2.0.2\zephyr\include\zephyr\kernel.h:3873:19: note: declared here
     3873 | static inline int k_delayed_work_submit(struct k_delayed_work *work,
          |                   ^~~~~~~~~~~~~~~~~~~~~
    ../src/main.c: In function 'uart_work_handler':
    c:\Nordic\myapps\multi-NUS-master\src\main.c:396:3: warning: 'k_delayed_work_submit' is deprecated [-Wdeprecated-declarations]
      396 |   k_delayed_work_submit(&uart_work, UART_WAIT_FOR_BUF_DELAY);
          |   ^~~~~~~~~~~~~~~~~~~~~
    In file included from C:\NordicSemi\v2.0.2\zephyr\include\zephyr\zephyr.h:18,
                     from c:\Nordic\myapps\multi-NUS-master\src\main.c:12:
    C:\NordicSemi\v2.0.2\zephyr\include\zephyr\kernel.h:3873:19: note: declared here
     3873 | static inline int k_delayed_work_submit(struct k_delayed_work *work,
          |                   ^~~~~~~~~~~~~~~~~~~~~
    ../src/main.c: In function 'uart_init':
    c:\Nordic\myapps\multi-NUS-master\src\main.c:421:2: warning: 'k_delayed_work_init' is deprecated [-Wdeprecated-declarations]
      421 |  k_delayed_work_init(&uart_work, uart_work_handler);
          |  ^~~~~~~~~~~~~~~~~~~
    In file included from C:\NordicSemi\v2.0.2\zephyr\include\zephyr\zephyr.h:18,
                     from c:\Nordic\myapps\multi-NUS-master\src\main.c:12:
    C:\NordicSemi\v2.0.2\zephyr\include\zephyr\kernel.h:3855:20: note: declared here
     3855 | static inline void k_delayed_work_init(struct k_delayed_work *work,
          |                    ^~~~~~~~~~~~~~~~~~~
    ../src/main.c: In function 'connected':
    c:\Nordic\myapps\multi-NUS-master\src\main.c:547:16: warning: initialization of 'uint8_t (*)(struct bt_nus_client *, const uint8_t *, uint16_t)' {aka 'unsigned char (*)(struct bt_nus_client *, const unsigned char *, short unsigned int)'} from incompatible pointer type 'uint8_t (*)(const uint8_t * const,  uint16_t)' {aka 'unsigned char (*)(const unsigned char * const,  short unsigned int)'} [-Wincompatible-pointer-types]
      547 |    .received = ble_data_received,
          |                ^~~~~~~~~~~~~~~~~
    c:\Nordic\myapps\multi-NUS-master\src\main.c:547:16: note: (near initialization for 'init.cb.received')
    c:\Nordic\myapps\multi-NUS-master\src\main.c:548:12: warning: initialization of 'void (*)(struct bt_nus_client *, uint8_t,  const uint8_t *, uint16_t)' {aka 'void (*)(struct bt_nus_client *, unsigned char,  const unsigned char *, short unsigned int)'} from incompatible pointer type 'void (*)(uint8_t,  const uint8_t * const,  uint16_t)' {aka 'void (*)(unsigned char,  const unsigned char * const,  short unsigned int)'} [-Wincompatible-pointer-types]
      548 |    .sent = ble_data_sent,
          |            ^~~~~~~~~~~~~
    c:\Nordic\myapps\multi-NUS-master\src\main.c:548:12: note: (near initialization for 'init.cb.sent')
    ../src/main.c: At top level:
    c:\Nordic\myapps\multi-NUS-master\src\main.c:749:3: error: 'struct bt_conn_auth_cb' has no member named 'pairing_complete'
      749 |  .pairing_complete = pairing_complete,
          |   ^~~~~~~~~~~~~~~~
    c:\Nordic\myapps\multi-NUS-master\src\main.c:749:22: warning: excess elements in struct initializer
      749 |  .pairing_complete = pairing_complete,
          |                      ^~~~~~~~~~~~~~~~
    c:\Nordic\myapps\multi-NUS-master\src\main.c:749:22: note: (near initialization for 'conn_auth_callbacks')
    c:\Nordic\myapps\multi-NUS-master\src\main.c:750:3: error: 'struct bt_conn_auth_cb' has no member named 'pairing_failed'
      750 |  .pairing_failed = pairing_failed
          |   ^~~~~~~~~~~~~~
    c:\Nordic\myapps\multi-NUS-master\src\main.c:750:20: warning: excess elements in struct initializer
      750 |  .pairing_failed = pairing_failed
          |                    ^~~~~~~~~~~~~~
    c:\Nordic\myapps\multi-NUS-master\src\main.c:750:20: note: (near initialization for 'conn_auth_callbacks')
    [78/234] Linking C static library zephyr\arch\arch\arm\core\aarch32\cortex_m\libarch__arm__core__aarch32__cortex_m.a
    [79/234] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/rb.c.obj
    [80/234] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/heap-validate.c.obj
    [81/234] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/heap.c.obj
    [82/234] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/bitarray.c.obj
    [83/234] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/assert.c.obj
    [84/234] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/reboot.c.obj
    [85/234] Building C object zephyr/CMakeFiles/zephyr.dir/soc/arm/nordic_nrf/validate_base_addresses.c.obj
    [86/234] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_complete.c.obj
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'c:\NordicSemi\toolchains\v2.0.2\opt\bin\cmake.EXE' --build 'c:\Nordic\myapps\multi-NUS-master\build'

    Thanks & Regards,

  • Hi, 

    That example project is based on NCS v1.4.1. You cannot just download and build it under NCS v2.0.2. I would suggest you use v2.0.2 Bluetooth: Central UART sample, and modify it refer to the tutorial. 

    Regards,
    Amanda

  • Hi,

    Thank you for the expert opinion, sure I will go through the process.

    Thanks & regards,

    Muhammad Usman

  • Hi Amanda!

    Is it possible to add the coded PHY feature into the multi-nus? In the end, coded PHY connectable concurrent connections.

    Can you please guide me in this regard?

    Thanks,

Reply Children
No Data
Related