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?