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.

Polar H7 Disconnection



HI,

I'm testing the HRP connection in the following configuration:

  • EKS-LM4F232 board
  • CC256x Stellaris Bluetopia SDK v1.0 HRPDemo NoOS
  • Evaluation Module TIwi uB2 configured to use Internal SlowClock
  • Polar H7 sensor

I'm able to connect to the sensor issuing the following command sequence:

"CONNECTLE 0022d0259f6c"

"DISCOVERHRS  1"

"ConfigureRemoteHRS 1"

Then I start to receive data correctly.

Then randomly the sensor disconnect. Sometimes after few seconds sometimes after 1-2 minutes.

The message I receive is:

Server>
etGATT_Connection_Device_Disconnection with size 12:
   Connection ID:   95.
   Connection Type: LE.
   Remote Device:   0x0022d0259f6c.

Server>etLE_Disconnection_Complete with size 9.
   Status: 0x00.
   Reason: 0x3b.
   BD_ADDR: 0x0022d0259f6c.

There is something I can do?

Kind Regards

               Andrea

  • Andrea,

    The 0x3B error indicates that the remote device terminated the connection due to un-acceptable connection interval being used.  My guess is that the the Polar is disconnecting you because the samples do not respond to connection parameter update requests (which LE slaves send when they want the master to update the connection parameters used for the connection).  You should be able to copy the code snippet in the attached source into the main switch statement in the GAP LE event callback function to correctly respond to any connection parameter update that is requested by a connected LE slave.

    case etLE_Connection_Parameter_Update_Request:
       Display(("\r\netLE_Connection_Parameter_Update_Request with size %d.\r\n", (int)GAP_LE_Event_Data->Event_Data_Size));
    
       if(GAP_LE_Event_Data->Event_Data.GAP_LE_Connection_Parameter_Update_Request_Event_Data)
       {
          BD_ADDRToStr(GAP_LE_Event_Data->Event_Data.GAP_LE_Connection_Parameter_Update_Request_Event_Data->BD_ADDR, BoardStr);
          Display(("   BD_ADDR:             %s.\r\n", BoardStr));
          Display(("   Minimum Interval:    %u.\r\n", (unsigned int)GAP_LE_Event_Data->Event_Data.GAP_LE_Connection_Parameter_Update_Request_Event_Data->Conn_Interval_Min));
          Display(("   Maximum Interval:    %u.\r\n", (unsigned int)GAP_LE_Event_Data->Event_Data.GAP_LE_Connection_Parameter_Update_Request_Event_Data->Conn_Interval_Max));
          Display(("   Slave Latency:       %u.\r\n", (unsigned int)GAP_LE_Event_Data->Event_Data.GAP_LE_Connection_Parameter_Update_Request_Event_Data->Slave_Latency));
          Display(("   Supervision Timeout: %u.\r\n", (unsigned int)GAP_LE_Event_Data->Event_Data.GAP_LE_Connection_Parameter_Update_Request_Event_Data->Conn_Supervision_Timeout));
    
          /* Initialize the connection parameters.                 */
          ConnectionParameters.Connection_Interval_Min    = GAP_LE_Event_Data->Event_Data.GAP_LE_Connection_Parameter_Update_Request_Event_Data->Conn_Interval_Min;
          ConnectionParameters.Connection_Interval_Max    = GAP_LE_Event_Data->Event_Data.GAP_LE_Connection_Parameter_Update_Request_Event_Data->Conn_Interval_Max;
          ConnectionParameters.Slave_Latency              = GAP_LE_Event_Data->Event_Data.GAP_LE_Connection_Parameter_Update_Request_Event_Data->Slave_Latency;
          ConnectionParameters.Supervision_Timeout        = GAP_LE_Event_Data->Event_Data.GAP_LE_Connection_Parameter_Update_Request_Event_Data->Conn_Supervision_Timeout;
          ConnectionParameters.Minimum_Connection_Length  = 0;
          ConnectionParameters.Maximum_Connection_Length  = 10000;
    
          Display(("\r\nAttempting to accept connection parameter update request.\r\n"));
    
          /* Go ahead and accept whatever the slave has requested. */
          Result = GAP_LE_Connection_Parameter_Update_Response(BluetoothStackID, GAP_LE_Event_Data->Event_Data.GAP_LE_Connection_Parameter_Update_Request_Event_Data->BD_ADDR, TRUE, &ConnectionParameters);
          if(!Result)
          {
             Display(("      GAP_LE_Connection_Parameter_Update_Response() success.\r\n"));
          }
          else
          {
             Display(("      GAP_LE_Connection_Parameter_Update_Response() error %d.\r\n", Result));
          }
       }
       break;
    

    Tim