Digistump Forums

The Digispark => Digispark (Original) Support => Topic started by: CBcracker on August 24, 2013, 08:50:22 am

Title: digiUSB monitor code fix
Post by: CBcracker on August 24, 2013, 08:50:22 am
After I got monitor.cpp compiling by installing libusb-compat-devel, it would just crash (segv) on me when I ran it.
Running gdb showed that it was getting a null devHandle.  The code checked if devHandle wasn't null, but didn't give an error if it was null.  The problem in my case was running it as a user with no usb device access permissions.  I've cleaned up the error handling code so it exits with an error now:
 error(2, 0, "Found digiSpark but communication failed - check usb dev permissions");

I committed the changed monitor.cpp in git, so I guess now it's just a matter of someone approving the update.