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

in \connect SDK\v1.5.0\nrf\samples\bluetooth\peripheral_uart,data number is limited 20 bytes, more than 20bytes BLE will part data in two or more packs to send or receive

in \connect SDK\v1.5.0\nrf\samples\bluetooth\peripheral_uart,data number is limited 20 bytes, more than 20bytes BLE will part data in two or more packs to send or receive .how can i chang to data number to more bytes. for example , i want to send 200 bytes through COM  in one time and BLE receive 200bytes i one time , relatively HOW to send 200bytes data in one time  through BLE ,not separate 200bytes data in many pack to send

Parents
  • in example peripheral_uart of NRF Connect SDK1.5.0 , in main(),the bt_enble() creats two bluetooth threads,a TX thread and a RX thread,you had said these two threads have no effect to program,can these two threads be deleted?what's difference bluetooth host layer thread and APP thread?  in file main.c ,the code  K_THREAD_DEFINE(ble_write_thread_id, STACKSIZE, ble_write_thread, NULL, NULL,
    NULL, PRIORITY, 0, 0); creat ble_write_thread ,but I search whole entire solution ,the word "ble_write_thread_id " has referrenced in only one place   ,how the program know word ble_write_thread_id ?

Reply
  • in example peripheral_uart of NRF Connect SDK1.5.0 , in main(),the bt_enble() creats two bluetooth threads,a TX thread and a RX thread,you had said these two threads have no effect to program,can these two threads be deleted?what's difference bluetooth host layer thread and APP thread?  in file main.c ,the code  K_THREAD_DEFINE(ble_write_thread_id, STACKSIZE, ble_write_thread, NULL, NULL,
    NULL, PRIORITY, 0, 0); creat ble_write_thread ,but I search whole entire solution ,the word "ble_write_thread_id " has referrenced in only one place   ,how the program know word ble_write_thread_id ?

Children
  • Hi,

    zhouhaifang said:
    you had said these two threads have no effect to program

    No, that is not what I meant. What I mean is that this is part of the implementation of the BLE stack and not something you are mint to modify. 

    zhouhaifang said:
    can these two threads be deleted?

    No.

    zhouhaifang said:
    what's difference bluetooth host layer thread and APP thread?

    There is no fundamental difference, a thread is a thread. But you if you are using the Bluetooth stack, then you do not normally need to think much about how it is implemented. So in a nutshell tx_thread_data() and ble_write_thread_id() as internal details you do not normally need to think about.

    zhouhaifang said:
    in file main.c ,the code  K_THREAD_DEFINE(ble_write_thread_id, STACKSIZE, ble_write_thread, NULL, NULL,
    NULL, PRIORITY, 0, 0); creat ble_write_thread ,but I search whole entire solution ,the word "ble_write_thread_id " has referrenced in only one place   ,how the program know word ble_write_thread_id ?

    All threads need a name/ID as that is a requirement of the Zephyr thread API. However, in this case this is a thread that is crated once and runs forever, so there is no need to refer to it from anywhere else. Therefor, you will not see ble_write_thread_id used anywhere.

Related