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 2021/01/05 15:45:03 UTC

[GitHub] [mynewt-nimble] prasad-alatkar opened a new pull request #899: NimBLE host: Make set Packet Length API public

prasad-alatkar opened a new pull request #899:
URL: https://github.com/apache/mynewt-nimble/pull/899


   This PR makes API setting packet length (OGF = 0x08, OCF = 0x0022) in controller from host public. 


----------------------------------------------------------------
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



[GitHub] [mynewt-nimble] prasad-alatkar commented on pull request #899: NimBLE host: Make set Packet Length API public

Posted by GitBox <gi...@apache.org>.
prasad-alatkar commented on pull request #899:
URL: https://github.com/apache/mynewt-nimble/pull/899#issuecomment-791433032


   @sjanc Could you please also take a quick look here ? 


----------------------------------------------------------------
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



[GitHub] [mynewt-nimble] prasad-alatkar commented on pull request #899: NimBLE host: Make set Packet Length API public

Posted by GitBox <gi...@apache.org>.
prasad-alatkar commented on pull request #899:
URL: https://github.com/apache/mynewt-nimble/pull/899#issuecomment-799201553


   > looks good, could you just squash those into single commit? (it makes git bisect a bit easier in future)
   
   Sure, sure!!


----------------------------------------------------------------
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



[GitHub] [mynewt-nimble] apache-mynewt-bot removed a comment on pull request #899: NimBLE host: Make set Packet Length API public

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot removed a comment on pull request #899:
URL: https://github.com/apache/mynewt-nimble/pull/899#issuecomment-754718356


   
   <!-- 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



[GitHub] [mynewt-nimble] apache-mynewt-bot commented on pull request #899: NimBLE host: Make set Packet Length API public

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on pull request #899:
URL: https://github.com/apache/mynewt-nimble/pull/899#issuecomment-799204976


   
   <!-- 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
   @@ -675,8 +675,8 @@
    }
    
    /*****************************************************************************
   - * $misc                                                                     *
   - *****************************************************************************/
   +* $misc                                                                     *
   +*****************************************************************************/
    
    static int
    ble_gap_event_listener_call(struct ble_gap_event *event);
   ```
   
   </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



[GitHub] [mynewt-nimble] prasad-alatkar commented on a change in pull request #899: NimBLE host: Make set Packet Length API public

Posted by GitBox <gi...@apache.org>.
prasad-alatkar commented on a change in pull request #899:
URL: https://github.com/apache/mynewt-nimble/pull/899#discussion_r594072651



##########
File path: nimble/host/include/host/ble_gap.h
##########
@@ -1214,6 +1214,23 @@ struct ble_gap_ext_adv_params {
     uint8_t sid;
 };
 
+/**
+ * Configure LE Data Length in controller (OGF = 0x08, OCF = 0x0022).
+ *
+ * @param conn_handle      Connection handle.
+ * @param tx_octets        The preferred value of payload octets that the Controller
+ *                         should use for a new connection (Range
+ *                         0x001B-0x00FB).
+ * @param tx_time          The preferred maximum number of microseconds that the local Controller
+ *                         should use to transmit a single link layer packet
+ *                         (Range 0x0148-0x4290).
+ *
+ * @return              0 on success,
+ *                      other error code on failure.
+ */
+int ble_hs_hci_util_set_data_len(uint16_t conn_handle, uint16_t tx_octets,

Review comment:
       @sjanc Thank you for valuable inputs :). I have made relevant changes.




----------------------------------------------------------------
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



[GitHub] [mynewt-nimble] sjanc commented on a change in pull request #899: NimBLE host: Make set Packet Length API public

Posted by GitBox <gi...@apache.org>.
sjanc commented on a change in pull request #899:
URL: https://github.com/apache/mynewt-nimble/pull/899#discussion_r593280779



##########
File path: nimble/host/include/host/ble_gap.h
##########
@@ -1214,6 +1214,23 @@ struct ble_gap_ext_adv_params {
     uint8_t sid;
 };
 
+/**
+ * Configure LE Data Length in controller (OGF = 0x08, OCF = 0x0022).
+ *
+ * @param conn_handle      Connection handle.
+ * @param tx_octets        The preferred value of payload octets that the Controller
+ *                         should use for a new connection (Range
+ *                         0x001B-0x00FB).
+ * @param tx_time          The preferred maximum number of microseconds that the local Controller
+ *                         should use to transmit a single link layer packet
+ *                         (Range 0x0148-0x4290).
+ *
+ * @return              0 on success,
+ *                      other error code on failure.
+ */
+int ble_hs_hci_util_set_data_len(uint16_t conn_handle, uint16_t tx_octets,

Review comment:
       I've just keep GAP name convention, so this function should be renamed to ble_gap_set_data_len()




----------------------------------------------------------------
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



[GitHub] [mynewt-nimble] apache-mynewt-bot removed a comment on pull request #899: NimBLE host: Make set Packet Length API public

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot removed a comment on pull request #899:
URL: https://github.com/apache/mynewt-nimble/pull/899#issuecomment-799145823


   
   <!-- 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



[GitHub] [mynewt-nimble] apache-mynewt-bot commented on pull request #899: NimBLE host: Make set Packet Length API public

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on pull request #899:
URL: https://github.com/apache/mynewt-nimble/pull/899#issuecomment-799145823


   
   <!-- 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



[GitHub] [mynewt-nimble] sjanc merged pull request #899: NimBLE host: Make set Packet Length API public

Posted by GitBox <gi...@apache.org>.
sjanc merged pull request #899:
URL: https://github.com/apache/mynewt-nimble/pull/899


   


----------------------------------------------------------------
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



[GitHub] [mynewt-nimble] prasad-alatkar commented on pull request #899: NimBLE host: Make set Packet Length API public

Posted by GitBox <gi...@apache.org>.
prasad-alatkar commented on pull request #899:
URL: https://github.com/apache/mynewt-nimble/pull/899#issuecomment-755087174


   I am a little surprised and confused with below build error as there is `#include "host/ble_gap.h"` in btshell app.
   
   ```
   Error: apps/btshell/src/main.c: In function 'btshell_datalen':
   
   apps/btshell/src/main.c:1922:10: error: implicit declaration of function 'ble_hs_hci_util_set_data_len'; did you mean 'ble_hs_hci_util_set_random_addr'? [-Werror=implicit-function-declaration]
   
        rc = ble_hs_hci_util_set_data_len(conn_handle, tx_octets, tx_time);
   
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   
             ble_hs_hci_util_set_random_addr
   
   cc1: all warnings being treated as errors
   
   ```


