rsjudka / intelligent-auto

41 stars 15 forks source link

Rules that need to be setup #44

Open yoriaantje-dev opened 4 years ago

yoriaantje-dev commented 4 years ago

Hi All, just some notes...

In issue #9 it came up that the screen brightness function wasn't working. When pulling the latest development version, it still doesn't seem to work...

However, a fix has been made since then. Same goes for initial connection issues....

There are certain rules that need to be setup, and thus, I feel they should be documented.

In the file /etc/udev/rules.d/openauto.rules, add this line:

# UDEV Rule to allow Write Acces to OpenAuto USB
SUBSYSTEM=="usb", ATTR{idVendor}=="*", ATTR{idProduct}=="*", MODE="0660", GROUP="plugdev"

(to open and edit, type: sudo nano /etc/udev/rules.d/openauto.rules)

In the file /etc/udev/rules.d/openauto.rules, add this line:

# UDEV Rule to allow Write Acces to OpenAuto USB
SUBSYSTEM=="usb", ATTR{idVendor}=="*", ATTR{idProduct}=="*", MODE="0660", GROUP="plugdev"

# UDEV Rules to allow Write Acces to all users for Raspberry Pi 7" Touch Screen
SUBSYSTEM=="backlight", RUN+="/bin/chmod 666 /sys/class/backlight/%k/brightness"_

(to open and edit, type: sudo nano /etc/udev/rules.d/51-iadash.rules)

@rsjudka I've been working on a tutorial and Wiki, as you might remember (#16). However, I'm still in college which means i don't have a lot of time to keep in check with this project. I'd love to continue helping out like this, but I would like some input :)

Cheers, Yorian

robert5974 commented 4 years ago

I'll have to go back and verify if the rule is still needed for brightness. I think it was fixed and the rule isn't needed. I'll verify

robert5974 commented 4 years ago

Ok... Verified it's needed. Does the install script Rhys Morgan made create them?
I have several rule files but one I had commented everything out which I remember doing.

rsjudka commented 4 years ago

No the script only adds a rule for udev

Wonder if we would need to add some param for the script to add it tho (because not everyone might use an rpi screen or want to allow brightness control)

robert5974 commented 4 years ago

I don't think it would hurt to do it, I would think it shouldn't be too difficult but it would actually need elevated privileges to do so

rhysmorgan134 commented 4 years ago

I can add a param to enable it, not a problem. Script already uses sudo to do various apt installs, so shouldn't be an issue.

robert5974 commented 4 years ago

That sounds good. I already have had everything installed so I forgot that you're script checks those first