OSDN Git Service

v23
[android-x86/external-wireless-tools.git] / wireless_tools / PCMCIA.txt
1         One of the most exciting thing having happen after release 20
2 is the addition of Wireless Extension support in the Pcmcia init
3 scripts. Here is a quick intro on the subject...
4
5 Pre-requisite :
6 -------------
7         o Pcmcia package with Wireless Extension support : 3.1.15 onward
8         o A driver with Wireless Extension support
9         o The tools (iwconfig and co.) installed in the /usr/local/sbin
10                 or /usr/sbin
11
12 Raylink driver :
13 --------------
14         The Raylink driver as of 1.70 doesn't support yet writable
15 Wireless Extensions, so enabling wireless.opts on this driver will
16 make thing worse.
17
18 Pcmcia precompiled package :
19 --------------------------
20         The Pcmcia package part of many distributions, especially
21 those from Red-Hat, include some weird init scripts. Because of this,
22 the present feature won't work.
23         On the other hand, the Pcmcia package in source form from the
24 official Linux-Pcmcia web site will install the proper init scripts.
25
26 Basic support :
27 -------------
28         The file /etc/pcmcia/wireless.opts contain some templates for
29 the most common drivers. Just fill in your card configuration in the
30 template corresponding to your driver configuration.
31         Then, to activate it, you just need to remove or comment the 4
32 lines at the top of wireless.opts and restart the Pcmcia package.
33
34         Things to take care of :
35         The options of wireless.opts will be used directly as
36 arguments of iwconfig. So, you need iwconfig, and you need to check
37 the man page of iwconfig to know how to format them.
38         A quick way to determine the correct options without
39 restarting Pcmcia is to play a bit with iwconfig directly to see what
40 is possible and what is the proper setup of the card and to copy that
41 in wireless.opts.
42         At the end of wireless.opts, there is also a generic template
43 containing all the possible options and explaining their meaning. Not
44 all of them are supported by all cards (actually, most cards support a
45 limited subset of it).
46         The current card templates are designed to match the MAC
47 address of the card. Please check that this matches with your card.
48         Also, sample describe the most common/useful options available
49 with the card, for more advance option, borrow options from the
50 template. You can also remove some options, the card will usually
51 initialise with a sane value.
52
53         Alternatively, you can also discard the current wireless.opts
54 and replace it with a file looking like this :
55 ----------- wireless.opts ---------------------
56 case "$ADDRESS" in
57 *,*,*,*)
58     ESSID="MY_ESSID"
59     MODE="Managed"
60     ;;
61 esac
62 -----------------------------------------------
63
64
65 Scheme support :
66 --------------
67         The file wireless.opts fully support schemes. This allow you
68 to define different configurations (home, work...) and to switch on
69 the fly between them.
70         The best way to explain it is to show an example.
71         Let's say you have an infrastructured setup at work (MY_WORK)
72 and an adhoc network at home (MY_HOME). Moreover, when a specific card
73 is inserted, you want it to be in adhoc mode (TEST). The work setup
74 will be the default...
75
76         Each Wireless LAN will have the following configuration :
77 --------- wireless.opts --------------------
78 # Lucent Wavelan IEEE - Ad-Hoc mode for test card
79 *,*,*,00:60:1D:03:9F:2D)
80     ESSID="TEST"
81     MODE="Ad-Hoc"
82     FREQ="10"
83     RATE="1M"
84     ;;
85
86 # Lucent Wavelan IEEE - Ad-Hoc mode at home
87 home,*,*,00:60:1D:*|home,*,*,00:02:2D:*)
88     ESSID="MY_HOME"
89     MODE="Ad-Hoc"
90     FREQ="5"
91     ;;
92
93 # Lucent Wavelan IEEE - infrastructured mode at work
94 *,*,*,00:60:1D:*|*,*,*,00:02:2D:*)
95     ESSID="MY_WORK"
96     MODE="Managed"
97     KEY="s:verysecurekey"
98     ;;
99 --------------------------------------------
100
101         Don't forget the IP configuration :
102 --------- network.opts ---------------------
103 # Wavelan IEEE : ad-hoc mode for test card
104 *,*,*,00:60:1D:03:9F:2D)
105     DHCP="n"
106     IPADDR="10.0.0.1"
107     NETMASK="255.255.255.0"
108     NETWORK="10.0.0.0"
109     BROADCAST="10.0.0.255"
110     ;;
111
112 # Wavelan IEEE : ad-hoc mode at home
113 home,*,*,00:60:1D:*|home,*,*,00:02:2D:*)
114     DHCP="n"
115     IPADDR="10.0.1.19"
116     NETMASK="255.255.255.0"
117     NETWORK="10.0.1.0"
118     BROADCAST="10.0.1.255"
119     GATEWAY="15.0.1.1"
120     ;;
121
122 # Wavelan IEEE : infrastructured mode at work
123 *,*,*,00:60:1D:*|*,*,*,00:02:2D:*)
124     DHCP="y"
125     ;;
126 --------------------------------------------
127
128         Now, when you are at work you do :
129 > cardctl scheme default
130         And at home, you do :
131 > cardctl scheme home
132
133         I guess you get the idea ;-)
134
135         Jean <jt@hpl.hp.com>