]> rtime.felk.cvut.cz Git - can-usb1.git/blob - ulan/host/ul_drv/ul_drv/README
Initializing repo
[can-usb1.git] / ulan / host / ul_drv / ul_drv / README
1 ul_drv - uLan RS-485 communication driver
2
3 Copyright (C) 1999 Pavel Pisa  (pisa@cmp.felk.cvut.cz)
4
5 uLan provides 9-bit message oriented communication protocol,
6 which is transfered over RS-485 link. Characters are transfered
7 same way as for RS-232 asynchronous transfer except parity
8 bit, which is used to distinguish between data characters
9 and protocol control information. Physical layer consist
10 of one twisted pair of leads and RS-485 transceivers.
11
12 ul_drv is Linux device driver designed to access uLan network. 
13 Latest versions of the ul_drv can be compiled from same 
14 source into Windows NT KMD driver too (try to use ul_drv.mak).
15 Today supported hardware is i82510 RS-485 card or simple
16 active converter dongle for standard PC RS-232 ports.
17 This version of driver was compiled and tested with 
18 Linux 2.2.4 kernel. Header file k_compat.h should enable
19 compilation for most of 2.0.xx, 2.1.xx and 2.2.xx kernels,
20 but tweaking of k_compat.h may be necessary for some
21 2.1.xx kernel versions.
22
23 Makefile is link to Makefile-mod to compile driver with
24 your kernel configuration. Makefile-mod expect, that
25 kernel sources are in "/usr/src/linux" directory
26 and that kernel sources and its configuration 
27 are of same version as current running kernel.
28 Enter next command in ul_drv directory to compile and
29 install the module
30
31     make install
32
33 Module is installed into "/lib/modules/x.y.z/misc" directory.
34
35 Driver can control up to four devices, but only check
36 for 0x3e8 port number is default behavior after "insmod ul_drv".
37 Because of driver controls same hardware as Linux serial
38 driver, it is necessary to disable default kernel driver
39 for same port in case of conflict. It can be done for example by
40
41     setserial /dev/ttyS2 uart none
42
43 Port numbers and others parameters can be defined by module 
44 parameters. To access driver from programs special character
45 device files must be created. Suggested names are
46
47     mknod /dev/ulan0 c 248 0
48     mknod /dev/ulan1 c 248 1
49     ln -sf /dev/ulan0 /dev/ulan
50
51 "/dev/ulan" is default name for client programs.
52 Major number 248 is in experimental range and will
53 be changed in future. Number is defined in ul_hdep.h.
54 If defined as zero, dynamic number is assigned after insmod.
55
56 ul_drv module parameters
57
58   port=<iop>{,<iop> ...}
59         up to four IO port numbers separated by comas
60         for up to four uLan devices
61
62   irq=<int>{,<int> ...}
63         select for every defined device corresponding
64         IRQ number. Value 0 means autoprobe.
65
66   baud=<spd>{,<spd> ...}
67         defines transfer baud-rate for every device
68         default value is 9600
69
70   my_adr=<adr>{,<adr> ...}
71         address of every computer interface as seen
72         from uLan network 
73         range is from 1 to 64
74         default value is 2 for all interfaces
75
76
77 Bellow are example parameters for dongle converter plugged
78 to regular COM2 port.
79
80     setserial /dev/ttyS1 uart none
81     insmod ul_drv port=0x2f8 irq=3 baud=9600 my_adr=2
82
83 Add next lines to /etc/modules.conf to enable on-demand
84 module loading
85
86     alias    char-major-248 ul_drv
87     options    ul_drv port=0x2f8 irq=3 baud=9600 my_adr=2
88     pre-install ul_drv /sbin/setserial /dev/ttyS1 uart none
89