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

nRF Connect App: slow BLE Rx data logging

I'm using the nRF52805 BLE function to send senor data to my phone (Android). In nRF Connect App, the data updates at a quick speed, which is expected (see image 1). I would like to save and export the logging file to my PC. However, the logging function updates the data at a very slow rate. It only updates about 4-6 data every second (image 2). 

1) Why the App logging speed is so slow? Is there any way to improve the logging speed? 

2) Because the App logging speed is slow, does the App simply lose some data, or average the data? 

3) Is there any other way to export BLE data to PC? (e.g. UART, what else?) 

Thanks! 

             

Parents
  • Hello,

    Do you have nRF Logger app installed? You can try it with that app installed. But i don't think there will be a difference.

    I thought that all events are logged, just that they're displayed every second. The list of services also should be refreshed each second, otherwise the app becomes unusable if data is coming to fast.

    You may also try nRF Toolbox app, where there's no any buffering, so it should log all events. With nRF Logger installed it will also be saved there so you can export them to a file.

  • Thanks, ! I fixed the problem by modifying the following code:

    /**< The advertising interval (in units of 0.625 ms. This value corresponds to 40 ms). */
    #define APP_ADV_INTERVAL 50
    
    ...
    
    /**< SAADC sample rate in ms. */ 
    #define SAADC_SAMPLES_IN_BUFFER 1
    #define SAADC_SAMPLE_RATE       30                                         

    For other users, please note that according to BLE 4.0 specification, General connectable and scannable advertisement packets' time period ranges from 20 ms to 10.24s in steps of 0.625ms (reference link). Therefore, APP_ADV_INTERVAL ranges from 20ms (value = 32) to 10.24sec (value = 16384)

    Also, when we set APP_ADV_INTERVAL value, we need to consider SAADC_SAMPLE_RATE. It's because in my project, the BLE device sends the string to the BLE central device by calling the saadc_callback() function. So APP_ADV_INTERVAL (in ms) must be > SAADC_SAMPLE_RATE (in ms). 

    Please let me know I understand them correctly or not. Hope this could help other people, too. 

    ---------------------------------------------------------------------------------------------------------

    My follow-up question: 

    My SAADC tACQ + tconv =  3us + 2us = 5us. Then, I set SAADC_SAMPLE_RATE=5ms. I would like to achieve max BLE broadcasting rate as possible. So I set APP_ADV_INTERVAL=20ms (value = 20/0.625=32). But the BLE connection on nRF Connect App only works for a few seconds. Then, the App told me: Error 8 (0x8): GATT CONN TIMEOUT. 

    If I set APP_ADV_INTERVAL=31.625ms (value=50), SAADC_SAMPLE_RATE=30ms, then, no problem. 

    Do you know why, please?  

  • What's the connection interval? Minimum supported by Android is 11.25ms and 7.5ms for service discovery only.

Reply Children
No Data
Related