File: README

package info (click to toggle)
dtlk 1.12-7
  • links: PTS
  • area: main
  • in suites: potato, slink
  • size: 196 kB
  • ctags: 89
  • sloc: ansic: 703; sh: 204; makefile: 100
file content (99 lines) | stat: -rw-r--r-- 4,086 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
	dtlk - Linux device driver for the DoubleTalk PC (internal DoubleTalk)

These are some simple instructions for compilation and use of the
DoubleTalk device driver.  A device driver is part of the kernel.
This driver is written as a "module", which means it is linked into
the running kernel by insmod.  Therefore, you do not need to recompile
the kernel in order to use the DoubleTalk driver.

Building and installing the DoubleTalk device requires at least these
programs: tar, make, gcc, and insmod.  insmod is part of the modules
package.  You will also need the /proc filesystem configured into the
kernel.  

Note that there are two kinds "installation" involved in using a
kernel module.  One is moving the file from the build directory to a
standard location.  The other is loading it into the running kernel.

To build the driver, unpack the .tar file, and type "make".  You can
do this as a normal user.  For most of the remaining steps you have to
be root.

You can install the module into the running kernel with the command
"insmod dtlk.o".  The DoubleTalk PC should say "DoubleTalk found".  A
line like this should also be printed on the console:

DoubleTalk PC at 29e-29f, ROM version 5.72, serial number 12588, MAJOR 127

There are several ways you can check out the module.  

The command "lsmod" will list the installed modules, and there should
be a line like "dtlk 1 1".  The command "cat /proc/modules" will print
a similar listing.

The command "cat /proc/devices|grep dtlk" should reply with something
like "127 dtlk".  (The number is the major device number assigned to
the DoubleTalk.  It is assigned dynamically, so your number may be
different.)

You can also see the I/O ports where the DoubleTalk was found, with
the command "cat /proc/ioports |grep dtlk", which should reply with
something like "029e-029f : dtlk".

Remove with the module with the command "rmmod dtlk".  It should say
"goodbye".

In order to use the DoubleTalk device, you need to create the special
file /dev/dtlk with the command "mknod /dev/dtlk c 127 0".
Remember that this must be done as root, and that the device number
may be different for you.  The file then needs permissions that will
let the intended users have read and write access.  You can give
everyone access with the command "chmod 777 /dev/dtlk".

For the most part, the device driver simply forwards bytes to the
device.  This means that a carriage return must be written to actually
get anything spoken.  With the bash shell, this is one way: "echo
$'hello world\r' >/dev/dtlk".

An appropriate location for the module is in /lib/modules/2.0.29/misc,
where the number is the version of the kernel.  The command "make
install" will create this directory if necessary, and move the module
there.  If you upgrade to a new version of the kernel, you may have to
rebuild the DoubleTalk module for the new kernel and install again.
To avoid this, answer "Y" to this question when you configure the
kernel: "Set version information on all symbols for modules?"

The following script will load the module into the running kernel,
create the appropriate device file, and give it 777 permissions:

insmod /lib/modules/`uname --release`/misc/dtlk.o
rm -f /dev/dtlk
mknod /dev/dtlk c `cat /proc/devices |awk '/dtlk/{print $1}'` 0
chmod 777 /dev/dtlk

This installation script might be put in /sbin/dtlk.  Alternatively,
the following lines could be added to one of the boot scripts such as
/etc/rc.d/rc.local:

if [ -f /lib/modules/`uname --release`/misc/dtlk.o ]; then
  rm -f /dev/dtlk
  insmod /lib/modules/`uname --release`/misc/dtlk.o
  mknod /dev/dtlk c `cat /proc/devices |awk '/dtlk/{print $1}'` 0
  chmod 777 /dev/dtlk
fi

After either of these scripts is run, you can check that the special
device exists with ls, like this:

ls -l /dev/dtlk
crw-rw-rw-   1 root     root     127,   0 Jun 21 10:52 /dev/dtlk

This script will remove the module and the special file:

rmmod dtlk
rm /dev/dtlk

If you have questions or comments, please send them to me at
jrv@vanzandt.mv.com.

                             - Jim Van Zandt