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 2022/02/18 10:35:20 UTC

[GitHub] [mynewt-nimble] andrzej-kaczmarek commented on a change in pull request #1180: bsim: Add EDTT hci test app

andrzej-kaczmarek commented on a change in pull request #1180:
URL: https://github.com/apache/mynewt-nimble/pull/1180#discussion_r809875631



##########
File path: babblesim/apps/edtt_test/transport/edtt/pkg.yml
##########
@@ -0,0 +1,36 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+pkg.name: babblesim/apps/edtt_test/transport/edtt
+pkg.description: Provides communication with EDTT bridge over named pipes
+pkg.author: "Apache Mynewt <de...@mynewt.apache.org>"
+pkg.homepage: "http://mynewt.apache.org/"
+pkg.deps:
+    - "@apache-mynewt-core/sys/console/stub"
+    - "@apache-mynewt-core/sys/log/stub"
+    - "@apache-mynewt-core/sys/stats/full"
+    - "@apache-mynewt-core/kernel/os"
+    - nimble/controller
+    - nimble/transport

Review comment:
       should only depend on nimble/controller

##########
File path: babblesim/apps/edtt_test/hci_test_app/syscfg.yml
##########
@@ -0,0 +1,31 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+syscfg.vals:
+    BLE_HOST: 0
+    BLE_HCI_TRANSPORT: custom
+    MCU_UART_POLLER_PRIO: 3

Review comment:
       I think we could just change uart poller prio in bsim bsp to smth like 9, I assume it should have lowest priority of all tasks. Then edtt poller can be set to 2 (as it is now) and there's no need to override uart.

##########
File path: babblesim/apps/edtt_test/transport/edtt/syscfg.yml
##########
@@ -0,0 +1,57 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+syscfg.defs:
+    EDTT_HCI_LOG_FILE:
+        description: >
+            Path to the HCI log file. Skip file extension
+            because device id and .log will be appended.
+        value: "hci_logs"
+    MCU_EDTT_POLLER_PRIO:
+        description: 'Priority of native EDTT poller task.'
+        type: task_priority
+        value: 2
+    BLE_HCI_EDTT_PORT:
+        description: 'The port to use for the HCI edtt interface'
+        value: 0
+
+    BLE_HCI_ACL_OUT_COUNT:
+        description: >
+            This count is used in creating a pool of elements used by the
+            code to enqueue various elements. In the case of the controller
+            only HCI, this number should be equal to the number of mbufs in
+            the msys pool. For host only, it is really dependent on the
+            number of ACL buffers that the controller tells the host it
+            has.
+        value: 12
+
+    BLE_TRANS_EDTT_SYSINIT_STAGE:
+        description: >
+            Sysinit stage for the UART BLE transport.
+        value: 500
+
+syscfg.vals.BLE_EXT_ADV:
+    BLE_HCI_EVT_BUF_SIZE: 257
+
+syscfg.vals:
+    BLE_ACL_BUF_COUNT: 32
+    BLE_ACL_BUF_SIZE: 255
+    BLE_HCI_EVT_BUF_SIZE: 70

Review comment:
       just set to 257 always, we have plenty of ram on native target

##########
File path: babblesim/targets/edtthci/syscfg.yml
##########
@@ -0,0 +1,10 @@
+syscfg.vals:
+  # EDTT requires 0x123456789ABC address for the first device
+  # and 0x456789ABCDEF for the second one
+  BLE_LL_PUBLIC_DEV_ADDR: 0x123456789ABC  # d=1
+  # BLE_LL_PUBLIC_DEV_ADDR: 0x456789ABCDEF # d=2
+
+  # Default task settings
+  OS_MAIN_STACK_SIZE: 8000
+  EDTT_HCI_LOG_FILE: ("hci_logs")
+  EDTT_HCI_LOGS: 1

Review comment:
       this does not seem to be defined anywhere, I guess it should be used instead of -DEDTT_HCI_LOGS ?

##########
File path: babblesim/apps/edtt_test/transport/edtt/pkg.yml
##########
@@ -0,0 +1,36 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+pkg.name: babblesim/apps/edtt_test/transport/edtt
+pkg.description: Provides communication with EDTT bridge over named pipes
+pkg.author: "Apache Mynewt <de...@mynewt.apache.org>"
+pkg.homepage: "http://mynewt.apache.org/"
+pkg.deps:
+    - "@apache-mynewt-core/sys/console/stub"
+    - "@apache-mynewt-core/sys/log/stub"
+    - "@apache-mynewt-core/sys/stats/full"
+    - "@apache-mynewt-core/kernel/os"
+    - nimble/controller
+    - nimble/transport
+
+pkg.apis:
+    - ble_transport
+
+pkg.init:
+    ble_hci_edtt_init: 'MYNEWT_VAL(BLE_TRANS_EDTT_SYSINIT_STAGE)'

Review comment:
       just add static priority

##########
File path: babblesim/apps/edtt_test/hci_test_app/pkg.yml
##########
@@ -0,0 +1,36 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+pkg.name: babblesim/apps/edtt_test/hci_test_app
+pkg.type: app
+pkg.description: nRF52 on BabbleSim - EDTT tester
+pkg.author: "Codecoup"
+pkg.homepage: "http://mynewt.apache.org/"
+pkg.keywords:
+
+pkg.deps:
+    - "@apache-mynewt-core/sys/console/stub"
+    - "@apache-mynewt-core/sys/log/stub"
+    - "@apache-mynewt-core/sys/stats/full"
+    - "@apache-mynewt-core/kernel/os"
+    - nimble/controller
+    - nimble/transport
+    - babblesim/apps/edtt_test/transport/edtt
+
+pkg.req_apis:
+    - ble_transport

Review comment:
       not needed, this is already required by nimble/transport

##########
File path: babblesim/apps/edtt_test/transport/edtt/syscfg.yml
##########
@@ -0,0 +1,57 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+syscfg.defs:
+    EDTT_HCI_LOG_FILE:
+        description: >
+            Path to the HCI log file. Skip file extension
+            because device id and .log will be appended.
+        value: "hci_logs"
+    MCU_EDTT_POLLER_PRIO:
+        description: 'Priority of native EDTT poller task.'
+        type: task_priority
+        value: 2
+    BLE_HCI_EDTT_PORT:
+        description: 'The port to use for the HCI edtt interface'

Review comment:
       EDTT_HCI_PORT

##########
File path: babblesim/apps/edtt_test/transport/edtt/syscfg.yml
##########
@@ -0,0 +1,57 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+syscfg.defs:
+    EDTT_HCI_LOG_FILE:
+        description: >
+            Path to the HCI log file. Skip file extension
+            because device id and .log will be appended.
+        value: "hci_logs"
+    MCU_EDTT_POLLER_PRIO:

Review comment:
       EDTT_POLLER_PRIO

##########
File path: babblesim/targets/edtthci/pkg.yml
##########
@@ -0,0 +1,5 @@
+pkg.name: babblesim/targets/edtthci

Review comment:
       missing license

##########
File path: babblesim/targets/edtthci/syscfg.yml
##########
@@ -0,0 +1,10 @@
+syscfg.vals:

Review comment:
       missing license

##########
File path: babblesim/targets/edtthci/syscfg.yml
##########
@@ -0,0 +1,10 @@
+syscfg.vals:
+  # EDTT requires 0x123456789ABC address for the first device
+  # and 0x456789ABCDEF for the second one
+  BLE_LL_PUBLIC_DEV_ADDR: 0x123456789ABC  # d=1
+  # BLE_LL_PUBLIC_DEV_ADDR: 0x456789ABCDEF # d=2
+
+  # Default task settings
+  OS_MAIN_STACK_SIZE: 8000

Review comment:
       not needed

##########
File path: babblesim/apps/edtt_test/hci_test_app/pkg.yml
##########
@@ -0,0 +1,36 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+pkg.name: babblesim/apps/edtt_test/hci_test_app
+pkg.type: app
+pkg.description: nRF52 on BabbleSim - EDTT tester
+pkg.author: "Codecoup"
+pkg.homepage: "http://mynewt.apache.org/"
+pkg.keywords:
+
+pkg.deps:
+    - "@apache-mynewt-core/sys/console/stub"
+    - "@apache-mynewt-core/sys/log/stub"
+    - "@apache-mynewt-core/sys/stats/full"
+    - "@apache-mynewt-core/kernel/os"
+    - nimble/controller
+    - nimble/transport
+    - babblesim/apps/edtt_test/transport/edtt

Review comment:
       app pkg should depend on nimble/transport and transport/edtt only, then transport should depend on nimble/controller




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

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org