All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roderick Colenbrander <thunderbird2k@gmail.com>
To: Henry Castro <hcvcastro@gmail.com>
Cc: Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] drivers: hid: warn feature report 0x81
Date: Thu, 6 Oct 2022 07:01:57 -0700	[thread overview]
Message-ID: <CAEc3jaCgEB5=3ATdaRXozMT3HrC1JeQVsY_HVF2VgY2oajzyow@mail.gmail.com> (raw)
In-Reply-To: <20221006132240.3706-1-hcvcastro@gmail.com>

On Thu, Oct 6, 2022 at 6:22 AM Henry Castro <hcvcastro@gmail.com> wrote:
>
> Unfortunately, my PS DualShock 4, does not support
> the feature 0x81 to get the MAC address. Instead,
> use a unique hash to fake a MAC address, so I can
> use DS4 to play Retroarch :)
>
> Signed-off-by: Henry Castro <hcvcastro@gmail.com>
> ---
>
> >> I see in the other email. If it doesn't support this request, it is
> >> likely a clone device. We are about to submit a brand new DS4 driver
> >> (for hid-playstation). It will use a different report (0x12) if I
> >> recall which does the same thing. That's the more mainstream one we
> >> use.
>
> I have 2 DualShock 4, I did not notice but I have one DS4 compatible
> (clone, I guess).
>
> The DS4 Sony -> returns -ETIMEDOUT
> The DS4 clone -> returns -EPIPE
>
> Look great the new DS4 driver :)
>

Just for reference if you want to try out if 0x12 works, you can try
this code. This is from the new driver (ps_get_report is from
hid-playstation, but you can just use one of the existing hid calls)
if you wanted to try.

#define DS4_FEATURE_REPORT_PAIRING_INFO        0x12
#define DS4_FEATURE_REPORT_PAIRING_INFO_SIZE    16

    if (hdev->bus == BUS_USB) {
        buf = kzalloc(DS4_FEATURE_REPORT_PAIRING_INFO_SIZE, GFP_KERNEL);
        if (!buf)
            return -ENOMEM;

        ret = ps_get_report(hdev, DS4_FEATURE_REPORT_PAIRING_INFO, buf,
                DS4_FEATURE_REPORT_PAIRING_INFO_SIZE, false);
        if (ret) {
            hid_err(hdev, "Failed to retrieve DualShock4 pairing info:
%d\n", ret);
            goto err_free;
        }

        memcpy(ds4->base.mac_address, &buf[1], sizeof(ds4->base.mac_address));
    } else {

  reply	other threads:[~2022-10-06 14:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-02 22:01 [PATCH 2/2] drivers: hid: warn feature report 0x81 Henry Castro
2022-10-06  4:02 ` Roderick Colenbrander
2022-10-06 13:22   ` Henry Castro
2022-10-06 14:01     ` Roderick Colenbrander [this message]
2022-10-06 14:53       ` Henry Castro
2022-10-30 15:40         ` [PATCH v2] " Henry Castro

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='CAEc3jaCgEB5=3ATdaRXozMT3HrC1JeQVsY_HVF2VgY2oajzyow@mail.gmail.com' \
    --to=thunderbird2k@gmail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=hcvcastro@gmail.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.