nRF5340 BLE DFU from NET core

Hello! 
Introduction. Responsibilities of the cores in my device:
1. app core. 
1.1. data processing from a stereo microphone
1.2. data sending to net core.
2. net core. 
2.1. ble communication, services supporting. 
2.2. data receiving from app core.

Everything works fine :)
But now I want to add BLE DFU )

As I understood from examples, I should use app core for smp server, so I should use ble communication support on app core, which changes my whole architecture.

Could please anyone help me with that situation? :)

Parents
  • Hi,

    What you want to do is not the standard way to do stuff, so it is not supported or tested.

    However, it can be done.

    First, tell me: Do you want to update both cores?

    How large is your network core application?

    Regards,
    Sigurd Hellesvik

  • For both cores:

    [192/196] Linking CXX executable zephyr\cpuapp.elf
    Memory region    Used Size      Region Size   %age Used
    FLASH:               85552 B         1 MB              8.16%
    RAM:                  399824 B        448 KB          87.15%
    IDT_LIST:           0 GB               2 KB              0.00%

    [210/210] Linking C executable zephyr\cpunet.elf
    Memory region    Used Size       Region Size  %age Used
    FLASH:               254588 B        256 KB          97.12%
    RAM:                  56096 B           64 KB           85.60%
    SRAM1:              0 GB                64 KB           0.00%
    IDT_LIST:            0 GB               2 KB              0.00%

  • 3730.throughput_test.zip

    1. Connect to it with the Android app nRF Connect and enable notifications.

    2. Press button 1

    3. Watch logs

  •   could you please specify which version of sdk should I use to build your project?  

  • I tested with v3.0.0 yesterday, if I remember correctly

  • I tested with my phone (nrf Connect).
    I got about 300kbps. 

    00> [00:00:58.365,325] <inf> app: att MTU updated to 23 bytes
    00> [00:00:58.365,417] <inf> app: Connected
    00> [00:00:58.504,089] <inf> app: att MTU updated to 498 bytes
    00> [00:00:59.089,263] <inf> app: Connection paramaters updated.
    00>  - Interval: 7.50 ms
    00>  - Latency: 0
    00>  - Timeout: 5000 ms
    00> [00:00:59.299,133] <inf> app: att MTU updated to 498 bytes
    00> [00:00:59.344,207] <inf> app: Connection paramaters updated.
    00>  - Interval: 48.75 ms
    00>  - Latency: 0
    00>  - Timeout: 5000 ms
    00> [00:01:03.788,055] <inf> app: Connection paramaters updated.
    00>  - Interval: 30.0 ms
    00>  - Latency: 0
    00>  - Timeout: 4000 ms
    00> [00:01:07.991,790] <inf> app: Notifications enabled
    00> [00:02:23.094,390] <inf> app: Notification size : 495
    00> [00:02:23.094,451] <inf> app: Starting file transfer
    00> [00:02:26.066,711] <inf> app: Sent 102400 bytes (100 KB) in 2972 ms at 275 kbps
    00> [00:03:09.662,048] <inf> app: Notification size : 495
    00> [00:03:09.662,109] <inf> app: Starting file transfer
    00> [00:03:12.376,342] <inf> app: Sent 102400 bytes (100 KB) in 2714 ms at 301 kbps
    00> [00:03:26.161,773] <inf> app: Notification size : 495
    00> [00:03:26.161,834] <inf> app: Starting file transfer
    00> [00:03:29.299,591] <inf> app: Sent 102400 bytes (100 KB) in 3138 ms at 261 kbps
    00> [00:03:33.407,867] <inf> app: Notification size : 495
    00> [00:03:33.407,928] <inf> app: Starting file transfer
    00> [00:03:36.275,268] <inf> app: Sent 102400 bytes (100 KB) in 2868 ms at 285 kbps
    00> [00:04:59.489,074] <inf> app: Notification size : 495
    00> [00:04:59.489,135] <inf> app: Starting file transfer
    00> [00:05:02.423,004] <inf> app: Sent 102400 bytes (100 KB) in 2933 ms at 279 kbps
    00> [00:05:10.600,555] <inf> app: Notification size : 495
    00> [00:05:10.600,616] <inf> app: Starting file transfer
    00> [00:05:13.646,728] <inf> app: Sent 102400 bytes (100 KB) in 3046 ms at 268 kbps
     

