This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

WL18XX-BT-SP: Bluetopia: long RFCOMM disconnect timeout

Part Number: WL18XX-BT-SP


Our application is using WL18xx with Bluetopia stack to connect to remote device (RFCOMM) . When remote device powers off the application receives indication that SPP port is closed (etPort_Open_Confirmation with PortOpenStatus != 0) ~30 seconds after.

We would like to decrease this timeout value.

I tried to set BE/EDR link supervision timeout to 8s through _HCI_Write_Link_Supervision_Timeout (subsequent _HCI_Read_Link_Supervision_Timeout call confirms that the value has been applied) but I saw no impact on the behavior - still receiving 'port closed' notification after ~30 seconds.

There are some defines in BTPSCFG.h file:
#define BTPS_CONFIGURATION_RFCOMM_CONNECTION_SUPERVISOR_TIMER_S 30
#define BTPS_CONFIGURATION_RFCOMM_DISCONNECT_SUPERVISOR_TIMER_S 30

but since we are using pre-built Bluetopia binaries we have no chance to change them. Is there a way (maybe vendor-specific HCI command?) to modify RFCOMM supervision timeout value from the user's code?

  • Hello Andrey,

    You should be able to rebuild bluetopiapm with this change following the guide.

    https://www.ti.com/lit/ug/swru581/swru581.pdf

    Off the top of my head I dont recall another hci command to accomplish this but I can look into it.

    Best,

    Rogelio

  • Hello Rogelio,

    Thanks for the link!  

    I was able to build sample applications (like e.g. LinuxOPPM  or LinuxSPPM), but  core Bluetopia libraries are not being touched

    $ make
    CC_S BTPMSRVR.c -o BTPMSRVR_S.o
    LN BTPMSRVR_S.o libBTPM_S.a libBTPM_HAL_S.a libSS1BTAUD.a libSS1BTGAV.a libSS1BTAVC.a libSS1BTAVR.a libSS1SBC.a libSS1BTFTP.a libSS1BTHDP.a libSS1BTHDS.a libSS1BTHIDH.a libSS1BTHID.a libSS1BTPAN.a libBTPS_VNET.a libSS1BTPBA.a libSS1BTHFR.a libSS1BTMAP.a libSS1BTOPP.a libSS1BTCTS.a libSS1BTNDCS.a libSS1BTRTUS.a libSS1BTDIS.a libSS1BTGAT.a libSS1BTGAPS.a libSS1BTCSCS.a libSS1BTHIDS.a libSS1BTNDC.a libSS1BTRTU.a libSS1BTIAS.a libSS1BTHRS.a libSS1BTSCP.a libSS1BTLLS.a libSS1BTBAS.a libSS1BTTPS.a libBTPS.a libBTPS_PLA.a libBTPS_OSA.a -o SS1BTPM
    CC-C LinuxDEVM.c -o LinuxDEVM_C.o
    CC_C BTPMMODC.c -o BTPMMODC_C.o
    CC_C BTPMIPC.c -o BTPMIPC_C.o
    CC-C BTPMVS.c -o BTPMVS_C.o
    AR BTPMMODC_C.o BTPMIPC_C.o BTPMVS_C.o -o libBTPM_HAL_C.a
    arm-poky-linux-gnueabi-ar: creating ../BluetopiaPM/lib/libBTPM_HAL_C.a
    LN LinuxDEVM_C.o libBTPM_C.a libBTPM_HAL_C.a -o LinuxDEVM
    CC-C LinuxHDPM.c -o LinuxHDPM_C.o
    LN LinuxHDPM_C.o libBTPM_C.a libBTPM_HAL_C.a -o LinuxHDPM
    CC-C LinuxHDPM_11073.c -o LinuxHDPM_11073_C.o
    CC-C IEEE_11073.c -o IEEE_11073_C.o
    LN LinuxHDPM_11073_C.o IEEE_11073_C.o libBTPM_C.a libBTPM_HAL_C.a -o LinuxHDPM_11073
    CC-C LinuxVoLE.c -o LinuxVoLE_C.o
    LN LinuxVoLE_C.o libBTPM_C.a libBTPM_HAL_C.a -o LinuxVoLE
    CC-C LinuxHIDM.c -o LinuxHIDM_C.o
    LN LinuxHIDM_C.o libBTPM_C.a libBTPM_HAL_C.a -o LinuxHIDM
    CC-C LinuxHRPM.c -o LinuxHRPM_C.o
    LN LinuxHRPM_C.o libBTPM_C.a libBTPM_HAL_C.a -o LinuxHRPM
    CC-C LinuxOPPM.c -o LinuxOPPM_C.o
    LN LinuxOPPM_C.o libBTPM_C.a libBTPM_HAL_C.a -o LinuxOPPM
    CC-C LinuxPBAM.c -o LinuxPBAM_C.o
    LN LinuxPBAM_C.o libBTPM_C.a libBTPM_HAL_C.a -o LinuxPBAM
    CC-C LinuxSPPLE_PM.c -o LinuxSPPLE_PM_C.o
    LN LinuxSPPLE_PM_C.o libBTPM_C.a libBTPM_HAL_C.a -o LinuxSPPLE_PM
    CC-C LinuxCSCM.c -o LinuxCSCM_C.o
    LN LinuxCSCM_C.o libBTPM_C.a libBTPM_HAL_C.a -o LinuxCSCM
    CC-C LinuxIBeacon.c -o LinuxIBeacon_C.o
    LN LinuxIBeacon_C.o libBTPM_C.a libBTPM_HAL_C.a -o LinuxIBeacon
    CC-C LinuxBASM.c -o LinuxBASM_C.o
    LN LinuxBASM_C.o libBTPM_C.a libBTPM_HAL_C.a -o LinuxBASM
    CC-C LinuxHOGM.c -o LinuxHOGM_C.o
    LN LinuxHOGM_C.o libBTPM_C.a libBTPM_HAL_C.a -o LinuxHOGM
    CC-C LinuxPANM.c -o LinuxPANM_C.o
    LN LinuxPANM_C.o libBTPM_C.a libBTPM_HAL_C.a -o LinuxPANM
    CC-C LinuxSPPM.c -o LinuxSPPM_C.o
    LN LinuxSPPM_C.o libBTPM_C.a libBTPM_HAL_C.a -o LinuxSPPM
    CC-C SS1Tool.c -o SS1Tool_C.o
    LN SS1Tool_C.o libBTPM_C.a libBTPM_HAL_C.a -o SS1Tool
    CC-C LinuxFTPM_SRV.c -o LinuxFTPM_SRV_C.o
    LN LinuxFTPM_SRV_C.o libBTPM_C.a libBTPM_HAL_C.a -o LinuxFTPM_SRV
    CC-C LinuxFTPM_CLT.c -o LinuxFTPM_CLT_C.o
    LN LinuxFTPM_CLT_C.o libBTPM_C.a libBTPM_HAL_C.a -o LinuxFTPM_CLT
    CC-C LinuxFMPM_TAR.c -o LinuxFMPM_TAR_C.o
    LN LinuxFMPM_TAR_C.o libBTPM_C.a libBTPM_HAL_C.a -o LinuxFMPM_TAR
    CC-C LinuxGATM_SRV.c -o LinuxGATM_SRV_C.o
    LN LinuxGATM_SRV_C.o libBTPM_C.a libBTPM_HAL_C.a -o LinuxGATM_SRV
    CC-C LinuxGATM_CLT.c -o LinuxGATM_CLT_C.o
    LN LinuxGATM_CLT_C.o libBTPM_C.a libBTPM_HAL_C.a -o LinuxGATM_CLT
    CC-C LinuxHFRM_AG.c -o LinuxHFRM_AG_C.o
    LN LinuxHFRM_AG_C.o libBTPM_C.a libBTPM_HAL_C.a -o LinuxHFRM_AG
    CC-C LinuxHFRM_HF.c -o LinuxHFRM_HF_C.o
    LN LinuxHFRM_HF_C.o libBTPM_C.a libBTPM_HAL_C.a -o LinuxHFRM_HF
    CC-C LinuxHDSM_AG.c -o LinuxHDSM_AG_C.o
    LN LinuxHDSM_AG_C.o libBTPM_C.a libBTPM_HAL_C.a -o LinuxHDSM_AG
    CC-C LinuxHDSM_HS.c -o LinuxHDSM_HS_C.o
    LN LinuxHDSM_HS_C.o libBTPM_C.a libBTPM_HAL_C.a -o LinuxHDSM_HS
    CC-C LinuxMAPM_MCE.c -o LinuxMAPM_MCE_C.o
    CC-C MsgStorePM.c -o MsgStorePM_C.o
    LN LinuxMAPM_MCE_C.o MsgStorePM_C.o libBTPM_C.a libBTPM_HAL_C.a -o LinuxMAPM_MCE
    CC-C LinuxMAPM_MSE.c -o LinuxMAPM_MSE_C.o
    LN LinuxMAPM_MSE_C.o MsgStorePM_C.o libBTPM_C.a libBTPM_HAL_C.a -o LinuxMAPM_MSE
    CC-C LinuxPXPM_MON.c -o LinuxPXPM_MON_C.o
    LN LinuxPXPM_MON_C.o libBTPM_C.a libBTPM_HAL_C.a -o LinuxPXPM_MON
    #################################################################
    # Build is Complete!
    #################################################################
    

    This is the libraries we use for our product:

    libBTPS.a libSS1BTDIS.a libSS1BTHIDS.a libSS1BTRTU.a
    libBTPS_OSA.a libSS1BTFTP.a libSS1BTHRS.a libSS1BTRTUS.a
    libBTPS_PLA.a libSS1BTGAPS.a libSS1BTIAS.a libSS1BTSCP.a
    libBTPS_VNET.a libSS1BTGAT.a libSS1BTLLS.a libSS1BTTPS.a
    libSS1BTAUD.a libSS1BTGAV.a libSS1BTMAP.a libSS1SBC.a
    libSS1BTAVC.a libSS1BTHDP.a libSS1BTNDC.a
    libSS1BTAVR.a libSS1BTHDS.a libSS1BTNDCS.a
    libSS1BTBAS.a libSS1BTHFR.a libSS1BTOPP.a
    libSS1BTCSCS.a libSS1BTHID.a libSS1BTPAN.a
    libSS1BTCTS.a libSS1BTHIDH.a libSS1BTPBA.a

    Modifying  BTPS_CONFIGURATION_RFCOMM_DISCONNECT_SUPERVISOR_TIMER_S in the header file  does not have any effect.

    Best regards,

    Andrey

  • Hi Andrey,

    Im going to try to build it on my side with the source code and see if that builds the change properly.

    Ill follow up next week.

    Best,

    Rogelio