You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2020/03/23 22:14:11 UTC

[GitHub] [mynewt-nimble] zacwbond opened a new pull request #781: Make connection update process timeout variable

zacwbond opened a new pull request #781: Make connection update process timeout variable
URL: https://github.com/apache/mynewt-nimble/pull/781
 
 
   This is a fix for #780, an issue I submitted earlier today.  
   
   I am connecting as a central to a remote peripheral using a connection interval of 120, latency of 90, and timeout of 3000.  Due to the hard-coded 40 second timeout, it is impossible to perform a connection parameter update on this connection.  Trying to do so results in a timeout followed by a disconnect 100% of the time.
   
   My attempt to fix the problem is to compute the timeout based on the current connection parameters instead of just hard-coding a constant value.  

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-nimble] zacwbond commented on issue #781: Make connection update process timeout variable

Posted by GitBox <gi...@apache.org>.
zacwbond commented on issue #781: Make connection update process timeout variable
URL: https://github.com/apache/mynewt-nimble/pull/781#issuecomment-603877487
 
 
   Closing because I mangled my forks somehow.  Will re-open momentarily.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-nimble] rymanluk commented on issue #781: Make connection update process timeout variable

Posted by GitBox <gi...@apache.org>.
rymanluk commented on issue #781: Make connection update process timeout variable
URL: https://github.com/apache/mynewt-nimble/pull/781#issuecomment-603830429
 
 
   @zacwbond could you update your PR so it implements a) ?
   
   the other problem you mentioned is something with your controller I believe.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-nimble] zacwbond closed pull request #781: Make connection update process timeout variable

Posted by GitBox <gi...@apache.org>.
zacwbond closed pull request #781: Make connection update process timeout variable
URL: https://github.com/apache/mynewt-nimble/pull/781
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-nimble] zacwbond commented on issue #781: Make connection update process timeout variable

Posted by GitBox <gi...@apache.org>.
zacwbond commented on issue #781: Make connection update process timeout variable
URL: https://github.com/apache/mynewt-nimble/pull/781#issuecomment-603273789
 
 
   @rymanluk Your a) makes sense to me.  If I get a timeout, I'd tend to assume that the event that timed out is never going to happen, so it would be odd to send a timeout event if the procedure is eventually going to succeed.
   
   Another problem I've noticed is that I frequently see a call to my reset_cb with error code 19 when the gap connection parameter update procedure is initiated.  I think it must be associated with the function `ble_hs_hci_wait_for_ack()`.  That makes it sound like an HCI problem and not a Nimble problem, but it only ever happens with the parameter update procedure, and only intermittently.
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-nimble] apache-mynewt-bot removed a comment on issue #781: Make connection update process timeout variable

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot removed a comment on issue #781: Make connection update process timeout variable
URL: https://github.com/apache/mynewt-nimble/pull/781#issuecomment-602885623
 
 
   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### nimble/host/src/ble_gap.c
   <details>
   
   ```diff
   @@ -88,7 +88,7 @@
    #define BLE_GAP_CANCEL_RETRY_TIMEOUT_MS         100 /* ms */
    
    #define BLE_GAP_UPDATE_TIMEOUT_MS(itvl, latency) \
   -            (6 * ((itvl) * BLE_HCI_CONN_ITVL / 1000) * ((latency) + 1))
   +    (6 * ((itvl) * BLE_HCI_CONN_ITVL / 1000) * ((latency) + 1))
    
    #if MYNEWT_VAL(BLE_ROLE_CENTRAL)
    static const struct ble_gap_conn_params ble_gap_conn_params_dflt = {
   @@ -1185,7 +1185,7 @@
                entry = ble_gap_update_entry_find(conn_handle, NULL);
                if (entry != NULL && !(conn->bhc_flags & BLE_HS_CONN_F_MASTER)) {
                    ble_gap_update_to_l2cap(&entry->params, &l2cap_params);
   -                
   +
                    timeout = BLE_GAP_UPDATE_TIMEOUT_MS(conn->bhc_itvl,
                                                        conn->bhc_latency);
    
   ```
   
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-nimble] apache-mynewt-bot commented on issue #781: Make connection update process timeout variable

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on issue #781: Make connection update process timeout variable
URL: https://github.com/apache/mynewt-nimble/pull/781#issuecomment-602885623
 
 
   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### nimble/host/src/ble_gap.c
   <details>
   
   ```diff
   @@ -88,7 +88,7 @@
    #define BLE_GAP_CANCEL_RETRY_TIMEOUT_MS         100 /* ms */
    
    #define BLE_GAP_UPDATE_TIMEOUT_MS(itvl, latency) \
   -            (6 * ((itvl) * BLE_HCI_CONN_ITVL / 1000) * ((latency) + 1))
   +    (6 * ((itvl) * BLE_HCI_CONN_ITVL / 1000) * ((latency) + 1))
    
    #if MYNEWT_VAL(BLE_ROLE_CENTRAL)
    static const struct ble_gap_conn_params ble_gap_conn_params_dflt = {
   @@ -1185,7 +1185,7 @@
                entry = ble_gap_update_entry_find(conn_handle, NULL);
                if (entry != NULL && !(conn->bhc_flags & BLE_HS_CONN_F_MASTER)) {
                    ble_gap_update_to_l2cap(&entry->params, &l2cap_params);
   -                
   +
                    timeout = BLE_GAP_UPDATE_TIMEOUT_MS(conn->bhc_itvl,
                                                        conn->bhc_latency);
    
   ```
   
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [mynewt-nimble] apache-mynewt-bot commented on issue #781: Make connection update process timeout variable

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on issue #781: Make connection update process timeout variable
URL: https://github.com/apache/mynewt-nimble/pull/781#issuecomment-602891381
 
 
   
   <!-- style-bot -->
   
   ## Style check summary
   
   #### No suggestions at this time!
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services