Moved your topic under the Framework laptop 16 - Linux category so our experts in here can help you!
I am no Linux expert, and I’m absolutely not sure if this is the issue here, but I think you need to connect them one by one so they can be functional. For example, you need to click on the “Connect Left” button on the web page, on the popup message you need to choose the input module ( you can see both here) and then you need to click on connect, the webpage should say “Connected” afterwards, instead of disconnected.
So I have inputmodule-control_cli_linux_v0.1.8.7 but don’t know how to run that (./inputmodule-control_cli_linux_v0.1.8.7 doesn’t work, permission denied), and the link to the mentioned python script is a 404. Suspect I might have to chmod it, waiting on guidance now.
Sounds like your user does not have the necessary privileges? Can you list what groups you’re in?
You can grab this via a simple groups $USER
Maybe try running the script under root as well.
Issue 2. Cant run ./inputmodule-control_cli_linux_v0.1.8.7, nor with sudo
Issue 3, new, can’t pip install inputmodule either ( do I need to download it from github, sorry)
python3 -m pip install inputmodule
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement inputmodule (from versions: none)
ERROR: No matching distribution found for inputmodule
emma@emmas-laptop:~/Downloads$ sudo ./inputmodule-control_cli_linux_v0.1.8.7
sudo: ./inputmodule-control_cli_linux_v0.1.8.7: command not found
emma@emmas-laptop:~/Downloads$ ls
dotmatrixtool-usbserial inputmodule-control_cli_linux_v0.1.8.7
dotmatrixtool-usbserial.zip
emma@emmas-laptop:~/Downloads$
The steps in the post you liked were for the group that I had to add to in arch, which is different than on ubuntu (I can’t remember the ubuntu group offhand, will update if I find it).
I don’t even know how to install it, what am i dealing with, with the command line app. And if I do
emma@emmas-laptop:~/Downloads$ sudo cp release/50-framework-inputmodule.rules /etc/udev/rules.d/
cp: cannot stat ‘release/50-framework-inputmodule.rules’: No such file or directory
I know they were for arch, but I thought that the udev rules might be similar.
Options:
–brightness []
Set LED max brightness percentage or get, if no value provided
–sleeping []
Set sleep status or get, if no value provided [possible values: true, false]
–bootloader
Jump to the bootloader
–percentage
Display a percentage (0-100)
–animate []
Start/stop animation [possible values: true, false]
–pattern
Display a pattern [possible values: percentage, gradient, double-gradient, lotus-sideways, zigzag, all-on, panic, lotus-top-down]
–all-brightnesses
Show every brightness, one per pixel
–blinking
Blink the current pattern once a second
–breathing
Breathing brightness of the current pattern
–image-bw <IMAGE_BW>
Display black&white image (9x34px)
–image-gray <IMAGE_GRAY>
Display grayscale image
–random-eq
Random EQ
–eq
EQ with custom values
–clock
Clock
–string
Display a string (max 5 chars)
–symbols […]
Display a string (max 5 symbols)
–start-game <START_GAME>
Start a game [possible values: snake, pong, tetris, game-of-life]
–game-param <GAME_PARAM>
Paramater for starting the game. Required for some games [possible values: current-matrix, pattern1, blinker, toad, beacon, glider, beacon-toad-blinker]
–stop-game
Stop the currently running game
–animation-fps [<ANIMATION_FPS>]
Set/get animation FPS
–pwm-freq [<PWM_FREQ>]
Set/get PWM Frequency in Hz
–debug-mode [<DEBUG_MODE>]
Set debug mode or get current mode, if no value provided [possible values: true, false]
–panic
Crash the firmware (TESTING ONLY!)
-v, --version
Get the device version
-h, --help
Udev rules for arch should work on ubuntu (although not the other way round since debian and derivatives like to reference groups such as plugdev that dont exist on other distros in their udev rules)
The issue you are having suggests you got the path to the downloaded file wrong. Try running curl https://raw.githubusercontent.com/FrameworkComputer/inputmodule-rs/main/release/50-framework-inputmodule.rules | sudo tee /etc/udev/rules.d/50-framework-inputmodule.rules to install the rules file, and then (assuming that this worked) reboot your computer to reload the rules and disconnect/reconnect the modules.
Running things as root (e.g. with sudo) will bypass the need for udev rules in most cases, since device files are owned by root by default (and if they are not, root usually bypasses file permissions anyway). However, it is not recommended since it increases the impact of vulnerabilities in the application you are running as root. I would suggest trying to install the udev rules if possible.
emma@emmas-laptop:~/Downloads$ ./inputmodule-control_cli_linux_v0.1.8.7 led-matrix --random-eq
thread ‘main’ panicked at ‘Permission denied, couldn’t access inputmodule serialport. Ensure that you have permission, for example using a udev rule or sudo.’, inputmodule-control/src/inputmodule.rs:407:80
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
EDIT- tried again - working without sudo. Thankyou.
Edit - this has fixed the web version as well. Awesome.
I’m not sure to which github code you are referring, but the steps under the “Permissions on Linux” section assume that you have cloned the repo. They just copy the local version of the file into the necessary directory. The command that CauseOfBSOD noted above downloads only that file from the remote github repo and writes it to the directory on your machine.
If I am misunderstanding something, my apologies. Glad that you got things working. The community here is a great one and very helpful (yours truly excluded, of course). I’ve gotten help countless times and learned a lot. I hope that you enjoy the machine, and have a great evening!
I should probably mention that this code requires a working internet connection, and for github to be online, and does not validate what is downloaded beyond printing it to stdout (consider removing the | and everything after it to check the file before running the command if this post has significant age)