----------------------------------------------------------------
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



[GitHub] [mynewt-nimble] sjanc commented on pull request #899: NimBLE host: Make set Packet Length API public

Posted by GitBox <gi...@apache.org>.
sjanc commented on pull request #899:
URL: https://github.com/apache/mynewt-nimble/pull/899#issuecomment-799200973


   looks good,  could you just squash those into single commit? (it makes git bisect a bit easier in future)


----------------------------------------------------------------
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



[GitHub] [mynewt-nimble] sjanc commented on a change in pull request #899: NimBLE host: Make set Packet Length API public

Posted by GitBox <gi...@apache.org>.
sjanc commented on a change in pull request #899:
URL: https://github.com/apache/mynewt-nimble/pull/899#discussion_r593282087



##########
File path: nimble/host/include/host/ble_gap.h
##########
@@ -1214,6 +1214,23 @@ struct ble_gap_ext_adv_params {
     uint8_t sid;
 };
 
+/**
+ * Configure LE Data Length in controller (OGF = 0x08, OCF = 0x0022).
+ *
+ * @param conn_handle      Connection handle.
+ * @param tx_octets        The preferred value of payload octets that the Controller
+ *                         should use for a new connection (Range
+ *                         0x001B-0x00FB).
+ * @param tx_time          The preferred maximum number of microseconds that the local Controller
+ *                         should use to transmit a single link layer packet
+ *                         (Range 0x0148-0x4290).
+ *
+ * @return              0 on success,
+ *                      other error code on failure.
+ */
+int ble_hs_hci_util_set_data_len(uint16_t conn_handle, uint16_t tx_octets,

Review comment:
       And for build error, this should not be under #if MYNEWT_VAL(BLE_EXT_ADV)
   
   maybe just place it ble_gap_update_params()




----------------------------------------------------------------
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



[GitHub] [mynewt-nimble] apache-mynewt-bot commented on pull request #899: NimBLE host: Make set Packet Length API public

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on pull request #899:
URL: https://github.com/apache/mynewt-nimble/pull/899#issuecomment-754718356


   
   <!-- 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