Page 1 of 1

1-wire with Jessie

Posted: Tue Jul 05, 2016 2:40 pm
by grindel
Hello!
I'm trying to control DS2413/DS2418 ICs with Raspberry GPIO 1-wire.
I can't find any particular manual for using 1-wire in Jessie.

What I've already done:
- Turn the 1-wire ON in RPi config
- Connect DS2413, also try with iButton
- Check "/sys/bus/w1/devices" directory

Code: Select all

ls /sys/bus/w1/devices/
3a-0000001e4a9f  w1_bus_master1
So 3a-0000001e4a9f is the id of DS2413 but it updates(appear/disappear when connect/disconnect the IC) only after reboot.
And in 3a-0000001e4a9f directory I can't find w1_slave

Code: Select all

ls /sys/bus/w1/devices/3a-0000001e4a9f
driver  id  name  power  rw  subsystem  uevent
So, my questions are: is it possible to search new devices on 1-wire bus with out reboot, and how can I manage DS2413 and simular IC?

Re: 1-wire with Jessie

Posted: Tue Jul 05, 2016 7:58 pm
by edo1
grindel wrote: is it possible to search new devices on 1-wire bus with out reboot,
kernel does 1-wire bus scan by default every 10 seconds or so on.

Code: Select all

w1 master sysfs interface
------------------------------------------------------------------
<xx-xxxxxxxxxxxxx> - A directory for a found device. The format is family-serial
...
w1_master_search   - (rw) the number of searches left to do,
		     -1=continual (default)
...
w1_master_timeout  - (ro) the delay in seconds between searches
w1_master_timeout_us
                   - (ro) the delay in microseconds beetwen searches
...
Bus searches occur at an interval, specified as a summ of timeout and
timeout_us module parameters (either of which may be 0) for as long as
w1_master_search remains greater than 0 or is -1.  Each search attempt
decrements w1_master_search by 1 (down to 0) and increments
w1_master_attempts by 1.
https://www.kernel.org/doc/Documentation/w1/w1.generic
grindel wrote:and how can I manage DS2413 and simular IC?
I wonder why it doesn't work out of box.
Is w1_ds2413 module loaded?

Re: 1-wire with Jessie

Posted: Wed Jul 06, 2016 6:18 pm
by grindel
Thank you for reply.

It seems that there is no mod like 1w_ds2413.