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

Can't debug usb connection on linux (fix included) #3

Closed
GoogleCodeExporter opened this issue Feb 8, 2016 · 1 comment
Closed

Can't debug usb connection on linux (fix included) #3

GoogleCodeExporter opened this issue Feb 8, 2016 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. connect board with PIC, forgetting to set Linux udev rules for file 
permissions
2. run "mphidflash -w EBF_EBBv13_and_above.hex -r" and receive "Error: Device 
not found (is device attached and in Bootloader mode?)"
3. run "mphidflash -d3 -w EBF_EBBv13_and_above.hex -r" and receive only the 
same error.

What is the expected output? What do you see instead?

With "-d 3" expected to see a lot of debugging output. Saw none. When I hacked 
in hid_set_usb_debug() into usb-linux.c (see patch below), I got the debug 
output I needed.

You might also want to consider changing the error message hint from "is device 
attached and in Bootloader mode?" to include something about access or 
permissions.

What version of the product are you using? On what operating system?

1.4 on Ubuntu 10.04 x86_64

Please provide any additional information below.

v1.4 Code was downloaded from
https://code.google.com/p/eggbotcode/downloads/detail?name=mphidflash_1_4.zip&ca
n=2&q=


diff -u mphidflash-1.4.orig/usb-linux.c mphidflash/usb-linux.c
--- mphidflash-1.4.orig/usb-linux.c 2010-07-09 22:02:38.000000000 -0400
+++ mphidflash/usb-linux.c  2010-12-22 12:48:48.342691545 -0500
@@ -82,6 +82,11 @@
    matcher.product_id = productID;
    matcher.matcher_fn = NULL;

+   if (debugLevel >= DEBUG_USB) {
+       hid_set_debug(HID_DEBUG_ALL);
+       hid_set_usb_debug(HID_DEBUG_ALL);
+   }
+
    if(HID_RET_SUCCESS == hid_init()) {
        status = ERR_USB_INIT2;
        if((hid = hid_new_HIDInterface())) {

Original issue reported on code.google.com by rper...@gmail.com on 22 Dec 2010 at 6:10

@GoogleCodeExporter
Copy link
Author

patch applied.

Original comment by fnargwibble on 30 Jun 2014 at 7:40

  • Changed state: fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants