PCMCIA.txt 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. Pcmcia Wireless configuration
  2. -----------------------------
  3. One of the most exciting things having happen after release 20
  4. is the addition of Wireless Tools support in the Pcmcia init
  5. scripts. Here is a quick intro on the subject...
  6. Pre-requisite :
  7. -------------
  8. o Pcmcia package with Wireless Extension support : 3.1.15 onward
  9. o A driver with Wireless Extension support
  10. o The tools (iwconfig and co.) installed in the /usr/local/sbin
  11. or /usr/sbin
  12. Raylink driver :
  13. --------------
  14. The Raylink driver as of 1.70 doesn't support writable
  15. Wireless Extensions, so enabling wireless.opts on this driver will
  16. make things worse.
  17. On the other hand, the latest version of the Raylink driver
  18. accepts Wireless Extensions at boot time, so the procedure described
  19. below will work.
  20. Distribution specific notes :
  21. ---------------------------
  22. Most modern distributions don't use wireless.opts and have
  23. their own procedure for wireless configuration, which is usually
  24. compatible with their configuration tools and work for non-Pcmcia
  25. devices. This is documented in DISTRIBUTIONS.txt.
  26. The procedure described here will work only with the original
  27. Pcmcia configuration scripts. If you use a precompiled package part of
  28. a distributions, this is usually not the case (see above).
  29. On the other hand, if you install the Pcmcia package in source
  30. form from the official Linux-Pcmcia web site, it will install the
  31. proper init scripts and those instructions will apply.
  32. Basic support :
  33. -------------
  34. The file /etc/pcmcia/wireless.opts contains some templates for
  35. the most common drivers. Just fill in your card configuration in the
  36. template corresponding to your driver configuration.
  37. Then, to activate it, you just need to remove or comment the 4
  38. lines at the top of wireless.opts and restart the Pcmcia package.
  39. Things to take care of :
  40. The options of wireless.opts will be used directly as
  41. arguments of iwconfig. So, you need iwconfig, and you need to check
  42. the man page of iwconfig to know how to format them.
  43. A quick way to determine the correct options without
  44. restarting Pcmcia is to play a bit with iwconfig directly to see what
  45. is possible and what is the proper setup of the card and to copy that
  46. in wireless.opts.
  47. At the end of wireless.opts, there is also a generic template
  48. containing all the possible options and explaining their meaning. Not
  49. all of them are supported by all cards (actually, most cards support a
  50. limited subset of it).
  51. The current card templates are designed to match the MAC
  52. address of the card. Please check that this matches with your card.
  53. Also, sample describe the most common/useful options available
  54. with the card, for more advance option, borrow options from the
  55. template. You can also remove some options, the card will usually
  56. initialise with a sane value.
  57. Alternatively, you can also discard the current wireless.opts
  58. and replace it with a file looking like this :
  59. ----------- wireless.opts ---------------------
  60. case "$ADDRESS" in
  61. *,*,*,*)
  62. ESSID="MY_ESSID"
  63. MODE="Managed"
  64. ;;
  65. esac
  66. -----------------------------------------------
  67. Scheme support :
  68. --------------
  69. The file wireless.opts fully supports schemes. This allow you
  70. to define different configurations (home, work...) and to switch on
  71. the fly between them.
  72. The best way to explain it is to show an example.
  73. Let's say you have an infrastructured setup at work (MY_WORK)
  74. and an Ad-Hoc network at home (MY_HOME). Moreover, when a specific card
  75. is inserted, you want it to be in Ad-Hoc mode (TEST). The work setup
  76. will be the default...
  77. Each Wireless LAN will have the following configuration :
  78. --------- wireless.opts --------------------
  79. # Lucent Wavelan IEEE - Ad-Hoc mode for test card
  80. *,*,*,00:60:1D:03:9F:2D)
  81. ESSID="TEST"
  82. MODE="Ad-Hoc"
  83. FREQ="10"
  84. RATE="1M"
  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. # Lucent Wavelan IEEE - infrastructured mode at work
  93. *,*,*,00:60:1D:*|*,*,*,00:02:2D:*)
  94. ESSID="MY_WORK"
  95. MODE="Managed"
  96. KEY="s:verysecurekey"
  97. ;;
  98. --------------------------------------------
  99. Don't forget the IP configuration :
  100. --------- network.opts ---------------------
  101. # Wavelan IEEE : ad-hoc mode for test card
  102. *,*,*,00:60:1D:03:9F:2D)
  103. DHCP="n"
  104. IPADDR="10.0.0.1"
  105. NETMASK="255.255.255.0"
  106. NETWORK="10.0.0.0"
  107. BROADCAST="10.0.0.255"
  108. ;;
  109. # Wavelan IEEE : ad-hoc mode at home
  110. home,*,*,00:60:1D:*|home,*,*,00:02:2D:*)
  111. DHCP="n"
  112. IPADDR="10.0.1.19"
  113. NETMASK="255.255.255.0"
  114. NETWORK="10.0.1.0"
  115. BROADCAST="10.0.1.255"
  116. GATEWAY="15.0.1.1"
  117. ;;
  118. # Wavelan IEEE : infrastructured mode at work
  119. *,*,*,00:60:1D:*|*,*,*,00:02:2D:*)
  120. DHCP="y"
  121. ;;
  122. --------------------------------------------
  123. Now, when you are at work you do :
  124. > cardctl scheme default
  125. And at home, you do :
  126. > cardctl scheme home
  127. I guess you get the idea ;-)
  128. More elaborated configurations :
  129. ------------------------------
  130. Some people may need some more complex configurations. For
  131. example, you might want to do one of the following thing :
  132. o cycle through a set of schemes
  133. o autodetect the proper scheme
  134. There is currently no support to do that. However, the
  135. Wireless Tools package contains a tool called "iwgetid" that can help
  136. in this job. The source code contains some hints on how to achieve the
  137. above thing.
  138. If you ever write such a package, please send me the URL.
  139. Good luck !
  140. Jean <jt@hpl.hp.com>