akira215 / raspberrypi-w1_module Goto Github PK
View Code? Open in Web Editor NEWWorks kernel module w1_therm
Works kernel module w1_therm
Hello,
I have multiple W1-busses based on using DS2482 I2C to W1 interfaces. In W1 file system installed the file "therm_bulk_read" is merely found in the w1_bus_master1 directories, but not in others.
W1 file system is installed either manually via
sudo modprobe ds2482
sudo sh -c "echo ds2482 0x18 > /sys/bus/i2c/devices/i2c-1/new_device"
sudo sh -c "echo ds2482 0x1c > /sys/bus/i2c/devices/i2c-1/new_device"
sudo modprobe wire
or via rc.local
DS 2482 and DS 2482-8 are used.
As examples directories of master1 and master9 are given.
/sys/bus/w1/devices/w1_bus_master1 $ ls -l
insgesamt 0
drwxr-xr-x 4 root root 0 27. Mai 00:25 28-01192d063d95
drwxr-xr-x 4 root root 0 27. Mai 00:25 28-01192d089b62
drwxr-xr-x 4 root root 0 27. Mai 00:25 28-01192d11a780
drwxr-xr-x 4 root root 0 27. Mai 00:25 28-01192d1452cf
drwxr-xr-x 4 root root 0 27. Mai 00:25 28-01192d18e08b
drwxr-xr-x 4 root root 0 27. Mai 00:25 28-01192d19350a
drwxr-xr-x 4 root root 0 27. Mai 00:25 28-01192d1b650a
lrwxrwxrwx 1 root root 0 27. Mai 13:34 driver -> ../../bus/w1/drivers/w1_master_driver
drwxr-xr-x 2 root root 0 27. Mai 13:34 power
lrwxrwxrwx 1 root root 0 27. Mai 00:25 subsystem -> ../../bus/w1
-rw-rwxrwx 1 root root 4096 27. Mai 08:17 therm_bulk_read
-rw-r--r-- 1 root root 4096 27. Mai 00:25 uevent
-rw-rw-r-- 1 root root 4096 27. Mai 13:44 w1_master_add
-r--r--r-- 1 root root 4096 27. Mai 13:44 w1_master_attempts
-rw-rw-r-- 1 root root 4096 27. Mai 13:44 w1_master_max_slave_count
-r--r--r-- 1 root root 4096 27. Mai 13:44 w1_master_name
-r--r--r-- 1 root root 4096 27. Mai 13:44 w1_master_pointer
-rw-rw-r-- 1 root root 4096 27. Mai 13:44 w1_master_pullup
-rw-rw-r-- 1 root root 4096 27. Mai 13:44 w1_master_remove
-rw-rw-r-- 1 root root 4096 27. Mai 13:44 w1_master_search
-r--r--r-- 1 root root 4096 27. Mai 13:44 w1_master_slave_count
-r--r--r-- 1 root root 4096 27. Mai 08:05 w1_master_slaves
.......
/sys/bus/w1/devices/w1_bus_master9 $ ls -l
insgesamt 0
drwxr-xr-x 4 root root 0 27. Mai 00:25 28-0300a2793061
drwxr-xr-x 4 root root 0 27. Mai 00:25 28-0300a279b40c
lrwxrwxrwx 1 root root 0 27. Mai 13:34 driver -> ../../bus/w1/drivers/w1_master_driver
drwxr-xr-x 2 root root 0 27. Mai 13:34 power
lrwxrwxrwx 1 root root 0 27. Mai 00:25 subsystem -> ../../bus/w1
-rw-r--r-- 1 root root 4096 27. Mai 00:25 uevent
-rw-rw-r-- 1 root root 4096 27. Mai 13:34 w1_master_add
-r--r--r-- 1 root root 4096 27. Mai 13:34 w1_master_attempts
-rw-rw-r-- 1 root root 4096 27. Mai 13:34 w1_master_max_slave_count
-r--r--r-- 1 root root 4096 27. Mai 13:34 w1_master_name
-r--r--r-- 1 root root 4096 27. Mai 13:34 w1_master_pointer
-rw-rw-r-- 1 root root 4096 27. Mai 13:34 w1_master_pullup
-rw-rw-r-- 1 root root 4096 27. Mai 13:34 w1_master_remove
-rw-rw-r-- 1 root root 4096 27. Mai 13:34 w1_master_search
-r--r--r-- 1 root root 4096 27. Mai 13:34 w1_master_slave_count
-r--r--r-- 1 root root 4096 27. Mai 13:34 w1_master_slaves
-r--r--r-- 1 root root 4096 27. Mai 13:34 w1_master_timeout
-r--r--r-- 1 root root 4096 27. Mai 13:34 w1_master_timeout_us
Up to date Raspberry Bullseye 64-bit is used.
Regards
H. Wissing
While testing multiple one-wire devices I detected the issue that
echo trigger >therm_bulk_read
that typically will take ~1 second (still don't understand why it can't do this asynchronously and return right away) will return immediately and not trigger conversions (cat w1_slave on any device takes ~1 second which with working bulk_read will returns instantly).
I could reproduce this with both adding a DS2423 and a DS2438 device (single or both). Once the devices get removed it starts working again.
I'm using kernel 5.10.63-v7l+ on a fully updated Raspbian buster on a Raspberry Pi 4
Hello,
I've tried triggering a bulk-conversion via writing "trigger" to the file therm_bulk_read as described
def iniTherm_bulk_read():
fdr = open("/sys/bus/w1/drivers/w1_master_driver/w1_bus_master1/therm_bulk_read", "w")
fdr.write("trigger")
fdr.close()
no action is seen using Python3 file systen but with after a bash call:
def iniTherm_bulk_read():
os.popen("echo trigger > /sys/bus/w1/drivers/w1_master_driver/w1_bus_master1/therm_bulk_read")
User permissions are set manually beforehand. Up to date Raspberry Bullseye 64-bit is used.
Regards
H. Wissing
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.