forked from kriswebdev/android_wireless_tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PCMCIA.txt
160 lines (140 loc) · 5.36 KB
/
PCMCIA.txt
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
Pcmcia Wireless configuration
-----------------------------
One of the most exciting things having happen after release 20
is the addition of Wireless Tools support in the Pcmcia init
scripts. Here is a quick intro on the subject...
Pre-requisite :
-------------
o Pcmcia package with Wireless Extension support : 3.1.15 onward
o A driver with Wireless Extension support
o The tools (iwconfig and co.) installed in the /usr/local/sbin
or /usr/sbin
Raylink driver :
--------------
The Raylink driver as of 1.70 doesn't support writable
Wireless Extensions, so enabling wireless.opts on this driver will
make things worse.
On the other hand, the latest version of the Raylink driver
accepts Wireless Extensions at boot time, so the procedure described
below will work.
Distribution specific notes :
---------------------------
Most modern distributions don't use wireless.opts and have
their own procedure for wireless configuration, which is usually
compatible with their configuration tools and work for non-Pcmcia
devices. This is documented in DISTRIBUTIONS.txt.
The procedure described here will work only with the original
Pcmcia configuration scripts. If you use a precompiled package part of
a distributions, this is usually not the case (see above).
On the other hand, if you install the Pcmcia package in source
form from the official Linux-Pcmcia web site, it will install the
proper init scripts and those instructions will apply.
Basic support :
-------------
The file /etc/pcmcia/wireless.opts contains some templates for
the most common drivers. Just fill in your card configuration in the
template corresponding to your driver configuration.
Then, to activate it, you just need to remove or comment the 4
lines at the top of wireless.opts and restart the Pcmcia package.
Things to take care of :
The options of wireless.opts will be used directly as
arguments of iwconfig. So, you need iwconfig, and you need to check
the man page of iwconfig to know how to format them.
A quick way to determine the correct options without
restarting Pcmcia is to play a bit with iwconfig directly to see what
is possible and what is the proper setup of the card and to copy that
in wireless.opts.
At the end of wireless.opts, there is also a generic template
containing all the possible options and explaining their meaning. Not
all of them are supported by all cards (actually, most cards support a
limited subset of it).
The current card templates are designed to match the MAC
address of the card. Please check that this matches with your card.
Also, sample describe the most common/useful options available
with the card, for more advance option, borrow options from the
template. You can also remove some options, the card will usually
initialise with a sane value.
Alternatively, you can also discard the current wireless.opts
and replace it with a file looking like this :
----------- wireless.opts ---------------------
case "$ADDRESS" in
*,*,*,*)
ESSID="MY_ESSID"
MODE="Managed"
;;
esac
-----------------------------------------------
Scheme support :
--------------
The file wireless.opts fully supports schemes. This allow you
to define different configurations (home, work...) and to switch on
the fly between them.
The best way to explain it is to show an example.
Let's say you have an infrastructured setup at work (MY_WORK)
and an Ad-Hoc network at home (MY_HOME). Moreover, when a specific card
is inserted, you want it to be in Ad-Hoc mode (TEST). The work setup
will be the default...
Each Wireless LAN will have the following configuration :
--------- wireless.opts --------------------
# Lucent Wavelan IEEE - Ad-Hoc mode for test card
*,*,*,00:60:1D:03:9F:2D)
ESSID="TEST"
MODE="Ad-Hoc"
FREQ="10"
RATE="1M"
;;
# Lucent Wavelan IEEE - Ad-Hoc mode at home
home,*,*,00:60:1D:*|home,*,*,00:02:2D:*)
ESSID="MY_HOME"
MODE="Ad-Hoc"
FREQ="5"
;;
# Lucent Wavelan IEEE - infrastructured mode at work
*,*,*,00:60:1D:*|*,*,*,00:02:2D:*)
ESSID="MY_WORK"
MODE="Managed"
KEY="s:verysecurekey"
;;
--------------------------------------------
Don't forget the IP configuration :
--------- network.opts ---------------------
# Wavelan IEEE : ad-hoc mode for test card
*,*,*,00:60:1D:03:9F:2D)
DHCP="n"
IPADDR="10.0.0.1"
NETMASK="255.255.255.0"
NETWORK="10.0.0.0"
BROADCAST="10.0.0.255"
;;
# Wavelan IEEE : ad-hoc mode at home
home,*,*,00:60:1D:*|home,*,*,00:02:2D:*)
DHCP="n"
IPADDR="10.0.1.19"
NETMASK="255.255.255.0"
NETWORK="10.0.1.0"
BROADCAST="10.0.1.255"
GATEWAY="15.0.1.1"
;;
# Wavelan IEEE : infrastructured mode at work
*,*,*,00:60:1D:*|*,*,*,00:02:2D:*)
DHCP="y"
;;
--------------------------------------------
Now, when you are at work you do :
> cardctl scheme default
And at home, you do :
> cardctl scheme home
I guess you get the idea ;-)
More elaborated configurations :
------------------------------
Some people may need some more complex configurations. For
example, you might want to do one of the following thing :
o cycle through a set of schemes
o autodetect the proper scheme
There is currently no support to do that. However, the
Wireless Tools package contains a tool called "iwgetid" that can help
in this job. The source code contains some hints on how to achieve the
above thing.
If you ever write such a package, please send me the URL.
Good luck !
Jean <[email protected]>