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

nrf51822 advertising interval in Connectable undirected mode

Hi,

i am using nrf51822 for my application.

i am using connectable undirected mode with 40 ms advertising interval but when i am seeing the device data in the nrf master control panel app,it is showing advertised interval as N/A.

plz explain me about this issue or i am doing something wrong.

thanks, shah Rays

  • Not a question to your answer, but might be helpful: Why do you need to see the advertising interval in the Master Control Panel app? You can get more precise data if you use the nRF-Sniffer. The sniffer will allow you to see each individual ADV packet in Wireshark, along with metadata, such as the interval between them. This will of course require that you have a spare nRF51822.

  • Thanks for reply

    the problem is i am getting data only 1 time after that data it is not updating for that i need to reopen the app then only i am able to see the data.but i need continuous advertising.

  • FormerMember
    0 FormerMember

    What are your advertising settings? Do you see the same problem if you copy the advertising settings from one of our examples to your application?

    If you do what shibshab suggests, use the sniffer, do you see that your device is advertising correctly?

    For continuous advertising, with not timeout, the timeout parameters should be set to '0'. If you don't want any centrals to connect to your device, you should set the advertising type to 'non connectable', BLE_GAP_ADV_TYPE_ADV_NONCONN_IND.

  • yes i also tried with one of your example settings,

    adv_params.type = BLE_GAP_ADV_TYPE_ADV_IND; adv_params.p_peer_addr = NULL; adv_params.fp = BLE_GAP_ADV_FP_ANY; adv_params.interval = APP_ADV_INTERVAL; //64(40ms) adv_params.timeout = APP_ADV_TIMEOUT_IN_SECONDS; //0(No timeout)

    these are the settings of advertising.

    when i tried with non connectable mode it is working fine for that i gave 200 ms but when i set connectable mode for that value is not updating as per interval time(40 ms).for my application i need to connect with central.

  • FormerMember
    0 FormerMember in reply to FormerMember

    Could you use the sniffer, and catch what is actually being transferred over the air? And then upload the sniffer trace here?

    If you run your application in debug mode, and set a break point in app_error_handler(..), is there an error at any point? When debugging the application, I would recommend you to set "DEBUG" in "options for target --> C/C++ --> Define". By doing so, the chip will not reset when in app_error_handler, instead it will go into an infinity loop.

Related