You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,6 +73,8 @@ The library uses `hidapi` as low-level interface to the device and `easyhid` as
73
73
</pre>
74
74
</details>
75
75
76
+
- **Note:** If you encounter "Failed to open device" errors, see the [Troubleshooting - Linux](./troubleshooting.md#linux) section for device-specific permission setup.
77
+
76
78
-### Windows
77
79
- Install the latest release of hidapi.dll and hidapi.lib from
78
80
the [hidapi releases](https://github.com/libusb/hidapi/releases) page.
Copy file name to clipboardExpand all lines: troubleshooting.md
+66Lines changed: 66 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,6 +96,72 @@ Read descriptor from the device (replace `<VID/PID>` with the VID/PID of your de
96
96
Closing device
97
97
```
98
98
99
+
<hr>
100
+
101
+
## Linux
102
+
103
+
### Failed to open device / Permission denied
104
+
105
+
If you encounter an error like `Failed to open device` or `Permission denied` when trying to use your SpaceMouse on Linux, this is typically a permissions issue. Normal users don't have permission to access HID devices by default.
106
+
107
+
**Error example:**
108
+
```bash
109
+
Traceback (most recent call last):
110
+
File "/home/user/.local/lib/python3.8/site-packages/pyspacemouse/pyspacemouse.py", line 183, in open
111
+
self.device.open()
112
+
File "/home/user/.local/lib/python3.8/site-packages/easyhid/easyhid.py", line 134, in open
113
+
raise HIDException("Failed to open device")
114
+
easyhid.easyhid.HIDException: Failed to open device
115
+
```
116
+
117
+
**Solution:**
118
+
119
+
1.**Find your device's Vendor ID and Product ID:**
120
+
```bash
121
+
lsusb
122
+
```
123
+
Look for your SpaceMouse device. Example output:
124
+
```
125
+
Bus 001 Device 013: ID 256f:c652 3Dconnexion Universal Receiver
126
+
```
127
+
Here, `256f` is the Vendor ID and `c652` is the Product ID.
128
+
129
+
2.**Create udev rules to grant permissions:**
130
+
```bash
131
+
cd /etc/udev/rules.d
132
+
sudo touch 99-spacemouse.rules
133
+
sudo nano 99-spacemouse.rules
134
+
```
135
+
136
+
3.**Add the following rules** (replace `046d` and `c62b` with your Vendor ID and Product ID):
0 commit comments