* [PATCH BlueZ v1 0/1] Support for Enhanced Accept Sync Connection Request command in BlueZ emulator
@ 2025-12-24 6:34 Mahesh Talewad
2025-12-24 6:34 ` [PATCH BlueZ v1 1/1] Enhanced Accept Synchronous Connection Request command is handled in emulator Mahesh Talewad
0 siblings, 1 reply; 3+ messages in thread
From: Mahesh Talewad @ 2025-12-24 6:34 UTC (permalink / raw)
To: linux-bluetooth
Cc: devyani.godbole, luiz.dentz, sarveshwar.bajaj, mahesh.talewad,
vinit.mehta
Hello Maintainers,
In this PR, we have introduced support for Enhanced Accept Synchronous
Connection Request command into BlueZ emulator.
Thanks and regards,
Mahesh Vithal Talewad
Mahesh Talewad (1):
Enhanced Accept Synchronous Connection Request command is handled in
emulator.
emulator/btdev.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 63 insertions(+), 1 deletion(-)
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH BlueZ v1 1/1] Enhanced Accept Synchronous Connection Request command is handled in emulator.
2025-12-24 6:34 [PATCH BlueZ v1 0/1] Support for Enhanced Accept Sync Connection Request command in BlueZ emulator Mahesh Talewad
@ 2025-12-24 6:34 ` Mahesh Talewad
2025-12-24 7:39 ` Support for Enhanced Accept Sync Connection Request command in BlueZ emulator bluez.test.bot
0 siblings, 1 reply; 3+ messages in thread
From: Mahesh Talewad @ 2025-12-24 6:34 UTC (permalink / raw)
To: linux-bluetooth
Cc: devyani.godbole, luiz.dentz, sarveshwar.bajaj, mahesh.talewad,
vinit.mehta
Implemented the command - Enhanced Accept Synchronous Connection Request
command in emulator[emulator/btdev.c].
Signed-off-by: Mahesh Talewad <mahesh.talewad@nxp.com>
---
emulator/btdev.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 63 insertions(+), 1 deletion(-)
diff --git a/emulator/btdev.c b/emulator/btdev.c
index be43623e8..55367cc7d 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -3434,6 +3434,64 @@ static int cmd_get_mws_transport_config(struct btdev *dev, const void *data,
return 0;
}
+static int cmd_enhanced_accept_sync_conn_req(struct btdev *dev,
+ const void *data, uint8_t len)
+{
+ const struct bt_hci_cmd_enhanced_accept_sync_conn_request *cmd = data;
+ uint8_t status = BT_HCI_ERR_SUCCESS;
+
+ if (cmd->tx_coding_format[0] > 5)
+ status = BT_HCI_ERR_INVALID_PARAMETERS;
+
+ cmd_status(dev, status, BT_HCI_CMD_ENHANCED_ACCEPT_SYNC_CONN_REQUEST);
+
+ return 0;
+}
+
+static int cmd_enhanced_accept_sync_conn_req_complete(struct btdev *dev,
+ const void *data, uint8_t len)
+{
+ const struct bt_hci_cmd_enhanced_accept_sync_conn_request *cmd = data;
+ struct bt_hci_evt_sync_conn_complete cc;
+ struct btdev_conn *conn;
+
+ memset(&cc, 0, sizeof(cc));
+
+ conn = queue_find(dev->conns, match_bdaddr, cmd->bdaddr);
+ if (!conn) {
+ cc.status = BT_HCI_ERR_INVALID_PARAMETERS;
+ goto done;
+ }
+
+ conn = conn_add_sco(conn);
+ if (!conn) {
+ cc.status = BT_HCI_ERR_MEM_CAPACITY_EXCEEDED;
+ goto done;
+ }
+
+
+ cc.status = BT_HCI_ERR_SUCCESS;
+ memcpy(cc.bdaddr, conn->link->dev->bdaddr, 6);
+
+ cc.handle = cpu_to_le16(conn->handle);
+ cc.link_type = 0x02;
+ cc.tx_interval = 0x000c;
+ cc.retrans_window = 0x06;
+ cc.rx_pkt_len = 60;
+ cc.tx_pkt_len = 60;
+ cc.air_mode = cmd->tx_coding_format[0];
+
+done:
+ send_event(dev, BT_HCI_EVT_SYNC_CONN_COMPLETE, &cc, sizeof(cc));
+
+ if (conn)
+ send_event(conn->link->dev, BT_HCI_EVT_SYNC_CONN_COMPLETE,
+ &cc, sizeof(cc));
+
+ return 0;
+
+}
+
#define CMD_BREDR \
CMD(BT_HCI_CMD_SETUP_SYNC_CONN, cmd_setup_sync_conn, \
cmd_setup_sync_conn_complete), \
@@ -3471,7 +3529,10 @@ static int cmd_get_mws_transport_config(struct btdev *dev, const void *data,
CMD(BT_HCI_CMD_GET_MWS_TRANSPORT_CONFIG, cmd_get_mws_transport_config, \
NULL), \
CMD(BT_HCI_CMD_ENHANCED_SETUP_SYNC_CONN, cmd_enhanced_setup_sync_conn, \
- cmd_enhanced_setup_sync_conn_complete)
+ cmd_enhanced_setup_sync_conn_complete), \
+ CMD(BT_HCI_CMD_ENHANCED_ACCEPT_SYNC_CONN_REQUEST, \
+ cmd_enhanced_accept_sync_conn_req, \
+ cmd_enhanced_accept_sync_conn_req_complete)
static int cmd_set_event_mask_2(struct btdev *dev, const void *data,
uint8_t len)
@@ -3604,6 +3665,7 @@ static void set_bredr_commands(struct btdev *btdev)
btdev->commands[23] |= 0x04; /* Read Data Block Size */
btdev->commands[29] |= 0x20; /* Read Local Supported Codecs */
btdev->commands[29] |= 0x08; /* Enhanced Setup Synchronous Conn */
+ btdev->commands[29] |= 0x10; /* Enhanced Accept Sync Connection */
btdev->commands[30] |= 0x08; /* Get MWS Transport Layer Config */
btdev->cmds = cmd_bredr;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: Support for Enhanced Accept Sync Connection Request command in BlueZ emulator
2025-12-24 6:34 ` [PATCH BlueZ v1 1/1] Enhanced Accept Synchronous Connection Request command is handled in emulator Mahesh Talewad
@ 2025-12-24 7:39 ` bluez.test.bot
0 siblings, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2025-12-24 7:39 UTC (permalink / raw)
To: linux-bluetooth, mahesh.talewad
[-- Attachment #1: Type: text/plain, Size: 1428 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=1036285
---Test result---
Test Summary:
CheckPatch PENDING 0.22 seconds
GitLint PENDING 0.28 seconds
BuildEll PASS 20.01 seconds
BluezMake PASS 637.42 seconds
MakeCheck PASS 21.73 seconds
MakeDistcheck PASS 241.63 seconds
CheckValgrind PASS 301.27 seconds
CheckSmatch WARNING 350.75 seconds
bluezmakeextell PASS 182.10 seconds
IncrementalBuild PENDING 0.32 seconds
ScanBuild PASS 1014.04 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
emulator/btdev.c:470:29: warning: Variable length array is used.
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-12-24 7:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-24 6:34 [PATCH BlueZ v1 0/1] Support for Enhanced Accept Sync Connection Request command in BlueZ emulator Mahesh Talewad
2025-12-24 6:34 ` [PATCH BlueZ v1 1/1] Enhanced Accept Synchronous Connection Request command is handled in emulator Mahesh Talewad
2025-12-24 7:39 ` Support for Enhanced Accept Sync Connection Request command in BlueZ emulator bluez.test.bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).