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

Linux Support #3

Open
riley-spires opened this issue Dec 28, 2024 · 1 comment
Open

Linux Support #3

riley-spires opened this issue Dec 28, 2024 · 1 comment

Comments

@riley-spires
Copy link

I have been able to get this to work on linux (Fedora 41)for the most part

I have been able to do this by changing

let displayPath = connectedDisplaypads.filter((device) => {
return device.interface==1
})[0].path

to

let displayPath = connectedDisplaypads.filter((device) => {
return device.interface==0
})[0].path

However, I cannot change any of the displays because it fails to write to the rawhid. Below are my available devices by Mountain in a table

┌─────────┬──────────┬───────────┬────────────────┬──────────────┬──────────────┬───────────────────────┬─────────┬───────────┬───────────┬───────┐
│ (index) │ vendorId │ productId │ path           │ serialNumber │ manufacturer │ product               │ release │ interface │ usagePage │ usage │
├─────────┼──────────┼───────────┼────────────────┼──────────────┼──────────────┼───────────────────────┼─────────┼───────────┼───────────┼───────┤
│ 0       │ 12930    │ 9         │ '/dev/hidraw0' │ ''           │ 'Mountain'   │ 'MOUNTAIN DisplayPad' │ 7       │ 0         │ 1         │ 6     │
│ 1       │ 12930    │ 9         │ '/dev/hidraw0' │ ''           │ 'Mountain'   │ 'MOUNTAIN DisplayPad' │ 7       │ 0         │ 12        │ 1     │
│ 2       │ 12930    │ 9         │ '/dev/hidraw0' │ ''           │ 'Mountain'   │ 'MOUNTAIN DisplayPad' │ 7       │ 0         │ 1         │ 128   │
│ 3       │ 12930    │ 9         │ '/dev/hidraw0' │ ''           │ 'Mountain'   │ 'MOUNTAIN DisplayPad' │ 7       │ 0         │ 1         │ 2     │
│ 4       │ 12930    │ 9         │ '/dev/hidraw0' │ ''           │ 'Mountain'   │ 'MOUNTAIN DisplayPad' │ 7       │ 0         │ 1         │ 1     │
│ 5       │ 12930    │ 9         │ '/dev/hidraw1' │ ''           │ 'Mountain'   │ 'MOUNTAIN DisplayPad' │ 7       │ 3         │ 65280     │ 1     │
└─────────┴──────────┴───────────┴────────────────┴──────────────┴──────────────┴───────────────────────┴─────────┴───────────┴───────────┴───────┘

And below here is a stack trace of the error whenever I try to use pad.fillColor(0, 255, 0, 0)

node:events:496
     throw er; // Unhandled 'error' event
     ^

TypeError: Cannot write to hid device
   at Displaypad._processDataEvent (/mnt/MassStorage/CodeLibrary/JavaScript/mountain-test/node_modules/mountain-displaypad/index.js:283:26)
   at HID.<anonymous> (/mnt/MassStorage/CodeLibrary/JavaScript/mountain-test/node_modules/mountain-displaypad/index.js:137:9)
   at HID.emit (node:events:518:28)
   at readFunc (/mnt/MassStorage/CodeLibrary/JavaScript/mountain-test/node_modules/node-hid/nodehid.js:117:26)
Emitted 'error' event on Displaypad instance at:
   at HID.<anonymous> (/mnt/MassStorage/CodeLibrary/JavaScript/mountain-test/node_modules/mountain-displaypad/index.js:141:9)
   at HID.emit (node:events:518:28)
   at Immediate.<anonymous> (/mnt/MassStorage/CodeLibrary/JavaScript/mountain-test/node_modules/node-hid/nodehid.js:122:26)
   at process.processImmediate (node:internal/timers:491:21)

Node.js v22.11.0

I will be more than willing to test possible solutions or brainstorm with others. This is the only way I've gotten this specific device to work on linux so far.

@riley-spires
Copy link
Author

Just a note for the first part of this issue, I have no HID devices from Mountain with interface 1. I have 5 devices showing from node-hid with interface 0 and 1 device showing with interface 3.

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

No branches or pull requests

1 participant