want to achieve 1-2 Mbps through BLE.

I am working on project in which i want to read data from sd card and send it to mobile through BLE , I am using ble_nus_send to send data but when i decrease the delay then its giving me error 19 and when i increase delay then it is running smoothly .

Can i achieve something between 1-2 Mbps through ble_nus_Send or have to do with some other approach . 

Parents
  • Hello,

    ble_nus_send to send data but when i decrease the delay then its giving me error 19 and when i increase delay then it is running smoothly .

    Exactly which function is returning error 19?

    Can i achieve something between 1-2 Mbps through ble_nus_Send or have to do with some other approach . 

    Please see the SoftDevice throughput documentation for what parameters to use to achieve the highest throughputs.

    Best regards,
    Karl

  • Hello, 

    I have seen throughput documentation please tell me how to achieve highest rate and which example can i use to achieve highest rate . 

  • Mohsin khan said:
    Yes my data is changing time to time and data is not lost , Is this a function issue or any thing else .

    Yes, this works with the current implementation. The issue would be if you changed the behavior in the future to instead have a function that reads out sensor data and calls ble_nus_data_send directly. If this call should fail with NRF_ERROR_RESOURCES and you handle it in the same way which you are doing now you will either be blocking the rest of your application, or (removing the do-while loop) loosing the data you attempted to queue.
    I am not saying that this is an issue now, but I bring it up so that it hopefully will not be an issue in the future.

    Mohsin khan said:
    I don't know where to change connection event length

    You can configure this in the sdk_config.h file with the NRF_SDH_BLE_GAP_EVENT_LENGTH define.

    Mohsin khan said:
    I don't know about nrf sniffer please guide me about that . 

    Please see my previous reference to the nRF Sniffer download page, and follow the steps in this page to install it and get it up and running.
    You will require a separate DK or dongle to act as the sniffer. Once you have the sniffer up and running please make sure to select the peripheral device from the device drop down menu in Wireshark before the devices enter into a connection to ensure that the sniffer follows into the connection.

    Best regards,
    Karl

  • You will require a separate DK or dongle

    I don't have extra board to do this i have tried this on my own board but when i try to that on my own

    board its giving me error and my nrf52840 turned off , I am using waveshare board of nrf52840 .

    But that's not what i want , I want to send data at good data rate . 

    You can configure this in the sdk_config.h file with the NRF_SDH_BLE_GAP_EVENT_LENGTH define

    I have changed it to 50 , It was 400 before but still data rate is not that good enough and the second and very important thing i have not seen NRF_SDH_BLE_GAP_EVENT_LENGTH in my code maybe that's not required . if required where to place it in my code . 

  • Mohsin khan said:
    I don't have extra board to do this i have tried this on my own board but when i try to that on my own

    Aha, I understand. No, the sniffer will only work with the boards listed in the 'supported boards' list, unfortunately.

    Mohsin khan said:
    But that's not what i want , I want to send data at good data rate . 

    Knowing what is actually being sent between your devices is paramount when trying to optimize your data transmission. Without seeing a trace of the communication it is a lot harder to pinpoint potential bottlenecks in the communication. Seeing a trace would tell us exactly how often the devices communicate, how much is transferred each connection interval, how many notification its fit into, how much of the event length is used, which side of the connection that potentially stops pulling or providing more data - everything.

    You mention that you want to do your transfer to a phone, is this correct?
    Is this the case, please verify that you phone supports the connection parameters you are trying to use here. It could very well be that the phone refuses the parameters you are trying to set as a power saving measure. We would also see this easily in a sniffer trace.

    Mohsin khan said:
    I have changed it to 50 , It was 400 before but still data rate is not that good enough and the second and very important thing i have not seen NRF_SDH_BLE_GAP_EVENT_LENGTH in my code maybe that's not required . if required where to place it in my code . 

    What do you mean by this - you have changed it to 50, it was 400, but you have not seen NRF_SDH_BLE_GAP_EVENT_LENGTH anywhere in your code? All SDK examples have this define in their sdk_config.

    Could you also confirm that you are using 2M PHY? I see from your previously shared code that you are scanning for 1M PHY, which means the established connection will use 1M PHY until it potentially is updated later.
    Please change to 2M PHY on both sides of your link to significantly speed up the transfer.

    Best regards,
    Karl

  • Hello again ,

    Please tell me any example which has been done to achieve highest throughput with nrf_ble_uart if any.

    our previously shared code that you are scanning for 1M PHY

    I try to change with 2m but its giving me 

    <error> ble_scan: sd_ble_gap_scan_start returned 0x7

    ERROR 7 [NRF_ERROR_INVALID_PARAM] at D:\nrf5\nRF5_SDK_17.0.2_d674dde\examples\ble_central\ble_app_hrs_c\main.c:1001
    PC at: 0x0002CEDF

    I have checked the forum but no luck in my case as i am mixing peripheral with central . 

    What do you mean by this - you have changed it to 50, it was 400, but you have not seen NRF_SDH_BLE_GAP_EVENT_LENGTH

    Means in my main code i have changed this in sdk config file .

    Is this the case, please verify that you phone supports the connection parameters you are tryi

    How to check phone parameter ,

    Is that any app to do that . 

Reply Children
No Data
Related