1OWSERVER(1) One-Wire File System OWSERVER(1)
2
3
4
6 owserver - Backend server (daemon) for 1-wire control
7
9 owserver [ -c config ] -d serialport | -u | -s [host:]port -p tcp-port
10
12 1-Wire
13 1-wire is a wiring protocol and series of devices designed and manufac‐
14 tured by Dallas Semiconductor, Inc. The bus is a low-power low-speed
15 low-connector scheme where the data line can also provide power.
16
17 Each device is uniquely and unalterably numbered during manufacture.
18 There are a wide variety of devices, including memory, sensors (humid‐
19 ity, temperature, voltage, contact, current), switches, timers and data
20 loggers. More complex devices (like thermocouple sensors) can be built
21 with these basic devices. There are also 1-wire devices that have
22 encryption included.
23
24 The 1-wire scheme uses a single bus master and multiple slaves on the
25 same wire. The bus master initiates all communication. The slaves can
26 be individually discovered and addressed using their unique ID.
27
28 Bus masters come in a variety of configurations including serial, par‐
29 allel, i2c, network or USB adapters.
30
31 OWFS design
32 OWFS is a suite of programs that designed to make the 1-wire bus and
33 its devices easily accessible. The underlying principle is to create a
34 virtual filesystem, with the unique ID being the directory, and the
35 individual properties of the device are represented as simple files
36 that can be read and written.
37
38 Details of the individual slave or master design are hidden behind a
39 consistent interface. The goal is to provide an easy set of tools for a
40 software designer to create monitoring or control applications. There
41 are some performance enhancements in the implementation, including data
42 caching, parallel access to bus masters, and aggregation of device com‐
43 munication. Still the fundamental goal has been ease of use, flexibil‐
44 ity and correctness rather than speed.
45
46 owserver
47 owserver (1) is the backend component of the OWFS 1-wire bus control
48 system. owserver (1) arbitrates access to the bus from multiple client
49 processes. The physical bus is usually connected to a serial or USB
50 port, and other processes connect to owserver (1) over network sockets
51 (tcp port). Communication can be local or over a network. Secure tun‐
52 neling can be implemented using standard techniques.
53
54 Frontend clients include a filesystem representation: owfs (1) , and a
55 webserver: owhttpd (1). Direct language bindings are also available,
56 e.g: owperl (3). Several instances of each client can be initiated.
57
58 Each client can also connect directly to the physical bus, skipping
59 owserver (1) but only one client can connect to the physical bus
60 safely. Simultaneous access is prevented by the operating system for
61 USB ports, but unfortunately not serial ports. The safe way to share
62 access to the 1-wire bus is via owserver (1) with the clients connect‐
63 ing. Note: owserver (1) can connect to another owserver (1) process,
64 though the utility of this technique is limited (perhaps as a readonly
65 buffer?)
66
67 owserver (1) is by default multithreaded. Optional data caching is in
68 the server, not clients, so all the clients gain efficiency.
69
71 These options specify the device (bus master) connecting the computer
72 to the 1-wire bus. The 1-wire slaves are connected to the 1-wire bus,
73 and the bus master connects to a port on the computer and controls the
74 1-wire bus. The bus master is either an actual physical device, the
75 kernel w1 module, or an owserver (1).
76
77 At least one device option is required. There is no default. More than
78 one device can be listed, and all will be used. (A logical union unless
79 you explore the /bus.n/ directories.)
80
81 Linux and BSD enforce a security policy restricting access to hardware
82 ports. You must have sufficient rights to access the given port or
83 access will silently fail.
84
86 port specifies a serial port, e.g. /dev/ttyS0 or an USB port accessed
87 as serial port, e.g. /dev/ttyUSB0
88
89 If OWFS was built with libftdi support, you may be able to use the
90 ftdi: prefix in any of the options as port to address a FTDI-based USB
91 device.
92 For details, see the FTDI ADDRESSING section.
93
94 -d port | --device=port (DS2480B)
95 DS2480B-based bus master (like the DS9097U or an adapter of the
96 LINK family in emulation mode). If the adapter doesn't respond,
97 a passive type (DS9907E or diode/resistor) circuit will be
98 assumed.
99
100 --serial_flextime | --serial_regulartime (DS2480B)
101 Changes details of bus timing (see DS2480B datasheet). Some
102 devices, like the Swart LCD cannot work with flextime.
103
104 --baud=1200|9600|19200|38400|57600|115200 (DS2480B,LINK,HA5)
105 Sets the initial serial port communication speed for all bus
106 masters. Not all serial devices support all speeds. You can
107 change the individual bus master speed for a device of the LINK
108 family and DS2880B in the interface/settings directory. The HA5
109 speed is set in hardware, so the command line baud rate should
110 match that rate.
111 Usually the default settings (9600 for a device of the LINK fam‐
112 ily and DS2480B ) and 115200 for the HA5 are sane and shouldn't
113 be changed.
114
115 --straight_polarity | --reverse_polarity (DS2480B)
116 Reverse polarity of the DS2480B output transistors? Not needed
117 for the DS9097U, but required for some other designs.
118
119 --link=port (LINK)
120 iButtonLink LINK adapter (all versions) in non-emulation mode.
121 Uses an ascii protocol over serial.
122 This supports the simplified ftdi:<serial number> addressing
123 scheme.
124
125 --ha7e=port (HA7E)
126 Embedded Data Systems HA7E adapter ( and HA7S ) in native ascii
127 mode.
128
129 --ha5=port | --ha5=port:a | --ha5=port:acg (HA5)
130 Embedded Data Systems HA5 mutidrop adapter in native ascii mode.
131 Up to 26 adapters can share the same port, each with an assigned
132 letter. If no letter specified, the program will scan for the
133 first response (which may be slow).
134
135 --checksum | --no_checksum (HA5)
136 Turn on (default) or off the checksum feature of the HA5 commu‐
137 nication.
138
139 --passive=port | --ha2=port | --ha3=port | --ha4b=port (Passive)
140 Passive 1-wire adapters. Powered off the serial port and using
141 passive electrical components (resitors and diodes).
142
143 --8bit | --6bit (Passive)
144 Synthesize the 1-wire waveforme using a 6-bit (default) serial
145 word, or 8-bit word. Not all UART devices support 6 bit opera‐
146 tion.
147
148 --timeout_serial=5
149 Timeout (in seconds) for all serial communications. 5 second
150 default. Can be altered dynamically under /settings/time‐
151 out/serial
152
154 The only supported true USB bus masters are based on the DS2490 chip.
155 The most common is the DS9490R which has an included 1-wire ID slave
156 with family code 81.
157
158 There are also bus masters based on the serial chip with a USB to
159 serial conversion built in. These are supported by the serial bus mas‐
160 ter protocol.
161
162 -u | --usb
163 DS2490 based bus master (like the DS9490R).
164
165 -u2 | --usb=2
166 Use the second USB bus master. (The order isn't predicatble,
167 however, since the operating system does not consistently order
168 USB devices).
169
170 -uall | --usb=ALL
171 Use all the USB devices.
172
173 --usb_flextime | --usb_regulartime
174 Changes the details of 1-wire waveform timing for certain net‐
175 work configurations.
176
177 --altusb
178 Willy Robion's alternative USB timing.
179
180 --timeout_usb=5
181 Timeout for USB communications. This has a 5 second default and
182 can be changed dynamically under /settings/timeout/usb
183
185 I2C is 2 wire protocol used for chip-to-chip communication. The bus
186 masters: DS2482-100, DS2482-101 and DS2482-800 can specify (via pin
187 voltages) a subset of addresses on the i2c bus. Those choices are
188
189 i2c_address
190
191 0,1,2,3
192 0x18,0x19,0x1A,0x1B
193
194 4,5,6,7
195 0x1C,0x1D,0x1E,0x1F (DS2482-800 only)
196
197 port for i2c masters have the form /dev/i2c-0, /dev/i2c-1, ...
198
199 -d port | --device=port
200 This simple form only permits a specific port and the first
201 available i2c_address
202
203 --i2c=port | --i2c=port:i2c_address | --i2c=port:ALL
204 Specific i2c port and the i2c_address is either the first, spe‐
205 cific, or all or them. The i2c_address is 0,1,2,...
206
207 --i2c | --i2c=: | --i2c=ALL:ALL
208 Search the available i2c buses for either the first, the first,
209 or every i2c adapter.
210
211 The DS2482-800 masters 8 1-wire buses and so will generate 8 /bus.n
212 entries.
213
215 These bus masters communicate via the tcp/ip network protocol and so
216 can be located anywhere on the network. The network_address is of the
217 form tcp_address:port
218
219 E.g. 192.168.0.1:3000 or localhost:3000
220
221 --link=network_address
222 LinkHubE network LINK adapter by iButtonLink
223
224 --ha7net=network_address | --ha7net
225 HA7Net network 1-wire adapter with specified tcp address or dis‐
226 covered by udp multicast. By Embedded Data Systems
227 --timeout_ha7=60 specific timeout for HA7Net communications (60
228 second default).
229
230 --etherweather=network_address
231 Etherweather adapter
232
233 -s network_address | --server=network_address
234 Location of an owserver (1) program that talks to the 1-wire
235 bus. The default port is 4304.
236
237 --timeout_network=5
238 Timeout for network bus master communications. This has a 1 sec‐
239 ond default and can be changed dynamically under /settings/time‐
240 out/network
241
243 Used for testing and development. No actual hardware is needed. Useful
244 for separating the hardware development from the rest of the software
245 design.
246
247 devices
248 is a list of comma-separated 1-wire devices in the following
249 formats. Note that a valid CRC8 code is created automatically.
250
251 10,05,21
252 Hexadecimal family codes (the DS18S20, DS2405 and DS1921 in this
253 example).
254
255 10.12AB23431211
256 A more complete hexadecimal unique address. Useful when an
257 actual hardware device should be simulated.
258
259 DS2408,DS2489
260 The 1-wire device name. (Full ID cannot be speciifed in this
261 format).
262
263 --fake=devices
264 Random address and random values for each read. The device ID is
265 also random (unless specified).
266
267 --temperature_low=12 --temperature_high=44
268 Specify the temperature limits for the fake adapter simulation.
269 These should be in the same temperature scale that is specified
270 in the command line. It is possible to change the limits dynami‐
271 cally for each adapter under /bus.x/interface/settings/simu‐
272 lated/[temperature_low|temperature_high]
273
274 --tester=devices
275 Predictable address and predictable values for each read. (See
276 the website for the algorhythm).
277
279 This a linux-specific option for using the operating system's access to
280 bus masters. Root access is required and the implementation was still
281 in progress as of owfs v2.7p12 and linux 2.6.30.
282
283 Bus masters are recognized and added dynamically. Details of the physi‐
284 cal bus master are not accessible, bu they include USB, i2c and a num‐
285 ber of GPIO designs on embedded boards.
286
287 Access is restrict to superuser due to the netlink broadcast protocol
288 employed by w1. Multitasking must be configured (threads) on the compi‐
289 lation.
290
291 --w1 Use the linux kernel w1 virtual bus master.
292
293 --timeout_w1=10
294 Timeout for w1 netlink communications. This has a 10 second
295 default and can be changed dynamically under /settings/time‐
296 out/w1
297
299 FTDI is a brand of USB-to-serial chips which are very common. If your
300 serial device is connected via a USB serial dongle based on a FTDI
301 chip, or if your adapter uses a built-in FTDI USB chip (for example,
302 the LinkUSB), you can use this FTDI addressing.
303
304 The main benefit with this mode of access is that we can decrease the
305 communication delay, yielding twice as fast 1-Wire communication in
306 many cases.
307
308 The following values for port can be used to identify a specific FTDI
309 port in several of the serial devices options.
310 Note that this requires that OWFS is built with libftdi support, which
311 might not be the case in standard repositories.
312
313 ftdi:d:<device-node>
314 path of bus and device-node (e.g. "003/001") within usb device
315 tree (usually at /proc/bus/usb/ or /dev/bus/usb/)
316
317 ftdi:i:<vendor>:<product>
318 first device with given vendor and product id, ids can be deci‐
319 mal, octal (preceded by "0") or hex (preceded by "0x")
320
321 ftdi:i:<vendor>:<product>:<index>
322 as above with index being the number of the device (starting
323 with 0) if there are more than one
324
325 ftdi:s:<vendor>:<product>:<serial number>
326 the device with given vendor id, product id and serial number
327 string
328
329 The above formats are parsed fully by libftdi (minus the ftdi: prefix).
330
331 Simplified device serial-only support
332 An additional format is supported, for certain bus types. This only
333 specifies the USB serial number.
334
335 ftdi:<serial number>
336 Identifies a FTDI device by serial number only. Currently, this
337 is only valid for the VID/PID found on the LinkUSB (i.e.
338 --link). Note that those VID/PID's are the default for any
339 FT232R device, and in no way exclusive to LinkUSB.
340
341 Permsissions
342 In order to run owserver (1) without root privileges - as you should,
343 you must have sufficient permissions to the raw USB node your adapter
344 is connected to e.g. "003/001" (usually at /proc/bus/usb/ or
345 /dev/bus/usb/).
346
347 An easy way to achieve this would be using chown (1):
348
349 sudo chown :<your user> /dev/bus/usb/003/001
350 changes the group of the raw USB node "003/001" from default
351 "root" to "<your user>"
352
353 You can also write a udev (1) rule for your adapter:
354
355 SUBSYSTEM=="usb", DRIVER=="usb", ATTR{idVendor}=="0403", ATTR{idProd‐
356 uct}=="6001", ATTR{serial}=="AK0048A0", GROUP="owsrv"
357 saved as a file e.g. "10-FTDI-LinkUSB.rules" in
358 "/etc/udev/rules.d/", this rule will automate the process of
359 changing the group to "owsrv" of the raw USB node the LinkUSB
360 adapter with S/N:AK0048A0 is connected to.
361
362 Serial USB node
363 Communication in FTDI mode accesses the RAW USB node and NOT the serial
364 USB node your OS might have created automatically e.g. /dev/ttyUSB0.
365 As a side effect, if existing, the serial USB node e.g. /dev/ttyUSB0 is
366 removed on successful starting of owserver (1). After it's termination
367 un- and re-plugging the adapter, or un- and reloading of the module
368 ftdi_sio will recreate the serial USB node.
369
370 Finding FTDI related information on your USB adapter
371 owusbprobe is THE tool to find the information needed for direct FTDI
372 addressing
373 However this tool might not yet be packaged in your version. Alterna‐
374 tively you can also use lsusb to find the usb node your adapter is con‐
375 nected to, and then use lsusb again on this very node:
376
377 sudo lsusb -D /path/to/your/raw/USB/device/node |egrep "idVen‐
378 dor|idProduct|iSerial"
379 sudo is necessary to get the value of iSerial field, if the per‐
380 missions are still unchanged
381
382 Examples FTDI addressing
383 owserver -d ftdi:s:0x0403:0x6001:A800bXHr
384 starts owserver with a LinkUSB
385 (VID:0x0403,PID:0x6001,S/N:A800bXHr) as bus master in DS2480B-
386 based emulation mode with direct FTDI access
387
388 owserver --link=ftdi:A800bXHr
389 starts owserver with a LinkUSB (S/N:A800bXHr) as bus master
390 identified by serial number only in native mode with direct FTDI
391 access
392
394 -p
395 TCP port or IPaddress:port for owserver
396
397 Other OWFS programs will access owserver via this address. (e.g. owfs
398 -s IP:port /1wire)
399
400 If no port is specified, the default well-known port (4304 -- assigned
401 by the IANA) will be used.
402
404 -C --Celsius
405 -F --Fahrenheit
406 -K --Kelvin
407 -R --Rankine
408 Temperature scale used for data output. Celsius is the default.
409
410 Can also be changed within the program at /settings/units/tempera‐
411 ture_scale
412
414 --mbar (default)
415 --atm
416 --mmHg
417 --inHg
418 --psi
419 --Pa
420 Pressure scale used for data output. Millibar is the default.
421
422 Can also be changed within the program at /settings/units/pres‐
423 sure_scale
424
425
427 Choose the representation of the 1-wire unique identifiers. OWFS uses
428 these identifiers as unique directory names.
429
430 Although several display formats are selectable, all must be in family-
431 id-crc8 form, unlike some other programs and the labelling on iButtons,
432 which are crc8-id-family form.
433
434 -f --format="f[.]i[[.]c]"
435 Display format for the 1-wire devices. Each device has a 8byte address,
436 consisting of:
437
438 f family code, 1 byte
439
440 i ID number, 6 bytes
441
442 c CRC checksum, 1 byte
443
444 Possible formats are f.i (default, 01.A1B2C3D4E5F6), fi fic f.ic f.i.c
445 and fi.c
446
447 All formats are accepted as input, but the output will be in the speci‐
448 fied format.
449
450 The address elements can be retrieved from a device entry in owfs by
451 the family, id and crc8 properties, and as a whole with address. The
452 reversed id and address can be retrieved as r_id and r_address.
453
455 -r --readonly
456 -w --write
457 Do we allow writing to the 1-wire bus (writing memory, setting
458 switches, limits, PIOs)? The write option is available for symmetry,
459 it's the default.
460
461 -P --pid-file filename
462 Places the PID -- process ID of owfs into the specified filename. Use‐
463 ful for startup scripts control.
464
465 --background | --foreground
466 Whether the program releases the console and runs in the background
467 after evaluating command line options. background is the default.
468
469 --error_print=0|1|2|3
470 =0 default mixed destination: stderr foreground / syslog background
471
472 =1 syslog only
473
474 =2 stderr only
475
476 =3 /dev/null (quiet mode).
477
478 --error_level=0..9
479 =0 default errors only
480
481 =1 connections/disconnections
482
483 =2 all high level calls
484
485 =3 data summary for each call
486
487 =4 details level
488
489 >4 debugging chaff
490
491 --error_level=9 produces a lot of output
492
494 -c file | --configuration file
495 Name of an owfs (5) configuration file with more command line parame‐
496 ters
497
498
500 See also this man page and the web site http://www.owfs.org
501
502 -h --help=[device|cache|program|job|temperature]
503 Shows basic summary of options.
504
505 device 1-wire bus master options
506
507 cache cache and communication size and timing
508
509 program
510 mountpoint or TCP server settings
511
512 job control and debugging options
513
514 temperature
515 Unique ID display format and temperature scale
516
517 -V --version
518 Version of this program and related libraries.
519
521 Timeouts for the bus masters were previously listed in Device options.
522 Timeouts for the cache affect the time that data stays in memory.
523 Default values are shown.
524
525 --timeout_volatile=15
526 Seconds until a volatile property expires in the cache. Volatile prop‐
527 erties are those (like temperature) that change on their own.
528
529 Can be changed dynamically at /settings/timeout/volatile
530
531 --timeout_stable=300
532 Seconds until a stable property expires in the cache. Stable properties
533 are those that shouldn't change unless explicitly changed. Memory con‐
534 tents for example.
535
536 Can be changed dynamically at /settings/timeout/stable
537
538 --timeout_directory=60
539 Seconds until a directory listing expires in the cache. Directory lists
540 are the 1-wire devices found on the bus.
541
542 Can be changed dynamically at /settings/timeout/directory
543
544 --timeout_presence=120
545 Seconds until the presence and bus location of a 1-wire device expires
546 in the cache.
547
548 Can be changed dynamically at /settings/timeout/presence
549
550 There are also timeouts for specific program responses:
551
552 --timeout_server=5
553 Seconds until the expected response from the owserver (1) is deemed
554 tardy.
555
556 Can be changed dynamically at /settings/timeout/server
557
558 --timeout_ftp=900
559 Seconds that an ftp session is kept alive.
560
561 Can be changed dynamically at /settings/timeout/ftp
562
564 These settings control the behavior of owserver (1) in granting and
565 dropping persistent tcp connections. The default settings are shown.
566
567 In general no changes should be needed. In general the purpose is to
568 limit total resource usage from an errant or rogue client.
569
570 --timeout_persistent_low=600
571 Minimum seconds that a persistent tcp connection to owserver (1) is
572 kept open. This is the limit used when the number of connections is
573 above --clients_persistent_low
574
575 --timeout_persistent_high=3600
576 Maximum seconds that a persistent tcp connection to owserver (1) is
577 kept open. This is the limit used when the number of connections is
578 below --clients_persistent_low
579
580 --clients_persistent_low=10
581 Maximum number of persistent tcp connections to owserver (1) before
582 connections start getting the more stringent time limitation --time‐
583 out_persistent_low
584
585 --clients_persistent_high=20
586 Maximum number of persistent tcp connections to before no more are
587 allowed (only non-persistent at this point). owserver (1) before no
588 more are allowed (only non-persistent at this point).
589
591 --no_dirall
592 Reject DIRALL messages (requests directory as a single message), forc‐
593 ing client to use older DIR method (each element is an individual mes‐
594 sage)
595
596 --no_get
597 Reject GET messages (lets owserver determine if READ or DIRALL is
598 appropriate). Client will fall back to older methods.
599
600 --no_persistence
601 Reject persistence in requests. All transactions will have to be new
602 connections.
603
604 --pingcrazy
605 Interject many "keep-alive" (PING) responses. Usually PING responses
606 are only sent when processing is taking a long time to inform client
607 that owserver is still there.
608
609
611 owserver -p 3001 -d /dev/ttyS0 runs owserver on tcp port 3001 and con‐
612 nects to a physical 1-wire bus on a serial port.
613
615 Programs
616 owfs (1) owhttpd (1) owftpd (1) owserver (1) owdir (1) owread (1)
617 owwrite (1) owpresent (1) owtap (1)
618
619 Configuration and testing
620 owfs (5) owtap (1) owmon (1)
621
622 Language bindings
623 owtcl (3) owperl (3) owcapi (3)
624
625 Clocks
626 DS1427 (3) DS1904(3) DS1994 (3) DS2404 (3) DS2404S (3) DS2415 (3)
627 DS2417 (3)
628
629 ID
630 DS2401 (3) DS2411 (3) DS1990A (3)
631
632 Memory
633 DS1982 (3) DS1985 (3) DS1986 (3) DS1991 (3) DS1992 (3) DS1993 (3)
634 DS1995 (3) DS1996 (3) DS2430A (3) DS2431 (3) DS2433 (3) DS2502 (3)
635 DS2506 (3) DS28E04 (3) DS28EC20 (3)
636
637 Switches
638 DS2405 (3) DS2406 (3) DS2408 (3) DS2409 (3) DS2413 (3) DS28EA00 (3)
639
640 Temperature
641 DS1822 (3) DS1825 (3) DS1820 (3) DS18B20 (3) DS18S20 (3) DS1920 (3)
642 DS1921 (3) DS1821 (3) DS28EA00 (3) DS28E04 (3)
643
644 Humidity
645 DS1922 (3)
646
647 Voltage
648 DS2450 (3)
649
650 Resistance
651 DS2890 (3)
652
653 Multifunction (current, voltage, temperature)
654 DS2436 (3) DS2437 (3) DS2438 (3) DS2751 (3) DS2755 (3) DS2756 (3)
655 DS2760 (3) DS2770 (3) DS2780 (3) DS2781 (3) DS2788 (3) DS2784 (3)
656
657 Counter
658 DS2423 (3)
659
660 LCD Screen
661 LCD (3) DS2408 (3)
662
663 Crypto
664 DS1977 (3)
665
666 Pressure
667 DS2406 (3) -- TAI8570
668
670 http://www.owfs.org
671
673 Paul Alfille (paul.alfille@gmail.com)
674
675
676
677OWSERVER Manpage 2004 OWSERVER(1)