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

Allow the same endpoint number to be reused for IN and OUT endpoints separately #1

Merged
merged 1 commit into from
Jun 14, 2017

Conversation

zagrodzki
Copy link
Collaborator

..., effectively allowing two endpoints with the same number - endpoint numbers are not unique, only endpoint addresses are.

separately, effectively allowing two endpoints with the same number
- numbers are no unique, only endpoint addresses are.
@coveralls
Copy link

coveralls commented Jun 13, 2017

Coverage Status

Coverage increased (+1.4%) to 71.269% when pulling 2b78100 on same-endpoint-in-out into 883910d on master.

@half2me
Copy link
Contributor

half2me commented Jun 14, 2017

I still get this problem:
ep #1 OUT (address 0x01) bulk [64 bytes] is not an IN endpoint

@zagrodzki
Copy link
Collaborator Author

@half2me it seems like you didn't pull the right branch - that error message was removed in this pull request, so I wouldn't expect to see ever it if you had the correct branch.

@half2me
Copy link
Contributor

half2me commented Jun 14, 2017

@zagrodzki
cd $GOPATH/src/github.com/google/gousb
git status :

Your branch is up-to-date with 'origin/same-endpoint-in-out'.
nothing to commit, working tree clean```
I did a `rm -rf $GOPATH/pkg/github.com/google/`
I've rebuilt my own packages. Anything else I need to do?

@zagrodzki
Copy link
Collaborator Author

@half2me that should definitely have been enough, you can also check that your result of "git branch -v" matches the commit ID from the pull request:

same-endpoint-in-out 2b78100 Allow the same endpoint number ...

If that's the case, then I think the problem might be with your paths setup, i.e. the package you use when compilng your binary is not from the same directory that you showed above - maybe your compilation runs a "go get" somewhere outside of that dir?. I don't really want to spend time here debugging local client setup, so if you don't come up with anything useful, you can just wait until this pull req is merged into master, and then try again.

@zagrodzki
Copy link
Collaborator Author

FWIW, that error message is present in interface.go in the master branch, line 120. In the same-endpoint-in-out branch, the string "is not an" does not occur anywhere in the code.

@half2me
Copy link
Contributor

half2me commented Jun 14, 2017

@zagrodzki Gogland EAP made a new GOPATH and was using that... damn :)

@zagrodzki
Copy link
Collaborator Author

@stapelberg an alternative approach would be to have two separate InEndpoints/OutEndpoints maps in the interface descriptor, indexed by endpoint number. That would avoid the "EndpointAddress" type and having an "Address" field in the endpoint descriptor. Let me know if you think that would be a cleaner approach.

@half2me
Copy link
Contributor

half2me commented Jun 14, 2017

@zagrodzki So the endpoint problem is fixed, but now I get this, when setting context.Debug(1)
libusb: error [submit_bulk_transfer] bulk transfer failed (dir = In): unknown error (0xe0004061) (code = 0xe0004061)

@zagrodzki
Copy link
Collaborator Author

@half2me please file a separate issue for that one, to keep the conversations focused.
Please set the context.Debug at the beginning of your program, and attach the full debug log, including all the earlier messages before that final error.

@zagrodzki zagrodzki merged commit 00e8f24 into master Jun 14, 2017
@zagrodzki zagrodzki deleted the same-endpoint-in-out branch June 14, 2017 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants