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

Use the device ID to tag emulated devices #7330

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

hughsie
Copy link
Member

@hughsie hughsie commented Jun 6, 2024

The backend ID is typically a sysfs path or USB platform ID -- the latter working well for USB devices, but not working for devices with autoincrementing values (e.g. hidraw) or random values (e.g. bluetooth), for example: /sys/devices/0000:00:14.0/usb1/1-3/1-3:1.1/0003:03F0:6841.010E/hidraw/hidraw6

Just use the device ID instead, as that's already made up of the physical and logical IDs combined, which is exactly what we want to use for identification.

Fixes #7095

Type of pull request:

The backend ID is typically a sysfs path or USB platform ID -- the latter
working well for USB devices, but not working for devices with autoincrementing
values (e.g. hidraw) or random values (e.g. bluetooth), for example:
`/sys/devices/0000:00:14.0/usb1/1-3/1-3:1.1/0003:03F0:6841.010E/hidraw/hidraw6`

Just use the device ID instead, as that's already made up of the physical and
logical IDs combined, which is exactly what we want to use for identification.

Fixes #7095
@superm1 superm1 merged commit 2fe1462 into main Jun 6, 2024
17 of 18 checks passed
@superm1 superm1 deleted the hughsie/emulation_backend_ids branch June 6, 2024 14:32
@sam412081go
Copy link
Collaborator

Thank you for the fix. I am currently out of the office. Will test it next monday.

@sam412081go
Copy link
Collaborator

fwupd_daemon.txt
fwupdmgr.txt

@hughsie @superm1
I follow the page Setup fwupd development environment to set up environment to use fwupdmgr emulation device(one terminal tab for fwupd daemon, one terminal tab for fwupdmgr).

I use Device ID to tag my device,and it looks like the emulation-tag can detect my device, but emulation-save is still not working.
It still shows below when I use emulation-save.

WARNING: This package has not been validated, it may not work properly.
failed to save emulation data: no emulation data, perhaps no devices have been added?

Screenshot from 2024-06-12 16-57-29

I usescript ./fwupd_daemon.txtand script ./fwupdmgr.txt to record log history.
The attached "fwupd_daemon.txt" is log for fwupd daemon.
The attached "fwupdmgr.txt" is log for fwupdmgr tool.

My fwupd repository is up-to-data as of today(7f8855a)

@sam412081go
Copy link
Collaborator

By the way, After my device updates success, it will automatically reset, causing the USB to re-enumerate. Will this have any impact?

@hughsie
Copy link
Member Author

hughsie commented Jun 13, 2024

After my device updates success, it will automatically reset, causing the USB to re-enumerate

I think that's fine.

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.

Plugin pixart-rf has a coverage score of 11%
3 participants