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

pyusb backend: add exception for Hexiwear #261

Closed
wants to merge 1 commit into from

Conversation

@aurabindo
Copy link

@aurabindo aurabindo commented Aug 23, 2016

Enable pyOCD to run as normal user, a hack for Hexiwear.
Without this hack, only root user can debug/flash.
Kinetis Design Studio launches pyOCD as normal user.

Signed-off-by: Aurabindo J mail@aurabindo.in

Enable pyOCD to run as normal user, a hack for Hexiwear.
Without this hack, only root user can debug/flash.
Kinetis Design Studio launches pyOCD as normal user.

Signed-off-by: Aurabindo J <mail@aurabindo.in>
@aurabindo
Copy link
Author

@aurabindo aurabindo commented Aug 23, 2016

This fixes #259

@@ -86,6 +86,9 @@ def getAllConnectedInterface():
# This can cause an exception to be thrown if the device
# is malfunctioning.
product = board.product
except ValueError:
if board.idVendor is 0xd28 and board.idProduct is 0x204:
Copy link
Collaborator

@c1728p9 c1728p9 Aug 23, 2016

Choose a reason for hiding this comment

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

So this code is ignoring exceptions that occur on boards with a vid,pid other than 0xd28, 0x204? Can you provide any more details on this? Which VID/PID does Hexiwear have?

@aurabindo
Copy link
Author

@aurabindo aurabindo commented Aug 24, 2016

The intention is to ignore the exception for the specified VID/PID, which belongs to the baseboard, which is part of Hexiwear IoT Kit. To clarify with your question - 0xd28 and 0x204 vid/pid belongs to the debug adapted for Hexiwear, and not the hexiwear itself. This additional board provides extension ports and most importantly an OpenSDA debug adapter. I've been discussing with pyusb devs regarding this, since its not easy for me to make eclipse (Kinetis Design Studio) run pyOCD as root, and they dont seem to be interested in fixing the issue

@c1728p9
Copy link
Collaborator

@c1728p9 c1728p9 commented Aug 24, 2016

@aurabindo, I can't get the links in your last post to work. Could you provide updated links?

@rsalveti
Copy link
Contributor

@rsalveti rsalveti commented Aug 31, 2016

Just proposed #262 and saw this pull request. With #262 I'm generically catching valueerror, which can happen with any device (since it probes all the devices you have in your system).

That + a udev file for your own device should be enough.

Happy to close that and update yours with a more generic solution.

@aurabindo
Copy link
Author

@aurabindo aurabindo commented Sep 1, 2016

I was not sure if this is specific to hexiwear, which is why I didn't go for a generic solution as upstream might not like it. I am still expecting a comment from @c1728p9

Feel free to update mine if you feel that is appropriate. But you have merge rights, and you think a generic solution makes more sense, please go ahead and merge yours.

@c1728p9
Copy link
Collaborator

@c1728p9 c1728p9 commented Sep 1, 2016

Hi @aurabindo, sorry for not responding sooner. It looks like this is problem for boards in general and not specific to the Hexiwear, so the generic solution is probably more appropriate.

@aurabindo
Copy link
Author

@aurabindo aurabindo commented Sep 2, 2016

Thanks for the update @c1728p9. #262 will be more appropriate then

@aurabindo aurabindo closed this Sep 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants