+typedef struct {
+ uint16_t acl_handle;
+ uint16_t max_interval;
+ uint16_t min_interval;
+ uint16_t sniff_attempt;
+ uint16_t sniff_timeout;
+} __attribute__((packed)) bt_hci_sniff_cmd_t;
+
+void bt_hci_set_sniff_mode(const uint16_t acl_handle, const uint16_t max_interval, const uint16_t min_interval, const uint16_t sniff_attempt, const uint16_t sniff_timeout)
+{
+ bt_hci_sniff_cmd_t sniff_cmd;
+
+ sniff_cmd.acl_handle = acl_handle;
+ sniff_cmd.max_interval = max_interval;
+ sniff_cmd.min_interval = min_interval;
+ sniff_cmd.sniff_attempt = sniff_attempt;
+ sniff_cmd.sniff_timeout = sniff_timeout;
+
+ bt_hci_cmd(HCI_LINK_POLICY_OGF, HCI_SNIFF_MODE_OCF, sizeof(sniff_cmd), &sniff_cmd);
+}
+