linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: Szymon Czapracki <szymon.czapracki@codecoup.pl>
Cc: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH 4/8] monitor: Decode LE Periodic Advertising Sync Transfer command
Date: Tue, 7 Jan 2020 15:47:49 -0800	[thread overview]
Message-ID: <CABBYNZKmOigzDcKW0SEfbE2fWZMV5FZypSRkr0aiUaLm3A8PTQ@mail.gmail.com> (raw)
In-Reply-To: <20200107091833.14921-4-szymon.czapracki@codecoup.pl>

Hi Szymon,

On Tue, Jan 7, 2020 at 1:20 AM Szymon Czapracki
<szymon.czapracki@codecoup.pl> wrote:
>
> < HCI Command: LE Periodic Advertising Sync Transfer (0x08|0x005a) plen 6
>         Connection handle: 1
>         Service data: 0x0001
>         Sync handle: 1
> > HCI Event: Command Status (0x0f) plen 4
>       LE Periodic Advertising Sync Transfer (0x08|0x005a) ncmd 1
>         Status: Unknown HCI Command (0x01)
>
> Change-Id: I9009c6c2299cc5e56bb94ddd46e8accbacbcc800\

Looks like the gerrit Change-Id had sleep in.

> ---
>  monitor/bt.h     |  7 +++++++
>  monitor/packet.c | 19 +++++++++++++++++++
>  2 files changed, 26 insertions(+)
>
> diff --git a/monitor/bt.h b/monitor/bt.h
> index bb373b528..efaf80f55 100644
> --- a/monitor/bt.h
> +++ b/monitor/bt.h
> @@ -2467,6 +2467,13 @@ struct bt_hci_cmd_set_periodic_adv_rec_enable {
>         uint8_t  enable;
>  } __attribute__ ((packed));
>
> +#define BT_HCI_CMD_PERIODIC_SYNC_TRANS 0x205a
> +struct bt_hci_cmd_periodic_sync_trans {
> +       uint16_t handle;
> +       uint16_t service_data;
> +       uint16_t sync_handle;
> +} __attribute__ ((packed));
> +
>  #define BT_HCI_EVT_INQUIRY_COMPLETE            0x01
>  struct bt_hci_evt_inquiry_complete {
>         uint8_t  status;
> diff --git a/monitor/packet.c b/monitor/packet.c
> index c1e449a68..06fd72537 100644
> --- a/monitor/packet.c
> +++ b/monitor/packet.c
> @@ -4025,6 +4025,13 @@ static void status_rsp(const void *data, uint8_t size)
>         print_status(status);
>  }
>
> +static void status_handle_rsp(const void *data, uint8_t size)
> +{
> +       uint8_t status = *((const uint8_t *) data);
> +       print_status(status);
> +       print_field("Connection handle: %d", get_u8(data + 1));
> +}
> +
>  static void status_bdaddr_rsp(const void *data, uint8_t size)
>  {
>         uint8_t status = *((const uint8_t *) data);
> @@ -7598,6 +7605,15 @@ static void le_periodic_adv_rec_enable(const void *data, uint8_t size)
>         print_enable("Reporting", cmd->enable);
>  }
>
> +static void le_periodic_adv_sync_trans(const void *data, uint8_t size)
> +{
> +       const struct bt_hci_cmd_periodic_sync_trans *cmd = data;
> +
> +       print_field("Connection handle: %d", cmd->handle);
> +       print_field("Service data: 0x%4.4x", cmd->service_data);
> +       print_field("Sync handle: %d", cmd->sync_handle);
> +}
> +
>  struct opcode_data {
>         uint16_t opcode;
>         int bit;
> @@ -8394,6 +8410,9 @@ static const struct opcode_data opcode_table[] = {
>         { 0x2059, 325, "LE Periodic Advertising Receive Enable",
>                                 le_periodic_adv_rec_enable, 3, true,
>                                 status_rsp, 1, true },
> +       { 0x205a, 326, "LE Periodic Advertising Sync Transfer",
> +                               le_periodic_adv_sync_trans, 6, true,
> +                               status_handle_rsp, 3, true },
>         { }
>  };
>
> --
> 2.24.1
>


-- 
Luiz Augusto von Dentz

  reply	other threads:[~2020-01-07 23:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-07  9:18 [PATCH 1/8] monitor: Update periodic sync commands Szymon Czapracki
2020-01-07  9:18 ` [PATCH 2/8] monitor: Decode LE Periodic Advertising Sync Transfer Received Event Szymon Czapracki
2020-01-07 23:43   ` Luiz Augusto von Dentz
2020-01-08  9:53     ` Szymon Janc
2020-01-08 18:22       ` Luiz Augusto von Dentz
2020-01-07  9:18 ` [PATCH 3/8] monitor: Decode LE Set Periodic Advertising Receive Enable command Szymon Czapracki
2020-01-07  9:18 ` [PATCH 4/8] monitor: Decode LE Periodic Advertising Sync Transfer command Szymon Czapracki
2020-01-07 23:47   ` Luiz Augusto von Dentz [this message]
2020-01-07  9:18 ` [PATCH 5/8] monitor: Decode LE Periodic Advertising Set Info " Szymon Czapracki
2020-01-07 23:48   ` Luiz Augusto von Dentz
2020-01-07  9:18 ` [PATCH 6/8] monitor: Decode LE Set Periodic Adv Sync Transfer Parameterers command Szymon Czapracki
2020-01-07  9:18 ` [PATCH 7/8] monitor: Decode LE Set Default Periodic Adv Sync Transfer Params. command Szymon Czapracki
2020-01-07  9:18 ` [PATCH 8/8] monitor: Decode LE CTE Request Failed event Szymon Czapracki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABBYNZKmOigzDcKW0SEfbE2fWZMV5FZypSRkr0aiUaLm3A8PTQ@mail.gmail.com \
    --to=luiz.dentz@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=szymon.czapracki@codecoup.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).