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

some promble with s332 ant backgroud scan

Hey, guys, let me ask you a question.I have a device that does bluetooth broadcasting and ant background scanning.After working for 12 hours, the bluetooth broadcast frequency changed to 2.5s once.When I turned off the ant background scan, the bluetooth radio worked again.Using sdk14.2, s332 protocol stack.Have you ever encountered such problem

Parents
  • Compensation: no reset mcu.open the ant background scan again ,Bluetooth broadcast frequency changed to 2.5s once

  • Hello again,

    Can you try the following:

    1. First read in current coex configuration using sd_ant_coex_config_get(). This way you only need to alter configurations for the ones that you are interested in and leave default for everything else. Can ignore adv coex config for now by setting input parameter to NULL.

    ANT_BUFFER_PTR readCfg;
    uint8_t buffer[10];
    readCfg.ucBufferSize = 10;
    readCfg.pucBuffer = &buffer[0];
    error = sd_ant_coex_config_get(channel, &readCfg, NULL);
    Note: default configuration should read 0x0D,0x00,0x04,0x03,0x00,0x3A,0x00,0x3A,0x14,0x3C

    2. Disable the fixed search priority interval (bit 3 in Byte0 field).

    readCfg.pucBuffer[0] &= ~0x08; // disable fixed search hp interval priority config

    3. Write back configuration. Again, ignore advanced coex cfg by setting input parameter to NULL

    error = sd_ant_coex_config_set(channel, &readCfg, NULL);

    4. Byte 0 should be 0x05 (instead of previous value 0x0D) if the configuration is now read back using sd_ant_coex_config_get(..).

    Best regards,
    Kenneth

  • hello!yesterday, i use yours sdk14.2 demo have same problem.today ,I'll try it your way.Thank you very much!

  • This method has no effect.i try your method,but problems remain.

  • On the nrf SoftDevice, normally ANT and BLE share the same priority such that whoever schedules the slot first will normally take it.

    Note: BLE advertisement is not truly periodic (according to spec there is a 0-10ms random delay between each advertisement) and may occasionally collide with ANT scheduled activities. 

    Since the previous suggestions using sd_ant_coex_config_get() does not help, you may instead need to adjust the BLE advertisement interval so that it is not synchronous with ANT activities and use the default coexistence configuration.  

    Given that there is some random delay for the advertisement intervals involved, it may not be possible to guarantee perfect periodic transmissions from BLE all the time, and some pre-emption may be necessary to prevent starving the ANT stack completely.  It may seem you will need to some experimentation to figure out the best configuration combination of ANT and BLE to achieve what you need. 

    Some questions:

    What is the BLE advertisement interval you are using here?

    We are not clear what “frequency changed to 2.5s once” means.  All BLE advertisements after this point are transmitted every 2.5 s?  Or  for one instance only the interval between two BLE advertisements was 2.5 s, and then went back to its expected period? 

    Best regards,
    Kenneth

  • hi,Kebbeth

    init.config.ble_adv_slow_interval = 400;
    init.config.ble_adv_slow_timeout = 10;

    this my config.All BLE advertisements after this point are transmitted every 2.5 s? sorry ,my english is very poor. Some questions are not well expressed.the app "nrf connect"  show my device Radio once every 2500ms .but my frequency is 250ms.and in my debug,Bluetooth radio parameters are normal.

Reply
  • hi,Kebbeth

    init.config.ble_adv_slow_interval = 400;
    init.config.ble_adv_slow_timeout = 10;

    this my config.All BLE advertisements after this point are transmitted every 2.5 s? sorry ,my english is very poor. Some questions are not well expressed.the app "nrf connect"  show my device Radio once every 2500ms .but my frequency is 250ms.and in my debug,Bluetooth radio parameters are normal.

Children
Related