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

Issue #106 [New/open] - How to setup the automatic kernel driver loading for the DS2482-x family #8

Open
thortex opened this issue Sep 11, 2016 · 0 comments

Comments

@thortex
Copy link
Owner

thortex commented Sep 11, 2016

http://webiopi.trouch.com/issues/106/

Posted by andreas.riegg

It is assumed that the WebIOPi user is "pi"

Copy the attached shell script (ds2482.sh) into your home directory (/home/pi)

Make it executable (chmod 755)

You can call it manually (sudo ./ds2482.sh) if you don't need automated start at boot

To get it started automatically at boot, insert the following lines at the end of /etc/rc.local just before the last line which is "exit 0" (e.g. with "sudo nano /etc/rc.local"):

Load 1-wire DS2482 master kernel drivers

sudo bash /home/pi/ds2482.sh

Reboot

As example, I have also attached a rc.local file, yours may contain additional instructions.

To finish or disable the automatic loading, delete the lines or comment them out.

Andreas

Files attached

ds2482.sh
rc.local

Comment 1

Posted by andreas.riegg

Additional info:

If you only use a 2482 and/or use GPIO 4 without a pullup resistor, delete line 3 from the script (it loads w1-gpio with the pullup parameter), you don't need it.

I did not test so far what happens when having multiple 2482 chips on the I2C bus using different I2C slave addresses for them and having multiple tee-commands in the script. So for the time being, use the 2482-800 for 1-wire multi channel architectures, it was tested and worked and gives you 8 separate 1-wire channels.

Andreas

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

No branches or pull requests

1 participant