MPLAB X on Linux – USB permission


If you are trying to use Microstick development or other debuggers/programmers (PICkit 2, PICkit 3, MPLAB ICD 3 In-Circuit Debugger or MPLAB REAL ICE In-Circuit Emulator) in MPLAB®X IDE on Linux you will get error.
For example when you are trying to connect to Microstick development board you will get the following error:
Could not connect to tool hardware: MICROSTICKPlatformTool, com.microchip.mplab.mdbcore.skde.SKDEManager

Behind of this error are USB permission problems. In Linux only root can write and read directly the USB peripherals by default. I you would like to use USB with none root account you have to give permission for your account. The easiest way to solve the problem you have to create new security group with read/write access to Microchip USB devices and add yourself to this group.
 
The following step-by-step manual give one solution to resolve the USB permission problem:
The manual was tested with MPLAB® X IDE v1.80  on Ubuntu Linux 12.04 LTS operation system.

Step #1:
Open a new terminal window: Press Control+Alt+T in Gnome or in Unity.

Step #2:
Create a new group with name "microchip":
sudo groupadd -g 200 microchip

Step #3:
Create a new rules file with editor:
sudo gedit /etc/udev/rules.d/26-microchip.rules

Step #4:
Copy this text to opened file:
#Read/write access to Microchip devices
ATTR{idVendor}=="04d8", OWNER:="root", GROUP:="microchip", MODE:="0660"
Save and close the file.

Step #5:
Add yourself to group:
sudo adduser YOUR_ACCOUNT_NAME microchip
If you don't now your account name, you can get it with this command:
whoami

Step #6:
Reboot your computer:
sudo reboot

After reboot you will be able to use Microchip's USB debuggers/programmers in MPLAB® X IDE with your account.