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

image_transfer_service questions

 

Hello,

 

We have an application based on NRF52832 which runs Nordic UART service and DFU service SDK15.2 SD132V6.0. Now, we need to add “high speed data pipe” and we are thinking of using “image_transfer_demo” example. Therefore we have few questions with regards to this idea

 

  1. Can NUS, DFU services coexist on same device and run in parallel? Ie NUS and video service
  2. We are trying to understand: what makes image_transfer_demo faster compare to  ble_app_uart example? We compared both examples and find few differences:

 

  1. Nrf_uart_example uses characteristic_add(…) and image_tranffer_example uses sd_ble_gatts_characteristic_add(…) . Can you please advise what is difference between those two functions?
  2. It is not clear to us why on BLE Event (function  ble_nus_on_ble_evt) event type BLE_GATTS_EVT_HVN_TX_COMPLETE ble_app_uart example calling on_hvx_tx_complete function and image transfer example pretty much does nithing .

 

Can you please advise at your earliest convenience.

 

Regards,

 

 

andrew

  • My understanding is that 251 bytes includes the 4-byte header, which means that the maximum size is indeed 247 bytes as you have found; these are my notes:

    // +-----------------------------------------------------------------------------------------------------------------+
    // |                                             BLE Data Packet Min/Max                                             |
    // +-----------------------------------------------------------------------------------------------------------------+
    // |                                             1MHz: 10/265 octets, 2MHz: 11/266 octets                            |
    // +----------+--------+--------------------------------------------------------------------------------------+------+
    // |          | Access |                                                                                      |      |
    // | Preamble | Address|         Protocol Data Unit PDU                                                       | CRCC |
    // +----------+--------+--------------------------------------------------------------------------------------+------+
    // |   1 (2)  |    4   |                                                   2-257                              |  3   |
    // |          |        +-----------+------------------------------------------------------------------+-------+      |
    // |          |        | LL Header |  Payload                                                         |  MIC  |      |
    // |          |        +-----------+------------------------------------------------------------------+ (opt) |      |
    // |          |        |   2       |                                       0-251                      |   4   |      |
    // |          |        |           +--------+---------------------------------------------------------+       |      |
    // |          |        |           | L2CAP  |                                                         |       |      |
    // |          |        |           | Header |  ATT Data                                               |       |      |
    // |          |        |           +--------+---------------------------------------------------------+       |      |
    // |          |        |           |   4    |                              0-247                      |       |      |
    // |          |        |           |        +-----+-------+-------------------------------------------+       |      |
    // |          |        |           |        | ATT | ATT   |                                           |       |      |
    // |          |        |           |        | Op  | Attrib|  ATT Payload                              |       |      |
    // |          |        |           |        +-----+-------+-------------------------------------------+       |      |
    // |  1 (2)   |   4    |  2        |   4    |  1  |  2    |                0-244                      |  (4)  |  3   |
    // +----------+--------+-----------+--------+-----+-------+-------------------------------------------+-------+------+
    

Related