Sometimes when the method RequestData is called after receiving a notify on the characteristic, the Master Emulator seems to hang for a set amount of time before throwing the exception listed below. I do not know what is causing this, or what I can do to help this not to occur other than waiting a set amount of time after a notify occurs to call the RequestData method on the characteristic. I do have two characteristic definitions for one characteristic so I can receive a notification on the characteristic and perform a long read on the same characteristic (In case this is the issue).
Is there a way to set this timeout to be a shorter time so the program will not hang on this method call, so the program can recover much quicker than it currently is.
IronPython.Runtime.Exceptions.PythonException: RequestData failed. Procedure returned False
at DLRCachedCode._requestDataShared$217(Closure , PythonFunction $function, Object self, Object pipeNumber, Object readCharacteristic_Function, Object readDescriptor_Function)
at IronPython.Runtime.FunctionCaller`4.Call4(CallSite site, CodeContext context, Object func, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
at System.Dynamic.UpdateDelegates.UpdateAndExecute6[T0,T1,T2,T3,T4,T5,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5)
at IronPython.Runtime.FunctionCaller`4.Call4(CallSite site, CodeContext context, Object func, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
at IronPython.Runtime.Method.MethodBinding`3.SelfTarget(CallSite site, CodeContext context, Object target, T0 arg0, T1 arg1, T2 arg2)
at DLRCachedCode.RequestLongData$221(Closure , PythonFunction $function, Object self, Object pipeNumber)
at IronPython.Runtime.FunctionCaller`2.Call2(CallSite site, CodeContext context, Object func, T0 arg0, T1 arg1)
at CallSite.Target(Closure , CallSite , Object , Int32 )
at _Scripting_(Object[] , Int32 )
at Nordicsemi.MasterEmulator.RequestLongData(Int32 pipeNumber)
at nRFUart.nRFUartController.OnDataReceived(Object sender, PipeDataEventArgs arguments)
These are the set parameters for the BLE connection.
connectionParams.ConnectionIntervalMs = 7.5;
connectionParams.SlaveLatency = 2;
connectionParams.ScanIntervalMs = 250;
connectionParams.ScanWindowMs = 200;