Reply
  • I tested with my phone (nrf Connect).
    I got about 300kbps. 

    00> [00:00:58.365,325] <inf> app: att MTU updated to 23 bytes
    00> [00:00:58.365,417] <inf> app: Connected
    00> [00:00:58.504,089] <inf> app: att MTU updated to 498 bytes
    00> [00:00:59.089,263] <inf> app: Connection paramaters updated.
    00>  - Interval: 7.50 ms
    00>  - Latency: 0
    00>  - Timeout: 5000 ms
    00> [00:00:59.299,133] <inf> app: att MTU updated to 498 bytes
    00> [00:00:59.344,207] <inf> app: Connection paramaters updated.
    00>  - Interval: 48.75 ms
    00>  - Latency: 0
    00>  - Timeout: 5000 ms
    00> [00:01:03.788,055] <inf> app: Connection paramaters updated.
    00>  - Interval: 30.0 ms
    00>  - Latency: 0
    00>  - Timeout: 4000 ms
    00> [00:01:07.991,790] <inf> app: Notifications enabled
    00> [00:02:23.094,390] <inf> app: Notification size : 495
    00> [00:02:23.094,451] <inf> app: Starting file transfer
    00> [00:02:26.066,711] <inf> app: Sent 102400 bytes (100 KB) in 2972 ms at 275 kbps
    00> [00:03:09.662,048] <inf> app: Notification size : 495
    00> [00:03:09.662,109] <inf> app: Starting file transfer
    00> [00:03:12.376,342] <inf> app: Sent 102400 bytes (100 KB) in 2714 ms at 301 kbps
    00> [00:03:26.161,773] <inf> app: Notification size : 495
    00> [00:03:26.161,834] <inf> app: Starting file transfer
    00> [00:03:29.299,591] <inf> app: Sent 102400 bytes (100 KB) in 3138 ms at 261 kbps
    00> [00:03:33.407,867] <inf> app: Notification size : 495
    00> [00:03:33.407,928] <inf> app: Starting file transfer
    00> [00:03:36.275,268] <inf> app: Sent 102400 bytes (100 KB) in 2868 ms at 285 kbps
    00> [00:04:59.489,074] <inf> app: Notification size : 495
    00> [00:04:59.489,135] <inf> app: Starting file transfer
    00> [00:05:02.423,004] <inf> app: Sent 102400 bytes (100 KB) in 2933 ms at 279 kbps
    00> [00:05:10.600,555] <inf> app: Notification size : 495
    00> [00:05:10.600,616] <inf> app: Starting file transfer
    00> [00:05:13.646,728] <inf> app: Sent 102400 bytes (100 KB) in 3046 ms at 268 kbps
     

Children
  • I forgot to say thank you for your example)
    I got more faster speed for 6400KB ! 
     

    00> [00:04:05.062,805] <inf> app: Notification size : 495
    00> [00:04:05.062,866] <inf> app: Starting file transfer
    00> [00:04:05.119,628] <inf> app: Sent 6400 bytes (6 KB) in 57 ms at 898 kbps
    00> [00:04:08.617,431] <inf> app: Notification size : 495
    00> [00:04:08.617,492] <inf> app: Starting file transfer
    00> [00:04:08.681,762] <inf> app: Sent 6400 bytes (6 KB) in 64 ms at 800 kbps
    00> [00:04:11.662,994] <inf> app: Notification size : 495
    00> [00:04:11.663,055] <inf> app: Starting file transfer
    00> [00:04:11.711,853] <inf> app: Sent 6400 bytes (6 KB) in 48 ms at 1066 kbps
    00> [00:04:14.157,989] <inf> app: Notification size : 495
    00> [00:04:14.158,050] <inf> app: Starting file transfer
    00> [00:04:14.201,965] <inf> app: Sent 6400 bytes (6 KB) in 43 ms at 1190 kbps
    00> [00:04:18.228,851] <inf> app: Notification size : 495
    00> [00:04:18.228,912] <inf> app: Starting file transfer
    00> [00:04:18.302,856] <inf> app: Sent 6400 bytes (6 KB) in 74 ms at 691 kbps
    00> [00:04:20.673,400] <inf> app: Notification size : 495
    00> [00:04:20.673,461] <inf> app: Starting file transfer
    00> [00:04:20.736,785] <inf> app: Sent 6400 bytes (6 KB) in 63 ms at 812 kbps
    00> [00:04:22.440,429] <inf> app: Notification size : 495
    00> [00:04:22.440,490] <inf> app: Starting file transfer
    00> [00:04:22.505,493] <inf> app: Sent 6400 bytes (6 KB) in 65 ms at 787 kbps
    00> [00:04:24.051,361] <inf> app: Notification size : 495
    00> [00:04:24.051,422] <inf> app: Starting file transfer
    00> [00:04:24.102,294] <inf> app: Sent 6400 bytes (6 KB) in 51 ms at 1003 kbps
    00> [00:04:25.663,970] <inf> app: Notification size : 495
    00> [00:04:25.664,031] <inf> app: Starting file transfer
    00> [00:04:25.722,351] <inf> app: Sent 6400 bytes (6 KB) in 58 ms at 882 kbps
    00> [00:04:27.015,075] <inf> app: Notification size : 495
    00> [00:04:27.015,136] <inf> app: Starting file transfer
    00> [00:04:27.145,172] <inf> app: Sent 6400 bytes (6 KB) in 130 ms at 393 kbps
    00> [00:04:28.694,244] <inf> app: Notification size : 495
    00> [00:04:28.694,305] <inf> app: Starting file transfer
    00> [00:04:28.752,471] <inf> app: Sent 6400 bytes (6 KB) in 58 ms at 882 kbps
    00> [00:04:48.345,581] <inf> app: Notification size : 495
    00> [00:04:48.345,642] <inf> app: Starting file transfer
    00> [00:04:48.403,198] <inf> app: Sent 6400 bytes (6 KB) in 58 ms at 882 kbps
    00> [00:04:50.695,098] <inf> app: Notification size : 495
    00> [00:04:50.695,159] <inf> app: Starting file transfer
    00> [00:04:50.763,366] <inf> app: Sent 6400 bytes (6 KB) in 68 ms at 752 kbps


Related