Skip to content

Conversation

@BluezTestBot
Copy link
Owner

In current implementaion kernel is sending legacy sco command
['Accept Synchronous Connection Request command'] always even
though controller supports enhanced synchronous connection
command.

In this commit, we have implemented the code in such a way that
when Connect request for eSco is received, if controller supports
enhanced synchronous connection command then it will go for
'Enhanced Accept Synchronous Connection Request command' or else
it will go for legacy command['Accept Synchronous Connection
Request command'].

btmon trace:

HCI Event: Connect Request (0x04) plen 10
Address: 10:EC:81:61:71:67
Class: 0x000000
Major class: Miscellaneous
Minor class: 0x00
Link type: eSCO (0x02)
< HCI Command: Enhanced Accept Synchronous Connection
Request (0x01|0x003e) plen 63
Address: 10:EC:81:61:71:67
Transmit bandwidth: 8000
Receive bandwidth: 8000
Transmit Coding Format:
Codec: mSBC (0x05)
Receive Coding Format:
Codec: mSBC (0x05)
Transmit Codec Frame Size: 60
Receive Codec Frame Size: 60
Input Coding Format:
Codec: Linear PCM (0x04)
Output Coding Format:
Codec: Linear PCM (0x04)
Input Coded Data Size: 16
Output Coded Data Size: 16
Input PCM Data Format: 2's complement
Output PCM Data Format: 2's complement
Input PCM Sample Payload MSB Position: 0
Output PCM Sample Payload MSB Position: 0
Input Data Path: HCI
Output Data Path: HCI
Input Transport Unit Size: 1
Output Transport Unit Size: 1
Max latency: 13
Packet type: 0x0380
3-EV3 may not be used
2-EV5 may not be used
3-EV5 may not be used
Retransmission effort: Optimize for link quality (0x02)
HCI Event: Command Status (0x0f) plen 4
Enhanced Accept Synchronous Connection
Request (0x01|0x003e) ncmd 1
Status: Success (0x00)
HCI Event: Synchronous Connect Complete (0x2c) plen 17
Status: Success (0x00)
Handle: 8
Address: 10:EC:81:61:71:67
Link type: eSCO (0x02)
Transmission interval: 0x0c
Retransmission window: 0x04
RX packet length: 60
TX packet length: 60
Air mode: Transparent (0x03)

Signed-off-by: Mahesh Talewad mahesh.talewad@nxp.com

include/net/bluetooth/hci.h | 34 ++++++++++++++
include/net/bluetooth/hci_sync.h | 9 ++++
net/bluetooth/hci_event.c | 27 ++++++-----
net/bluetooth/hci_sync.c | 78 ++++++++++++++++++++++++++++++++
net/bluetooth/sco.c | 34 ++------------
5 files changed, 141 insertions(+), 41 deletions(-)

In current implementaion kernel is sending legacy sco command
['Accept Synchronous Connection Request command'] always even
though controller supports enhanced synchronous connection
command.

In this commit, we have implemented the code in such a way that
when Connect request for eSco is received, if controller supports
enhanced synchronous connection command then it will go for
'Enhanced Accept Synchronous Connection Request command' or else
it will go for legacy command['Accept Synchronous Connection
Request command'].

btmon trace:
> HCI Event: Connect Request (0x04) plen 10
		Address: 10:EC:81:61:71:67
		Class: 0x000000
		  Major class: Miscellaneous
		  Minor class: 0x00
		Link type: eSCO (0x02)
< HCI Command: Enhanced Accept Synchronous Connection
Request (0x01|0x003e) plen 63
		Address: 10:EC:81:61:71:67
		Transmit bandwidth: 8000
		Receive bandwidth: 8000
		Transmit Coding Format:
		  Codec: mSBC (0x05)
		Receive Coding Format:
		  Codec: mSBC (0x05)
		Transmit Codec Frame Size: 60
		Receive Codec Frame Size: 60
		Input Coding Format:
		  Codec: Linear PCM (0x04)
		Output Coding Format:
		  Codec: Linear PCM (0x04)
		Input Coded Data Size: 16
		Output Coded Data Size: 16
		Input PCM Data Format: 2's complement
		Output PCM Data Format: 2's complement
		Input PCM Sample Payload MSB Position: 0
		Output PCM Sample Payload MSB Position: 0
		Input Data Path: HCI
		Output Data Path: HCI
		Input Transport Unit Size: 1
		Output Transport Unit Size: 1
		Max latency: 13
		Packet type: 0x0380
		  3-EV3 may not be used
		  2-EV5 may not be used
		  3-EV5 may not be used
		Retransmission effort: Optimize for link quality (0x02)
> HCI Event: Command Status (0x0f) plen 4
	  Enhanced Accept Synchronous Connection
Request (0x01|0x003e) ncmd 1
		Status: Success (0x00)
> HCI Event: Synchronous Connect Complete (0x2c) plen 17
		Status: Success (0x00)
		Handle: 8
		Address: 10:EC:81:61:71:67
		Link type: eSCO (0x02)
		Transmission interval: 0x0c
		Retransmission window: 0x04
		RX packet length: 60
		TX packet length: 60
		Air mode: Transparent (0x03)

Signed-off-by: Mahesh Talewad <mahesh.talewad@nxp.com>
@github-actions
Copy link

CheckPatch
Desc: Run checkpatch.pl script
Duration: 0.32 seconds
Result: PENDING

@github-actions
Copy link

GitLint
Desc: Run gitlint
Duration: 0.25 seconds
Result: PENDING

@github-actions
Copy link

SubjectPrefix
Desc: Check subject contains "Bluetooth" prefix
Duration: 0.39 seconds
Result: FAIL
Output:

"Bluetooth: " prefix is not specified in the subject

@github-actions
Copy link

BuildKernel
Desc: Build Kernel for Bluetooth
Duration: 23.57 seconds
Result: PASS

@github-actions
Copy link

CheckAllWarning
Desc: Run linux kernel with all warning enabled
Duration: 26.64 seconds
Result: PASS

@github-actions
Copy link

CheckSparse
Desc: Run sparse tool with linux kernel
Duration: 30.13 seconds
Result: WARNING
Output:

net/bluetooth/hci_event.c: note: in included file (through include/net/bluetooth/hci_core.h):net/bluetooth/sco.c: note: in included file:./include/net/bluetooth/hci_core.h:153:35: warning: array of flexible structures

@github-actions
Copy link

BuildKernel32
Desc: Build 32bit Kernel for Bluetooth
Duration: 24.09 seconds
Result: PASS

@github-actions
Copy link

TestRunnerSetup
Desc: Setup kernel and bluez for test-runner
Duration: 506.85 seconds
Result: PASS

@github-actions
Copy link

TestRunner_l2cap-tester
Desc: Run l2cap-tester with test-runner
Duration: 27.56 seconds
Result: PASS

@github-actions
Copy link

TestRunner_iso-tester
Desc: Run iso-tester with test-runner
Duration: 69.06 seconds
Result: PASS

@github-actions
Copy link

TestRunner_bnep-tester
Desc: Run bnep-tester with test-runner
Duration: 6.23 seconds
Result: PASS

@github-actions
Copy link

TestRunner_mgmt-tester
Desc: Run mgmt-tester with test-runner
Duration: 119.89 seconds
Result: FAIL
Output:

Total: 494, Passed: 489 (99.0%), Failed: 1, Not Run: 4

Failed Test Cases
Read Exp Feature - Success                           Failed       0.105 seconds

@github-actions
Copy link

TestRunner_rfcomm-tester
Desc: Run rfcomm-tester with test-runner
Duration: 9.40 seconds
Result: PASS

@github-actions
Copy link

TestRunner_sco-tester
Desc: Run sco-tester with test-runner
Duration: 16.86 seconds
Result: FAIL
Output:

Total: 30, Passed: 26 (86.7%), Failed: 4, Not Run: 0

Failed Test Cases
SCO CVSD Listen - Success                            Timed out    2.757 seconds
SCO CVSD Listen Defer - Success                      Failed       0.131 seconds
SCO CVSD Listen Recv - Success                       Failed       0.125 seconds
SCO CVSD Listen Send - Success                       Failed       0.128 seconds

@github-actions
Copy link

TestRunner_ioctl-tester
Desc: Run ioctl-tester with test-runner
Duration: 10.16 seconds
Result: PASS

@github-actions
Copy link

TestRunner_mesh-tester
Desc: Run mesh-tester with test-runner
Duration: 12.03 seconds
Result: FAIL
Output:

Total: 10, Passed: 8 (80.0%), Failed: 2, Not Run: 0

Failed Test Cases
Mesh - Send cancel - 1                               Timed out    1.924 seconds
Mesh - Send cancel - 2                               Timed out    1.996 seconds

@github-actions
Copy link

TestRunner_smp-tester
Desc: Run smp-tester with test-runner
Duration: 8.54 seconds
Result: PASS

@github-actions
Copy link

TestRunner_userchan-tester
Desc: Run userchan-tester with test-runner
Duration: 6.61 seconds
Result: PASS

@github-actions
Copy link

IncrementalBuild
Desc: Incremental build with the patches in the series
Duration: 0.58 seconds
Result: PENDING

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants