Skip to content

Conversation

@s-badran
Copy link
Contributor

@s-badran s-badran commented Oct 26, 2025

  • Change udev rules path from /usr/lib/udev to /etc/udev for proper precedence
  • Add KERNEL match to i2c-dev udev rule for better device detection
  • Enhance error handling in numberpad.py for permission errors
  • Ensure consistent INSTALL_UDEV_DIR_PATH across all scripts
  • Add directory creation for robustness in install scripts

Related issue: #254

@kamack38
Copy link
Member

Rules shouldn't be installed to /etc/udev but to /usr/lib/udev. If you want to change the rule priority, change its prefix (like 10 or 20).

@s-badran s-badran force-pushed the fix-i2c-permission-issue branch from c794bdf to d18c27e Compare October 26, 2025 17:33
- Change udev rules path from /usr/lib/udev to /etc/udev for proper precedence
- Add KERNEL match to i2c-dev udev rule for better device detection
- Enhance error handling in numberpad.py for permission errors
- Ensure consistent INSTALL_UDEV_DIR_PATH across all scripts
- Add directory creation for robustness in install scripts
@s-badran s-badran force-pushed the fix-i2c-permission-issue branch from d18c27e to 2cc7e7b Compare October 26, 2025 17:38
@s-badran
Copy link
Contributor Author

@kamack38 thanks for the feedback. Code is updated according to it.
I went for 55 priority because it loads after critical system rules (50-54) but before conflicting package rules like i2c-tools (60+). Hopefully this should provide sufficient precedence to fix Fedora's I2C issue without risking interference with core device initialization

@ldrahnik
Copy link
Member

@s-badran Please do not include *.code-workspace, put it into your global .gitignore config instead because IDE or editor rules are user-specific and should be there.

@ldrahnik
Copy link
Member

@s-badran Do you have concrete or theoretical experience about a situation when this directory is missing? Which distribution? I mean sudo mkdir -p $INSTALL_UDEV_DIR_PATH/rules.d.

@ldrahnik
Copy link
Member

@s-badran Was changed udev rule tested? And permissions exception handling? Btw. I refactored the master branch to using from periphery import I2C instead of smbus2 so your branch has to be rebased.

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

Successfully merging this pull request may close these issues.

3 participants