Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/honechko/ser1wm
1-wire bus master driver
https://github.com/honechko/ser1wm
1-wire 1-wire-master drivers home-automation kernel-driver kernel-module linux onewire raspberry raspberry-pi raspberrypi rpi
Last synced: about 2 months ago
JSON representation
1-wire bus master driver
- Host: GitHub
- URL: https://github.com/honechko/ser1wm
- Owner: honechko
- Created: 2024-08-15T13:36:44.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-09-13T11:49:06.000Z (4 months ago)
- Last Synced: 2024-10-12T16:42:03.148Z (3 months ago)
- Topics: 1-wire, 1-wire-master, drivers, home-automation, kernel-driver, kernel-module, linux, onewire, raspberry, raspberry-pi, raspberrypi, rpi
- Language: C
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Serial 1-wire bus master driver for Linux
## Build Out-of-Tree (fast way)
* To build the module, you may need to install kernel headers and makefiles if you have not done so already:
```$ sudo yum install -y kernel-devel```
or
```$ sudo apt-get install -y linux-headers-$(uname -r)```* Build module:
```$ cd kernel/module```
```$ make```* Load module:
```$ sudo modprobe wire```
```$ sudo insmod ./ser1wm.ko```## Build In-Tree (preferred way)
* Download and unpack [kernel source](http://kernel.org/) ([rpi kernel source](https://github.com/raspberrypi/linux/))
* Optionally apply patches from [patches directory](https://github.com/honechko/ser1wm/tree/main/kernel/patches/):
```$ patch -p1 < /path/to/enhancement_w1_touchblock.patch```
```$ patch -p1 < /path/to/enhancement_w1_resetcounter.patch```
```$ patch -p1 < /path/to/fix_w1_slavecount.patch```
```$ patch -p1 < /path/to/fix_w1_loadmodule.patch```
```$ patch -p1 < /path/to/fix_w1_thermpullup.patch```* Add driver to kernel source tree:
```$ cp /path/to/ser1wm.c drivers/w1/masters```
```$ patch -p1 < /path/to/intree-ser1wm.patch```* Configure, make and install modules as usual:
```$ make menuconfig```
```$ make modules```
```$ sudo make modules_install```## Usage
* Build ```ser1wm_attach```
```$ cd user/attach```
```$ make```* Attach driver to serial line to which serial 1-wire bus master is connected:
```$ sudo ./ser1wm_attach /dev/ttyUSB0```
or attach driver to TCP-port on which network 1-wire bus master is listening:
```$ sudo ./ser1wm_attach 10.0.0.2:4232```
* Optionally create udev rules to automatically attach driver when serial devices appear as shown in [this example](https://github.com/honechko/ser1wm/blob/main/user/udev/85-owmasters.rules).