File: owshell.man

package info (click to toggle)
owfs 3.2p3+dfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 8,688 kB
  • sloc: ansic: 65,085; pascal: 5,957; tcl: 2,688; makefile: 1,357; python: 1,114; sh: 891; cs: 623; php: 600; perl: 587; java: 404; ruby: 289; cpp: 105; asm: 102; xml: 53
file content (286 lines) | stat: -rw-r--r-- 6,165 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
'\"
'\" Copyright (c) 2003-2004 Paul H Alfille, MD
'\" (paul.alfille@gmail.com)
'\"
'\" Program manual page for the OWFS -- 1-wire filesystem package
'\" Based on Dallas Semiconductor, Inc's datasheets, and trial and error.
'\"
'\" Free for all use. No warranty. None. Use at your own risk.
'\"
.TH OWSHELL 1 2004 "OWSHELL Manpage" "One-Wire File System"
.SH NAME
owdir, owread, owwrite, owget, owexist, owpresent \- lightweight owserver access
.SH SYNOPSIS
.SS Minimal options
.B owdir
.I -s 
[host:]port
[directory]
.br
.B owread
.I -s 
[host:]port
filepath
.br
.B owwrite
.I -s 
[host:]port
filepath value
.br
.B owget
.I -s 
[host:]port
[directory] | filepath
.br
.SS Server discovery
.B owdir
.I --autoserver
[directory]
.br
.B owread
.I --autoserver
filepath
.br
.B owwrite
.I --autoserver
filepath value
.br
.B owget
.I --autoserver
[directory] | filepath
.br
.SS Full options
.B owdir
.I -q --quiet
.I -f --format
f[.]i[[.]c]
] [
.I --dir
]
.I -s 
[host:]port
[directory] [directory2 ...]
.PP
.B owread
.I -q --quiet
.I -C --celsius
.I -K --kelvin
.I -F --fahrenheit
.I -R --rankine
[
.I --hex
] [
.I --start=
offset
] [
.I --size=
bytes
]
.I -s 
[host:]port
filepath [filepath2 ...]
.PP
.B owwrite
.I -q --quiet
.I -C --celsius
.I -K --kelvin
.I -F --fahrenheit
.I -R --rankine
[
.I --hex
] [
.I --start=
offset
]
.I -s 
[host:]port
filepath value [filepath2 value2 ...]
.PP
.B owget
.I -q --quiet
.I -f --format
f[.]i[[.]c]
.I -C --celsius
.I -K --kelvin
.I -F --fahrenheit
.I -R --rankine
[
.I --hex
] [
.I --start=
offset
] [
.I --size=
bytes
] [
.I --dir
]
.I -s 
[host:]port
[directory] | filepath
.br
.SS Version
.B owdir
.I \-V \-\-version
.br
.B owread
.I \-V \-\-version
.br
.B owwrite
.I \-V \-\-version
.br
.B owget
.I \-V \-\-version
.br
.SS Help
.B owdir
.I \-h | \-\-help
.br
.B owread
.I \-h | \-\-help
.br
.B owwrite
.I \-h | \-\-help
.br
.B owget
.I \-h | \-\-help
.br
.SH "DESCRIPTION"
.so man1/description.1so
.SS OWSHELL programs
.B owdir owread owwrite 
and 
.B owget
are collectively called the
.B owshell
programs. They allow lightweight access to an
.B owserver (1)
for use in command line scripts.
.PP
Unlike
.B owserver (1) owhttpd (1) owftpd (1) owhttpd (1)
there is not persistent connection with the 1-wire bus, no caching and no multithreading. Instead, each program connects to a running
.B owserver (1)
and performs a quick set of queries.
.PP
.B owserver (1)
performs the actual 1-wire connection (to physical 1-wire buses or other
.B owserver
programs), performs concurrency locking, caching, and error collection.
.PP
.B owshell
programs are intended for use in command line scripts. An alternative approach is to mount an
.B owfs (1)
filesystem and perform direct file lists, reads and writes.
.SS owdir
.B owdir
performs a
.I directory
listing. With no argument, all the devices on the main 1-wire bus will be listed. Given the name of a 1-wire device, the available properties will be listed. It is the equivalent of
.IP
.I ls directory
.P
in the
.B owfs (1)
filesystem.
.SS owread
.B owread
obtains for value of a 1-wire device property. e.g. 28.0080BE21AA00/temperature gives the DS18B20 temperature. It is the equivalent of
.IP
.I cat filepath
.P
in the
.B owfs (1)
filesystem.
.SS owwrite
.B owwrite
performs a change of a property, changing a 1-wire device setting or writing to memory. It is the equivalent of
.IP
.I echo "value" > filepath
.P
in the
.B owfs (1)
filesystem.
.SS owget
.B owget (1)
is a convenience program, combining the function of
.B owdir (1)
and
.B owread (1)
by first trying to read the argument as a directory, and if that fails as a 1-wire property.
.SH STANDARD OPTIONS
.SS \-\-autoserver
Find an 
.I owserver
using the Service Discovery protocol. Essentially Apple's Bonjour (aka zeroconf). Only the first 
.I owserver 
will be used, and that choice is probably arbitrary.
.SS \-s [host:]port
Connect via tcp (network) to an
.I owserver
process that is connected to a physical 1-wire bus. This allows multiple processes to share the same bus. The
.I owserver
process can be local or remote.
.PP
If the server option is not specified, the default is the local machine and the IANA allocated default port of 4304. Thus "\-s localhost:4304" is the equivalent.
.SH DATA OPTIONS
.SH \-\-hex
Hexadecimal mode. For reading data, each byte of character will be displayed as two characrters 0-9ABCDEF. Most useful for reading memory locations. No spaces between data.
.P
Writing data in hexadecimal mode just means that the data should be given as one long hexadecimal string.
.SH \-\-start=offset
Read or write memory locations starting at the offset byte rather than the beginning. An offset of 0 means the beginning (and is the default).
.P
.SH \-\-size=bytes
Read up to the specified number of bytes of a memory location.
.SH HELP OPTIONS
.SS \-h \-\-help
Shows (this) basic summary of options.
.SS \-V \-\-version
.I Version
of this program.
.SH DISPLAY OPTIONS
.SS \-\-dir
Modify the display of directories to indicate which entries are also directories. A directory member will have a trailing '/' if it is a directory itself. This aids recursive searches.
.SS \-f \-\-format "f[.]i[[.]c]"
Display format for the 1-wire devices. Each device has a 8 byte address, consisting of:
.TP
.I f
family code, 1 byte
.TP
.I i
ID number, 6 bytes
.TP
.I c
CRC checksum, 1 byte
.PP
Possible formats are
.I f.i
(default, 01.A1B2C3D4E5F6),
.I fi fic f.ic f.i.c
and
.I fi.c
.PP
All formats are accepted as input, but the output will be in the specified format.
.SH EXAMPLE
.TP
owdir \-s 3000 \-\-format fic
Get the device listing (full 16 hex digits, no dots) from the local
.I owserver
at port 3000
.TP
owread \-F \-\-autoserver 51.125499A32000/typeK/temperature
Read temperature from the DS2751-based thermocouple on an auto-discovered
.I owserver
Temperature in fahrenheit.
.TP
owwrite \-s 10.0.1.2:3001 32.000800AD23110/pages/page.1 "Passed"
Connect to a OWFS server process (
.I owserver
) that was started on another machine at tcp port 3001 and write to the memory of a DS2780
.SH SEE ALSO
.so man1/seealso.1so
.SH AVAILABILITY
http://www.owfs.org
.SH AUTHOR
Paul Alfille (paul.alfille@gmail.com)