Advertisement
Guest User

Untitled

a guest
Jul 13th, 2010
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.03 KB | None | 0 0
  1. Release Date: 2009-0825, ver 0003
  2. RTL8192SU Linux driver
  3. --This driver supports RealTek rtl8192SU USB Wireless LAN NIC
  4. for
  5. 2.6 kernel:
  6. Fedora Core 2/3/4/5, Debian 3.1, Mandrake 10.2/Mandriva 2006,
  7. SUSE 9.3/10.1/10.2, Gentoo 3.1, Ubuntu 7.10/8.04, etc.
  8. 2.4 kernel:
  9. Redhat 9.0/9.1
  10.  
  11. ===============================================================================
  12. Component
  13. ===============================================================================
  14. The driver is composed of several parts:
  15. 1. Firmare to make nic work
  16. 1.1 firmare/RTL8192SU
  17.  
  18. 2. Module source code
  19. 2.1 ieee80211
  20. 2.2 HAL/rtl8192u
  21. 2.3 wpa_supplicant-0.5.10 (User can download the latest version from
  22. internet also, but it is suggested to use default package contained
  23. in the distribution because there should less compilation issue.)
  24.  
  25. 3. Script to build the modules
  26. 3.1 Makefile
  27.  
  28. 4. Script to load/unload modules
  29. 4.1 wlan0up
  30. 4.2 wlan0down
  31.  
  32. 5. Script and configuration for DHCP
  33. 5.1 wlan0dhcp
  34. 5.2 ifcfg-wlan0
  35.  
  36. 6. Example of supplicant configuration file:
  37. 6.1 wpa1.conf
  38.  
  39. 7. Script to run wpa_supplicant
  40. 7.1 runwpa
  41.  
  42. ===============================================================================
  43. Installation
  44. ===============================================================================
  45. <<Method 1>>
  46. Runing the scripts accomplish all operations including building up modules
  47. from the source code, installing driver to the kernel and starting up the nic.
  48. 1. Build up the drivers from the source code
  49. make
  50.  
  51. 2. Install the driver to the kernel
  52. make install
  53. reboot
  54.  
  55. 3. bring up wlan if nic is not brought up by GUI, such as NetworkManager
  56. ifconfig wlan0 up
  57. Note: use ifconfig to check whether wlan0 is brought up and use iwconfig to check your wlan interface name,
  58. since it may change wlan0 to wlan1,etc.
  59.  
  60. <<Method 2>>
  61. Or only load the driver module to kernel and start up nic.
  62. 1. Build up the drivers from the source code
  63. make
  64. 2. Copy firmware to /lib/firmware/ or /lib/firmware/(KERNEL_VERSION)/
  65. cp -rf firmware/RTL8192SU /lib/firmware
  66. or
  67. cp -rf firmware/RTL8192SU /lib/firmware/(KERNEL_VERSION)
  68. Note: This depends on whether (KERNEL_VERSION) subdirectory exists under /lib/firmware
  69.  
  70. 3. Load driver module to kernel and start up nic.
  71. ./wlan0up
  72. Note: when "insmod: error inserting 'xxxx.ko': -1 File exists" comes out
  73. after run ./wlan0up, please run ./wlan0down first, then it should
  74. be ok..
  75. Note: If you see the message of "unkown symbol" during ./wlan0up, it
  76. is suggested to build driver by <<Method 1>>.
  77.  
  78. ===============================================================================
  79. Set wireless lan MIBs
  80. ===============================================================================
  81. This driver uses Wireless Extension as an interface allowing you to set
  82. Wireless LAN specific parameters.
  83.  
  84. Current driver supports "iwlist" to show the device status of nic
  85. iwlist wlan0 [parameters]
  86. where
  87. parameter explaination [parameters]
  88. ----------------------- -------------
  89. Show available chan and freq freq / channel
  90. Show and Scan BSS and IBSS scan[ning]
  91. Show supported bit-rate rate / bit[rate]
  92.  
  93. For example:
  94. iwlist wlan0 channel
  95. iwlist wlan0 scan
  96. iwlist wlan0 rate
  97.  
  98. Driver also supports "iwconfig", manipulate driver private ioctls, to set
  99. MIBs.
  100.  
  101. iwconfig wlan0 [parameters] [val]
  102. where
  103. parameter explaination [parameters] [val] constraints
  104. ----------------------- ------------- ------------------
  105. Connect to AP by address ap [mac_addr]
  106. Set the essid, join (I)BSS essid [essid]
  107. Set operation mode mode {Managed|Ad-hoc}
  108. Set keys and security mode key/enc[ryption] {N|open|restricted|off}
  109.  
  110. For example:
  111. iwconfig wlan0 ap XX:XX:XX:XX:XX:XX
  112. iwconfig wlan0 essid "ap_name"
  113. iwconfig wlan0 mode Ad-hoc
  114. iwconfig wlan0 essid "name" mode Ad-hoc
  115. iwconfig wlan0 key 0123456789 [2] open
  116. iwconfig wlan0 key off
  117. iwconfig wlan0 key restricted [3] 0123456789
  118. Note: Better to set these MIBS without GUI such as NetworkManager and be sure that our
  119. nic has been brought up before these settings. WEP key index 2-4 is not supportted by
  120. NetworkManager.
  121.  
  122. ===============================================================================
  123. Getting IP address
  124. ===============================================================================
  125. After start up the nic, the network needs to obtain an IP address before
  126. transmit/receive data.
  127. This can be done by setting the static IP via "ifconfig wlan0 IP_ADDRESS"
  128. command, or using DHCP.
  129.  
  130. If using DHCP, setting steps is as below:
  131. (1)connect to an AP via "iwconfig" settings
  132. iwconfig wlan0 essid [name] or
  133. iwconfig wlan0 ap XX:XX:XX:XX:XX:XX
  134.  
  135. (2)run the script which run the dhclient
  136. ./wlan0dhcp
  137. or
  138. dhcpcd wlan0
  139. (Some network admins require that you use the
  140. hostname and domainname provided by the DHCP server.
  141. In that case, use
  142. dhcpcd -HD wlan0)
  143.  
  144.  
  145. ===============================================================================
  146. WPAPSK/WPA2PSK
  147. ===============================================================================
  148. Wpa_supplicant helps to secure wireless connection with the protection of
  149. WPAPSK/WPA2PSK mechanism.
  150.  
  151. If the version of Wireless Extension in your system is equal or larger than 18,
  152. WEXT driver interface is recommended. Otherwise, IPW driver interface is advised.
  153. Note: Wireless Extension is defined us "#define WIRELESS_EXT" in Kernel
  154. Note: To check the version of wireless extension, please type "iwconfig -v"
  155.  
  156.  
  157. If IPW driver interface is used, it us suggested to follow the steps from 1 to 6.
  158. If wpa_supplicant has been installed in your system, only steps 5 and 6 are required
  159. to be executed for WEXT driver interface.
  160.  
  161. To see detailed description for driver interface and wpa_supplicant, please type
  162. "man wpa_supplicant".
  163.  
  164. (1)Download latetest source code for wpa supplicant or use wpa_supplicant-0.5.10
  165. attached in this package. (It is suggested to use default package contained
  166. in the distribution because there should less compilation issue.)
  167.  
  168. Unpack source code of WPA supplicant:
  169.  
  170. tar -zxvf wpa_supplicant-0.5.10.tar.gz (e.g.)
  171. cd wpa_supplicant-0.5.10
  172.  
  173. (2)Create .config file:
  174. cp defconfig .config
  175.  
  176. (3)Edit .config file, uncomment the following line if ipw driver interface
  177. will be applied:
  178. #CONFIG_DRIVER_IPW=y.
  179.  
  180. (4)Build and install WPA supplicant:
  181. make
  182. cp wpa_cli wpa_supplicant /usr/local/bin
  183.  
  184. NOTE:
  185. 1. If make error for lack of <include/md5.h>, install the openssl lib(two ways):
  186. (1) Install the openssl lib from corresponding installation disc:
  187. Fedora Core 2/3/4/5(openssl-0.9.71x-xx),
  188. Mandrake10.2/Mandriva10.2(openssl-0.9.7x-xmdk),
  189. Debian 3.1(libssl-dev), Suse 9.3/10.0/10.1(openssl_devl),
  190. Gentoo(dev-libs/openssl), etc.
  191. (2) Download the openssl open source package from www.openssl.org, build and
  192. install it.
  193. 2. If make errors happen in RedHat(and also Fedora Core) for kssl.h,
  194. please add lines below into Makefile
  195. CPPFLAGS+=-I/usr/kerboros/include
  196.  
  197. (5)Edit wpa_supplicant.conf to set up SSID and its passphrase.
  198. For example, the following setting in "wpa1.conf" means SSID
  199. to join is "BufAG54_Ch6" and its passphrase is "87654321".
  200.  
  201. Example 1: Configuration for WPA-PWK
  202. network={
  203. ssid="BufAG54_Ch6"
  204. #scan_ssid=1 //see note 3
  205. proto=WPA
  206. key_mgmt=WPA-PSK
  207. pairwise=CCMP TKIP
  208. group=CCMP TKIP WEP104 WEP40
  209. psk="87654321"
  210. priority=2
  211. }
  212.  
  213. Example 2: Configuration for LEAP
  214. network={
  215. ssid="BufAG54_Ch6"
  216. key_mgmt=IEEE8021X
  217. group=WEP40 WEP104
  218. eap=LEAP
  219. identity="user1"
  220. password="1111"
  221. }
  222. Example 3: Linking to hidden ssid given AP's security policy exactly.(see note 3 below)
  223. ap_scan=2
  224. network={
  225. ssid="Hidden_ssid"
  226. proto=WPA
  227. key_mgmt=WPA-PSK
  228. pairwise=CCMP
  229. group=CCMP
  230. psk="12345678"
  231. }
  232.  
  233. Example 4: Linking to ad-hoc (see note 4 below)
  234. ap_scan=2
  235. network={
  236. ssid="Ad-hoc"
  237. mode=1
  238. proto=WPA
  239. key_mgmt=WPA-NONE
  240. pairwise=NONE
  241. group=TKIP
  242. psk="12345678"
  243. }
  244. Note: 1. proto=WPA for WPA, proto=RSN for WPA2.
  245. 2. If user needs to connect an AP with WPA or WPA2 mixed mode, it is suggested
  246. to set the cipher of pairwise and group to both CCMP and TKIP unless you
  247. know exactly which cipher type AP is configured.
  248. 3. When connecting to hidden ssid, explicit security policy should be given with
  249. ap_scan=2 being setting.
  250. 4. It is suggested setting ap_scan to 2 and mode to 1 when linking to or creating an ad-hoc. Group and pairwise
  251. cipher type should also be explicit, always with group setting to TKIP or CCMP and pairwise setting
  252. to NONE. Lower version wpa_supplicant may not allow setting group to CCMP with pairwise setting to NONE.
  253. So if any problem, you may try to set both group and pairwise to CCMP, leaving other setting unchanged, when
  254. connecting to an CCMP-encrypted ad-hoc.
  255. 5. More config setting option, please refer to wpa_supplicant.conf in wpa_supplicant.tar.gz that we provide.
  256.  
  257. (6)Execute WPA supplicant (Assume rtl8192E and related modules had been
  258. loaded):
  259. ./runwpa
  260.  
  261. Note: The script runwpa will check Wireless Extension version automatically.
  262. If the version of Wireless Extension is equal or larger than 18, the
  263. option of "-D wext" is selected. If the version of Wireless extension
  264. is less than 18, the option of "-D ipw" is selected.
  265.  
  266. ===============================================================================
  267. For kernel 2.4 notes
  268. ===============================================================================
  269. First of all, we have to install the necessary tools for building the driver. In the RedHat9 installation, please
  270. choose the "Customize the set of packages to be install" and include two packages "Development Tools", "Kernel Development".
  271.  
  272. The RedHat 9 (kernel 2.4.20-8) just suppports the WEP security for Wifi. We have to patch the kernel with updating
  273. wireless extension so that the kernel just supports the WPA, WPA2 functionalities by stardard wireless extension. This
  274. driver had been verified on the patched 2.4.20-8 kernel and the WPA/WPA2 PSK works fine on the patched kernel.
  275.  
  276. First of all, we must have three patch file to update the wireless extension.
  277. 1. iw241_we16-6.diff (http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/iw241_we16-6.diff)
  278. 2. iw249_we17-13.diff (http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/iw249_we17-13.diff)
  279. 3. iw240_we18-5.diff (http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/iw240_we18-5.diff)
  280.  
  281. Copy these three patch files to the patient directory of the linux kernel source folder and use the following
  282. command to patch the RedHat 9 kernel.
  283. $> patch -p0 < ./iw241_we16-6.diff
  284. $> patch -p0 < ./iw249_we17-13.diff
  285. $> patch -p0 < ./iw240_we18-5.diff
  286.  
  287. After patching the kernel, please remember to re-build the updated kernel/modules and use it for your target platform.
  288. Now, the patched kernel had got the ability to support the WPA/WPA2 PSK functionalities with wireless extension interface.
  289.  
  290. Reminding: At the first time to use the wpa_supplicant, pleasee remember to compile the wpa_supplicant with the updated
  291. kernel so that the wpa_supplicant will get the latest wireless extension version for supporting more functionalities.
  292.  
  293. Finally, the kernel 2.4 can't support the WPS functionality.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement