-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modified HCI Inquire to handle being not supported #2
Conversation
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm...
The Inquire command should return a Command Status event, which has three fields (status, Num_HCI_Cmd_packets and Command_Opcode. Why are the last two fields not present?
The tests HCI/CCO/BV-07-C & HCI/GEV/BV-01-C are failing in EDTT, while the issue is resolved let's disable them so other tests can be run in CI For more information see: zephyrproject-rtos#22085 EDTTool/EDTT#2 Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
The tests HCI/CCO/BV-07-C & HCI/GEV/BV-01-C are failing in EDTT, while the issue is resolved let's disable them so other tests can be run in CI For more information see: #22085 EDTTool/EDTT#2 Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
It should handle both types of responses. The same is true for all commands when unsupported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am really not convinced that we can skip sending Num_HCI_Command_Packets
and
Command_Opcode
, those are mandatory fields in the Command Status event.
I agree with Carles; see BT spec. rev. 5.0, vol 4, part E, chapter 7.7.15, Command Status Event |
@aescolar Those bytes (Num complete and opcode) was discarded from the command complete event here: https://github.com/zephyrproject-rtos/zephyr/blob/master/tests/bluetooth/bsim_bt/edtt_ble_test_app/hci_test_app/src/main.c#L179 |
I think it is best to ask @heri-developer as he wrote that app. @heri-developer can you comment? |
It's also not sent whether it is a command complete or a command status. If we want to verify that the right one is used on the python side we should include that as well. It is also needed for the case where unknown response should support both command complete and command status, because the order of ncmd, opcode and status will be different depending on the type. |
Closing this, will be address in a new PR. |
With this patch, when "--store_btsnoop=true", the HCI logs are stored in the btsnoop_[timestamp].log which can be read by e.g. btmon -r By defult it is false; When "--btmon_socket_path=socket_path" is provided, edttool will try to connect to unix socket opened by "btmon -s socket_path" By default edttool tries to connect /tmp/btmon-sock UpperTester is a [hci10] and LowerTester is a [hci11] This helps to verify HCI communication = New Index: 00:00:00:00:00:00 (Primary,VIRTIO,UpperTester) [hci10] 0.551917 = Open Index: 00:00:00:00:00:00 [hci10] 0.551933 = New Index: 00:00:00:00:00:00 (Primary,VIRTIO,LowerTester) [hci11] 0.551943 = Open Index: 00:00:00:00:00:00 [hci11] 0.551947 = Testing session started: [hci10] 0.552393 = IAL/CIS/UNF/PER/BV-01-C: [hci10] 0.563156 < HCI Command: Reset (0x03|0x0003) plen 0 EDTTool#1 [hci10] 0.563523 > HCI Event: Command Complete (0x0e) plen 4 EDTTool#2 [hci10] 0.563886 Reset (0x03|0x0003) ncmd 1 Status: Success (0x00) < HCI Command: Read Local Supported Features (0x04|0x0003) plen 0 EDTTool#3 [hci10] 0.563939 > HCI Event: Command Complete (0x0e) plen 12 EDTTool#4 [hci10] 0.564344 Read Local Supported Features (0x04|0x0003) ncmd 1 Status: Success (0x00) Features: 0x00 0x00 0x00 0x00 0x60 0x00 0x00 0x00 BR/EDR Not Supported LE Supported (Controller) < HCI Command: LE Read Local Supported Features (0x08|0x0003) plen 0 EDTTool#5 [hci10] 0.564382 > HCI Event: Command Complete (0x0e) plen 12 EDTTool#6 [hci10] 0.564989 LE Read Local Supported Features (0x08|0x0003) ncmd 1 Status: Success (0x00) Features: 0xff 0x7f 0x01 0x7f 0x0e 0x00 0x00 0x00 LE Encryption Connection Parameter Request Procedure Extended Reject Indication Slave-initiated Features Exchange LE Ping LE Data Packet Length Extension LL Privacy Extended Scanner Filter Policies LE 2M PHY Stable Modulation Index - Transmitter Stable Modulation Index - Receiver LE Coded PHY LE Extended Advertising LE Periodic Advertising Channel Selection Algorithm EDTTool#2 Minimum Number of Used Channels Procedure Periodic Advertising Sync Transfer - Sender Periodic Advertising Sync Transfer - Recipient Sleep Clock Accuracy Updates Remote Public Key Validation Connected Isochronous Stream - Master Connected Isochronous Stream - Slave Isochronous Broadcaster LE Power Control Request LE Power Change Indication LE Path Lost Monitoring < HCI Command: Set Event Mask (0x03|0x0001) plen 8 EDTTool#7 [hci10] 0.565037 Mask: 0x20001fffffffffff Inquiry Complete Inquiry Result Connection Complete Connection Request Disconnection Complete Authentication Complete Remote Name Request Complete Encryption Change Change Connection Link Key Complete Master Link Key Complete Read Remote Supported Features Complete Read Remote Version Information Complete QoS Setup Complete Command Complete Command Status Hardware Error Flush Occurred Role Change Number of Completed Packets Mode Change Return Link Keys PIN Code Request Link Key Request Link Key Notification Loopback Command
With this patch, when "--store_btsnoop=true", the HCI logs are stored in the btsnoop_[timestamp].log which can be read by e.g. btmon -r By defult it is false; When "--btmon_socket_path=socket_path" is provided, edttool will try to connect to unix socket opened by "btmon -s socket_path" By default edttool tries to connect /tmp/btmon-sock UpperTester is a [hci10] and LowerTester is a [hci11] This helps to verify HCI communication = New Index: 00:00:00:00:00:00 (Primary,VIRTIO,UpperTester) [hci10] 0.551917 = Open Index: 00:00:00:00:00:00 [hci10] 0.551933 = New Index: 00:00:00:00:00:00 (Primary,VIRTIO,LowerTester) [hci11] 0.551943 = Open Index: 00:00:00:00:00:00 [hci11] 0.551947 = Testing session started: [hci10] 0.552393 = IAL/CIS/UNF/PER/BV-01-C: [hci10] 0.563156 < HCI Command: Reset (0x03|0x0003) plen 0 #1 [hci10] 0.563523 > HCI Event: Command Complete (0x0e) plen 4 #2 [hci10] 0.563886 Reset (0x03|0x0003) ncmd 1 Status: Success (0x00) < HCI Command: Read Local Supported Features (0x04|0x0003) plen 0 #3 [hci10] 0.563939 > HCI Event: Command Complete (0x0e) plen 12 #4 [hci10] 0.564344 Read Local Supported Features (0x04|0x0003) ncmd 1 Status: Success (0x00) Features: 0x00 0x00 0x00 0x00 0x60 0x00 0x00 0x00 BR/EDR Not Supported LE Supported (Controller) < HCI Command: LE Read Local Supported Features (0x08|0x0003) plen 0 #5 [hci10] 0.564382 > HCI Event: Command Complete (0x0e) plen 12 #6 [hci10] 0.564989 LE Read Local Supported Features (0x08|0x0003) ncmd 1 Status: Success (0x00) Features: 0xff 0x7f 0x01 0x7f 0x0e 0x00 0x00 0x00 LE Encryption Connection Parameter Request Procedure Extended Reject Indication Slave-initiated Features Exchange LE Ping LE Data Packet Length Extension LL Privacy Extended Scanner Filter Policies LE 2M PHY Stable Modulation Index - Transmitter Stable Modulation Index - Receiver LE Coded PHY LE Extended Advertising LE Periodic Advertising Channel Selection Algorithm #2 Minimum Number of Used Channels Procedure Periodic Advertising Sync Transfer - Sender Periodic Advertising Sync Transfer - Recipient Sleep Clock Accuracy Updates Remote Public Key Validation Connected Isochronous Stream - Master Connected Isochronous Stream - Slave Isochronous Broadcaster LE Power Control Request LE Power Change Indication LE Path Lost Monitoring < HCI Command: Set Event Mask (0x03|0x0001) plen 8 #7 [hci10] 0.565037 Mask: 0x20001fffffffffff Inquiry Complete Inquiry Result Connection Complete Connection Request Disconnection Complete Authentication Complete Remote Name Request Complete Encryption Change Change Connection Link Key Complete Master Link Key Complete Read Remote Supported Features Complete Read Remote Version Information Complete QoS Setup Complete Command Complete Command Status Hardware Error Flush Occurred Role Change Number of Completed Packets Mode Change Return Link Keys PIN Code Request Link Key Request Link Key Notification Loopback Command
With this patch, when "--store_btsnoop=true", the HCI logs are stored in the btsnoop_[timestamp].log which can be read by e.g. btmon -r By defult it is false; When "--btmon_socket_path=socket_path" is provided, edttool will try to connect to unix socket opened by "btmon -s socket_path" By default edttool tries to connect /tmp/btmon-sock UpperTester is a [hci10] and LowerTester is a [hci11] This helps to verify HCI communication = New Index: 00:00:00:00:00:00 (Primary,VIRTIO,UpperTester) [hci10] 0.551917 = Open Index: 00:00:00:00:00:00 [hci10] 0.551933 = New Index: 00:00:00:00:00:00 (Primary,VIRTIO,LowerTester) [hci11] 0.551943 = Open Index: 00:00:00:00:00:00 [hci11] 0.551947 = Testing session started: [hci10] 0.552393 = IAL/CIS/UNF/PER/BV-01-C: [hci10] 0.563156 < HCI Command: Reset (0x03|0x0003) plen 0 EDTTool#1 [hci10] 0.563523 > HCI Event: Command Complete (0x0e) plen 4 EDTTool#2 [hci10] 0.563886 Reset (0x03|0x0003) ncmd 1 Status: Success (0x00) < HCI Command: Read Local Supported Features (0x04|0x0003) plen 0 EDTTool#3 [hci10] 0.563939 > HCI Event: Command Complete (0x0e) plen 12 EDTTool#4 [hci10] 0.564344 Read Local Supported Features (0x04|0x0003) ncmd 1 Status: Success (0x00) Features: 0x00 0x00 0x00 0x00 0x60 0x00 0x00 0x00 BR/EDR Not Supported LE Supported (Controller) < HCI Command: LE Read Local Supported Features (0x08|0x0003) plen 0 EDTTool#5 [hci10] 0.564382 > HCI Event: Command Complete (0x0e) plen 12 EDTTool#6 [hci10] 0.564989 LE Read Local Supported Features (0x08|0x0003) ncmd 1 Status: Success (0x00) Features: 0xff 0x7f 0x01 0x7f 0x0e 0x00 0x00 0x00 LE Encryption Connection Parameter Request Procedure Extended Reject Indication Slave-initiated Features Exchange LE Ping LE Data Packet Length Extension LL Privacy Extended Scanner Filter Policies LE 2M PHY Stable Modulation Index - Transmitter Stable Modulation Index - Receiver LE Coded PHY LE Extended Advertising LE Periodic Advertising Channel Selection Algorithm EDTTool#2 Minimum Number of Used Channels Procedure Periodic Advertising Sync Transfer - Sender Periodic Advertising Sync Transfer - Recipient Sleep Clock Accuracy Updates Remote Public Key Validation Connected Isochronous Stream - Master Connected Isochronous Stream - Slave Isochronous Broadcaster LE Power Control Request LE Power Change Indication LE Path Lost Monitoring < HCI Command: Set Event Mask (0x03|0x0001) plen 8 EDTTool#7 [hci10] 0.565037 Mask: 0x20001fffffffffff Inquiry Complete Inquiry Result Connection Complete Connection Request Disconnection Complete Authentication Complete Remote Name Request Complete Encryption Change Change Connection Link Key Complete Master Link Key Complete Read Remote Supported Features Complete Read Remote Version Information Complete QoS Setup Complete Command Complete Command Status Hardware Error Flush Occurred Role Change Number of Completed Packets Mode Change Return Link Keys PIN Code Request Link Key Request Link Key Notification Loopback Command
Signed-off-by: Vinayak Kariappa Chettimada vich@nordicsemi.no