Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add weida raw plugin #7247

Closed
wants to merge 232 commits into from
Closed

Add weida raw plugin #7247

wants to merge 232 commits into from

Conversation

chenhn123
Copy link
Collaborator

Type of pull request:

Checklist

  • Fill out README.md with update protocol
  • Fill out README.md with any custom quirks and flags
  • Fill out README.md with the vendor ID security value
  • Implement FuFirmware->write() and include at least one fuzzer testcase in src/fuzzing/firmware for any custom FuFirmware subclass
  • CI run of the plugin for at least one target
  • Document targets CI isn't currently run and the reasons (i.e. minimum versions needed or distribution limitations etc).

@chenhn123 chenhn123 changed the title My new change Add weida raw plugin May 13, 2024
return FALSE;
self->firmware_id = fu_memread_uint32(&buf[1], G_LITTLE_ENDIAN);
self->hardware_id = fu_memread_uint32(&buf[5], G_LITTLE_ENDIAN);
self->serial_number = fu_memread_uint32(&buf[9], G_LITTLE_ENDIAN);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fu_device_set_serial_number() here (with a string)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohh you do, ignore me. I think in this case don't store the serial_number in self, just read it locally to this function

hughsie and others added 27 commits May 21, 2024 01:32
This allows us to set the device status (and maybe the percentage in the future)
when dumping the firmware from the device.
Signed-off-by: Richard Hughes <richard@hughsie.com>
Signed-off-by: Richard Hughes <richard@hughsie.com>
Added GUID constructed from the Alias. In case if the device has no
Modailas property the VID is not set, and the Alias-based name allows
to clearly match the device:
  e3dfc8e1-e923-55b1-a2b7-1c6d82e312d2 <- BLUETOOTH\ALIAS_CCC5171

Used Alias property instead of the Name, since BlueZ documentation has
the comment for the Name property:
  "This value is only present for completeness. It is better to always
  use the Alias property when displaying the devices name.
  If the Alias property is unset, it will reflect this value which makes
  it more convenient."
https://github.com/luetzel/bluez/blob/master/doc/device-api.txt#L123
Some BT devices don't provide VID, so fwupd can't detect such devices
properly. In the same time, the device might announce service with
unique UUID for firmware upgrading.

This commit allows to detect BT devices by UUID of the updating
service, for instance:
  21608f80-6c9c-5cd1-91ed-0fbf18e31958 ← BLUETOOTH\GATT_00001100-d102-11e1-9b23-00025b00a5a5

In addition, added querying of Battery service if available, and
battery percentage is set according to received value

If Device Information service is available it might also contain
useful information for device identification, see
https://www.bluetooth.com/specifications/dis-1-2/ for a full list.

Also, allow to acquire write and notify for BlueZ devices, which
allows us to interact with the device directly via file descriptor
without D-Bus usage for every data portion.
Signed-off-by: Richard Hughes <richard@hughsie.com>
This should fix flashing the wacom_usb touch module.

Resolves: fwupd#7267
For some unknown [UNIX?] reason, setting the environment variable does not work
after setting up the SIGINT handler.

Just do the latter later in the startup process.
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@hughsie
Copy link
Member

hughsie commented May 21, 2024

@chenhn123 I've sent you an invite to the project, and will create a new weida/raw branch we can work on together.

@hughsie
Copy link
Member

hughsie commented May 21, 2024

Lets carry on in #7275

@hughsie hughsie closed this May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet