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

Connection problems with Android 7 and SDK12.1

We have problems when connecting to a device running softdevice S132 version 3.0 with a tablet running Android 7.0.

When we use tablet and nRF Connect, we get Error 8 (0x8): GATT CONN TIMEOUT and Error 133 (0x85): GATT ERROR and disconnect. Softdevice asserts with id = 1 and pc = 0x0001A216 when we try to connect.

With Android 6.0 there is no problem.

Tablet is a Samsung SM-T580 running Android 7.0

Problem is reproducable with ble_app_hrs_freertos example project from SDK12.1

Is this a known problem, and is there any way around it?

Regards, Jan

  • Hi,

    This is a known issue with the SM-T580. It could be that when you upgraded to Android 7.0, long MTU or DLE support was added. These Samsung Tab A tablets are known for breaking the BLE spec by sending version exchange and length request in parallel (i.e., does not wait for the peripheral to respond before sending the next control packet). Since you are using SDK12 and nRF52, I suggest that you upgrade to S132 V3.1.0 and enable compatibility mode 2. This mode enables interoperability with these types of devices. You should also disable DLE via the options API.

    Upgrade to 132 v.3.1.0:

    When you download S132 V3.0.1 from here. You should replace the header files in the SDK(located in the folder SDK_folder\components\softdevice\s132\headers\) with the ones you download(located in folder s132_nrf52_3.1.0\s132_nrf52_3.1.0_API\include)

    Enable compatibility mode 2:

    ble_opt_t ble_opt;
    memset(&ble_opt, 0, sizeof(ble_opt));
    
    ble_opt.gap_opt.compat_mode_2.mode_2_enable = 1;
    
    err_code = sd_ble_opt_set(BLE_GAP_OPT_COMPAT_MODE_2,&ble_opt); 
    APP_ERROR_CHECK(err_code);
    

    You need to call this after you have enabled the SoftDevice. I.e after softdevice_enable() in ble_stack_init().

    Disable DLE via the options API:

    Call this function after you have enabled the SoftDevice:

    void data_len_ext_set(void)
    {
        ret_code_t err_code;
        ble_opt_t  opt;
    
        memset(&opt, 0x00, sizeof(opt));
    
        opt.gap_opt.ext_len.rxtx_max_pdu_payload_size = 0;
    
        err_code = sd_ble_opt_set(BLE_GAP_OPT_EXT_LEN, &opt);
        APP_ERROR_CHECK(err_code);
    }
    
  • Thanks,

    I have now implemented the changes you suggested.

    Unfortunately this didn't work.

    I still have same error codes on the tablet, and SD now asserts with Id=1 and pc=0x0001A5F2

    I see the SD132 v.3.1.0 is slightly larger than v.3.0.0. Should Linker config settings be changed? Currently the setting are: .intvec start: 0x1f000 ROM start: 0x1f000 RAM start: 0x20002128

    I could not find any documentation for S132 v.3.1.0

    Regards, Jan

  • SD132 v.3.1.0 is slightly larger than v.3.0.0

    They should both be 124 kB. SDS for 3.1 can be found here. You should not need to change any linker configurations.

    Do you have the same problem with the non-freertos example, i.e. ble_app_hrs ?

  • I see the size is same now. Hex file was 339K for S132 3.0.0 and 342K for 3.1.0. nRFgo Studio reported them as same (124K). Sorry, my mistake.

    I have the same problem with ble_app_hrs. (I only tested with S132 3.0.0 without any changes)

  • Could you test with ble_app_hrs with S132 3.1.0 and the above changes ?

Related