toshiba-fn Code
Brought to you by:
asiniscalchi
| File | Date | Author | Commit |
|---|---|---|---|
| init.d | 2006-03-04 | asiniscalchi | [r4] using of start-stop-daemon in the init script |
| COPYING | 2006-03-04 | asiniscalchi | [r1] All starts here |
| INSTALL | 2006-03-04 | asiniscalchi | [r1] All starts here |
| INSTALL.gentoo | 2006-03-04 | asiniscalchi | [r1] All starts here |
| Makefile | 2006-03-09 | asiniscalchi | [r10] |
| README.fnfind | 2006-03-04 | asiniscalchi | [r9] |
| fnfind | 2006-03-04 | asiniscalchi | [r1] All starts here |
| toshiba-commands.c | 2006-03-04 | asiniscalchi | [r8] fan_toggle added |
| toshiba-commands.h | 2006-03-04 | asiniscalchi | [r8] fan_toggle added |
| toshiba-fn-scan.c | 2006-03-04 | asiniscalchi | [r1] All starts here |
| toshiba-fn.c | 2006-03-04 | asiniscalchi | [r8] fan_toggle added |
| toshiba-fn.conf | 2006-03-09 | asiniscalchi | [r10] |
| toshiba-fn.h | 2006-03-04 | asiniscalchi | [r1] All starts here |
Thanks to the help of George Betzos <betzos@engr.colostate.edu> I now have
a method of detecting the Fn key presses that can potentially work on all
models. However for this to work the program needs to know what port
the Fn key can be detected on.
If toshiba-fn-scan does not work on your model, then we need to find out what port
the Fn key status reporting is on, and the machine identification number
for you model.
Finding the port takes a bit of experimentation. However I have tried to
simplify it as much as possible with a shell script. In the src directory there
is a shell script called fnfind. This needs to be run as root with
./fnfind
When run make sure that no keys are pressed, and then when prompted hold
down Fn+F4 and keep it held down. This will only have the effect of changing
the speaker volume. You have five seconds to hold down Fn+F4 after being
prompted.
Hopefully the result form this should be something like this (which is from
my laptop)
Make sure no keys are pressed
---
---
Hold down Fn+F4 (only changes speaker volume)
---
000060 9c 20 28 ff 14 ff 00 ff 3e ff ff ff 60 ff 00 ff
---
As you can see scanning along the line of number after holding down Fn+F4 we
can see a value 3e. Count out from the start of the row of two character
numbers, starting from 9c (zero) to 3e (eight) and add this to the first number
(000060). As a sanity check their should be no 3e when no keys are pressed.
Example:
000060 9c 20 28 ff 14 ff 00 ff 3e ff ff ff 60 ff 00 ff
^^^^ ^^
0x60 + 0 1 2 3 4 5 6 7 8 ---> 0x60 + 8 = 0x68
In this case we get 0x68. Remember we are using hexadecimal so after 9 comes a.
Currently only two port locations are known for the Fn key 0x62 and 0x68.
If fnfind does not work you can try these numbers until you find one that
does work.
Make sure the toshiba kernel module is *unloaded* with "rmmod toshiba",
then load the kernel module with port number as a parameter. On my laptop
this would be
insmod toshiba fn=0x68
Replace 0x68 with whatever the port number you have found from the first
step is. Now try running the toshiba-fn-scan program. If it works then please email
me the port number, and the output of "cat /proc/toshiba". I will then
be able to modify the kernel module so that in future releases the module
detects this automatically.
In the mean time you might wish to add the following line to /etc/conf.modules
so that you don't have to specify the port number every time the module
is loaded.
options toshiba fn=0x68
Again replace 0x68 with whatever the port number is for your notebook.
JAB.