-
Notifications
You must be signed in to change notification settings - Fork 36
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
fixed CH546 timeout issue #12
base: master
Are you sure you want to change the base?
Conversation
Reviewer's Guide by SourceryThis pull request fixes a timeout issue by correctly handling the IN endpoint of the USB device. It modifies the Sequence diagram for USB communication with IN/OUT endpointssequenceDiagram
participant App as LED Badge App
participant OUT as USB OUT Endpoint
participant IN as USB IN Endpoint
participant Device as LED Badge Device
Note over App,Device: New implementation with both endpoints
App->>OUT: Write 64-byte chunk
OUT->>Device: Send data
Device->>IN: Send acknowledgment
IN->>App: Read acknowledgment (64 bytes)
Note over App,Device: Process repeats for each chunk
Class diagram showing WriteLibUsb changesclassDiagram
class WriteLibUsb {
-description
-dev
-endpoint_out
-endpoint_in
+get_name()
+get_description()
+_open(device_id)
+close()
+_get_available_devices()
+is_ready()
+_write(buf)
}
note for WriteLibUsb "Modified to handle both IN/OUT endpoints"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Sandr0x00 - I've reviewed your changes - here's some feedback:
Overall Comments:
- Please expand the commit message to explain the technical changes made (splitting USB endpoints and adding response reads) and how this fixes the timeout issue. This will help document the fix for future reference.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
I actually don't know if this causes issues on other devices. Please someone test and report. |
ping This. I tried the Sandro0x00 fork it works nice. Can we commit this to master? Thanks alot |
I'm still having the same error with libusb. But hidapi works fine. I tried with CH583 badge (OEM firmware). I don't have any CH546 badge to test this. |
Fixes #11 and jnweiger#51.
Summary by Sourcery
Bug Fixes: