# Prosedur Instalasi Wireless LAN - ISA to PCMCIA # Teras Net # Versi 0.2 - 5 Oktober 2000 # Hanya berlaku untuk SISTEM OPERASI LINUX # TELITI DALAM BEKERJA sangat diutamakan # Perhatikan bagian BEBERAPA CATATAN diakhir prosedur ini Sistem yang sudah di coba ========================= Linux Kernel 2.2.13-7mdk, 2.2.14-5.0, 2.2.16 PCMCIA Kernel Source pcmcia-cs-3.1.8, pcmcia-cs-3.1.12, pcmcia-cs-3.1.16 Sistem yang digunakan ===================== Driver Source linux-wlan-0.3.4.tar.gz PCMCIA Kernel Source pcmcia-cs-3.1.16.tar.gz Prosedur Installasi =================== ** LOGIN SEBAGAI ROOT A) COPY SOURCE KE /usr/src mount /dev/fd0 /mnt cd /mnt cp linux-wlan-0.3.4.tar.gz /usr/src cp pcmcia-cs-3.1.16.tar.gz /usr/src B) EXTRACT SOURCE cd /usr/src tar zxvf linux-wlan-0.3.4.tar.gz tar zxvf pcmcia-cs-3.1.16.tar.gz C) BUAT SYSMBOLIC LINK # hanya untuk mempermudah ln -s linux-wlan-0.3.4 wlan ln -s pcmcia-cs-3.1.16 pcmcia-cs D) COMPILE pcmcia-cs-3.1.16 # bila dibutuhkan cd pcmcia-cs make clean make config # sesuaikan dengan system yang digunakan make all make install E) COMPILE linux-wlan-0.3.4 E.1) EDIT config.mk cd /usr/src/pcmcia-cs ** contoh file config.mk ----------------------------------------------------------------------- LINUX_SRC=/usr/src/linux # source kernel PCMCIA_SRC=/usr/src/pcmcia-cs # source pcmcia-cs MODULES_DIR=/lib/modules/2.2.14-5.0 # direktori module INST_EXEDIR=/sbin # direktori program dan utility DESTDIR= # MAKE_ISA=n # support isa [y|n] MAKE_CS=y # support pcmcia-cs [y|n] ----------------------------------------------------------------------- E.2) COMPILE make clean make all ** bila tidak ada kesalahan (hanya sedikit warning) teruskan... make install F) COPY-KAN FILE BERIKUT ** file berada dalam direktori /usr/src/wlan/scripts cp wlan wlan.opts wlan.config /etc/pcmcia cp rc.wlan /etc/rc.d G) EDIT FILE BERIKUT cd /etc/pcmcia chmod 755 wlan wlan.opts G.1) TAMBAHKAN BARIS BERIKUT PADA FILE "config" source ./wlan.config G.2) TAMBAHKAN BARIS BERIKUT PADA FILE "config.opts" module "am930_cs" opts "am930_use_mmio=1 am930_iodelay=0" G.3) EDIT "wlan.opts" ** contoh file wlan.opts ----------------------------------------------------------------------- # Wireless LAN adapter configuration # # wlan.opts 1.1 by Mark S. Mathews # # The address format is "scheme,socket,instance,hwaddr". # # case "$ADDRESS" in *,*,*,*) # Scan for which SSID? SCAN_SSID="" DESIRED_SSID="lintas-XX" # XX = 03|05|06|07 - (SSID POP terdekat) # Scan for which BSS and type? SCAN_BSSID="ff:ff:ff:ff:ff:ff" SCAN_BSSTYPE=infr # both|ind|infr SCAN_TYPE=active # active|passive # Define scan range SCAN_STARTCH=1 SCAN_ENDCH=13 SCAN_TIMEPERCHANNEL=100 # Create a BSS if one not detected? CREATEBSS=no CREATE_SSID=local-net # Pick your own SSID and channel!!! CREATE_CHANNEL=11 CREATE_BCN_INT=100 # Are we only sniffing? (don't auth and assoc) SNIFONLY=n # Frame conversion type P80211_CONVERSION=rfc1042 # encapsulation|rfc1042|802.1h # Wep stuff (currently unsupported, Don't turn it on!) PRIVACY=no WEP_EXCLUDE=noexclude_unencrypted WEP_DEFKEY=0 WEP_KEY1="f1:10:ec:e0:dc" WEP_KEY2="0f:f2:04:09:fb" WEP_KEY3="13:37:f2:f9:2d" WEP_KEY4="e9:17:19:63:c7" ;; esac ----------------------------------------------------------------------- H) EDIT FILE rc.wlan ** file terdapat pada /etc/rc.d cd /etc/rc.d ** check IRQ dan IO yang tidak digunakan cat /proc/interrupts cat /proc/ioports ** contoh file rc.wlan ** beri tanda "#" pada awal baris yang diberi tanda "# BERI TANDA "#" DISINI" ----------------------------------------------------------------------- #! /bin/sh # Wireless network setup for ISA cards # (this file can safely be re-executed for restarts) ....... # (see /etc/sysconfig/network-scripts). is_true () { [ "$1" = "y" -o "$1" = "Y" -o "$1" = "yes" -o "$1" = "YES" ] } ######################################################################## # kernel version, probably you should not tamper with this # with the possible exception of simply using M=am930_isa V=`uname -r` M=/lib/modules/$V/net/am930_cs.o ^^^^^ # Ganti "net" dengan "pcmcia" ######################################################################## # MAC Setup Variables # Scan for which SSID? SCAN_SSID="" DESIRED_SSID="lintas-XX" # XX = 03|05|06|07 - (SSID POP terdekat) # Scan for which BSS and type? SCAN=yes # yes|no SCAN_BSSID="ff:ff:ff:ff:ff:ff" SCAN_BSSTYPE=infr # both|ind|infr SCAN_TYPE=active # active|passive # Define scan range SCAN_STARTCH=1 SCAN_ENDCH=13 SCAN_TIMEPERCHANNEL=100 # Create a BSS if one not detected? CREATEBSS=no CREATE_SSID=local-net # Pick your own SSID and channel!!! CREATE_CHANNEL=11 CREATE_BCN_INT=100 # Are we only sniffing? (don't auth and assoc) SNIFONLY=n # Frame conversion type P80211_CONVERSION=rfc1042 # encapsulation|rfc1042|802.1h # Wep stuff (currently unsupported, Don't turn it on!) PRIVACY=no WEP_EXCLUDE=noexclude_unencrypted WEP_DEFKEY=0 WEP_KEY1="f1:10:ec:e0:dc" WEP_KEY2="0f:f2:04:09:fb" WEP_KEY3="13:37:f2:f9:2d" WEP_KEY4="e9:17:19:63:c7" ######################################################################## # WLAN PnP setup (needs to be consistent w/ your /etc/isapnp.conf) IRQ=3 # ISI IRQ YANG TIDAK DIGUNAKAN DISINI default 3,9,10,12 IOBASE=0x3e0 # ISI IO SESUAI DENGAN /etc/isapnp.conf DISINI ######################################################################## # Network stack setup, comment out IP= if you don't want to do # this here but through your linux distribution's setup scripts DEVICE=eth1 IP=192.168.1.30 # ISI IP DISINI NM=255.255.255.0 # ISI NETMASK DISINI # next two can be derived from the above two, be careful how you do that BC=192.168.1.255 # ISI BROADCAST DISINI NW=192.168.1.0 # ISI NETWORK DISINI ######################################################################## # Insert the AM930 module: # remember, for ISA don't use rmmod, it may hang your kernel. # this is a bug in the driver that needs to be cleared # however, we can safely down the interface, wlanctl and up it again # # only insert the module if it had not been inserted before # never rmmod this module, it is buggy to remove and safe to leave in cnt=`lsmod | grep -c ^am930` if [ "$cnt" != "0" ]; then echo Module $M had already been loaded, no need to rmmod/insmod else insmod $M am930_irq=$IRQ am930_iobase=$IOBASE fi if is_true "$SCAN"; then # Scan for existing networks echo "wlan scanning channels $STARTCH to $ENDCH" netlist=`wlanctl $DEVICE scan \ $SCAN_STARTCH $SCAN_ENDCH $SCAN_TIMEPERCHANNEL \ $SCAN_BSSID $SCAN_BSSTYPE $SCAN_TYPE "$SCAN_SSID"` echo "Detected BSSs:" echo "ch bssid bcn cap_info ssid" echo "------------------------------------------------------" echo "$netlist" fi # Set your wep keys, if present # MSM: setting them works, but there's no cypher so strange things # might happen. See README.wep. if is_true $PRIVACY ; then wlanctl $DEVICE privacy \ $EXCLUDE \ $WEP_DEFKEY \ $WEP_KEY1 \ $WEP_KEY2 \ $WEP_KEY3 \ $WEP_KEY4 fi # Set the ethernet conversion wlanctl $DEVICE ethconv $P80211_CONVERSION # If our $SCAN_SSID matches one found in the scan, join it. # else, check to see if we're allowed to create one. if (echo "$netlist" | grep -q "$DESIRED_SSID") ; then join_bssinfo=`(echo "$netlist" | grep "$DESIRED_SSID")` join_ssid=$DESIRED_SSID join_bssid=`(echo "$join_bssinfo" | cut -c5-21)` join_channel=`(echo "$join_bssinfo" | cut -c1-2)` join_capinfo=`(echo "$join_bssinfo" | cut -c30-35)` wlanctl $DEVICE bssjoin $join_bssid echo "wlan joined BSS, channel=$join_channel"\ "bssid=$join_bssid ssid=\"$DESIRED_SSID\"" # Now see if we need to auth and assoc w/ an infra bss if is_true $SNIFONLY; then echo "wlan skipping auth and assoc for sniffer" else ISIBSS=$[$join_capinfo & 0x02] if [ $ISIBSS -eq 0 ]; then wlanctl $DEVICE authen wlanctl $DEVICE assoc fi fi else # If we're allowed, create a bss if is_true $CREATEBSS ; then wlanctl $DEVICE bsscreate \ $CREATE_CHANNEL $CREATE_BCN_INT 0 \ "$CREATE_SSID" echo "wlan created BSS with" \ "channel=$CREATE_CHANNEL and" \ "ssid=$CREATE_SSID" $DESIRED_SSID=$CREATE_SSID else echo "wlan failed to find ssid=$DESIRED_SSID" exit 1 fi fi ######################################################################## if [ "$IP" = "" ]; then echo $DEVICE not activated, relying on your own methods to do this exit 0 fi # start up the network (you can leave this out if your Linux # implementation does that work for you) # e.g. redhat would use "ifup $DEVICE" ifconfig $DEVICE $IP broadcast $BC netmask $NM # on kernel 2.2 don't need to route, ifconfig does it for you # if you do this, it will show two routes, it doesn't seem to hurt route add -net $NW netmask $NM $DEVICE # BERI TANDA "#" DISINI # Add static routes.Make sure you add the reverse routes on the other end # route my regular ELAN #route add -net 192.168.1.0 gw wxavier # the official redhat way # 1) add entry to /etc/conf.modules # 2) add a wlantcl initialization routine to /etc/rc.d/init.d # and set the appropriate startup inbetween #1 and #3 # 3) add eth1 interface to network via 'netcfg' ----------------------------------------------------------------------- I) BUAT FILE /etc/isapnp.conf pnpdump > /etc/isapnp.conf cat /etc/isapnp.conf J) EDIT FILE /etc/isapnp.conf cd /etc ** contoh file isapnp.conf ** hapus tanda "#" pada awal baris yang ditandai ** # HAPUS TANDA "#" ** ----------------------------------------------------------------------- # $Id: pnpdump.c,v 1.18 1999/02/14 22:47:18 fox Exp $ # This is free software, see the sources for details. # This software has NO WARRANTY, use at your OWN RISK .......... # Card 1: (serial identifier 21 05 00 00 00 18 30 21 59) # Vendor Id VIA3018, Serial Number 83886080, checksum 0x21. # Version 1.0, Vendor version 0.0 # ANSI string -->VIA PCMCIA CARD<-- # # Logical device id PNP0e00 # Device support I/O range check register # # Edit the entries below to uncomment out the configuration required. # Note that only the first value of any range is given, this may be changed if required # Don't forget to uncomment the activate (ACT Y) when happy (CONFIGURE VIA3018/83886080 (LD 0 # Compatible device id PNP0e00 # Logical device decodes 16 bit IO address lines # Minimum IO base address 0x03e0 # Maximum IO base address 0x03e3 # IO base alignment 2 bytes # Number of IO addresses required: 2 # (IO 0 (SIZE 2) (BASE 0x03e0) (CHECK)) # HAPUS TANDA "#" (NAME "VIA3018/83886080[0]{VIA PCMCIA CARD }") # (ACT Y) # HAPUS TANDA "#" )) # End tag... Checksum 0x00 (OK) # Returns all cards to the "Wait for Key" state (WAITFORKEY) ----------------------------------------------------------------------- K) EDIT FILE pcmcia # Perhatikan Bagian BEBERAPA CATATAN ** file berada pada direktori /etc/sysconfig cd /etc/sysconfig ** contoh file pcmcia ----------------------------------------------------------------------- PCMCIA=yes PCIC=i82365 PCIC_OPTS= CORE_OPTS= ----------------------------------------------------------------------- L) BUAT FILE ifcfg-eth1 # Perhatikan Bagian BEBERAPA CATATAN ** file berada dalam direktori /etc/sysconfig/network-scripts cd /etc/sysconfig/network-scripts cp ifcfg-eth0 ifcfg-eth1 M) EDIT FILE ifcfg-eth1 # Perhatikan Bagian BEBERAPA CATATAN ** contoh file ifcfg-eth1 ----------------------------------------------------------------------- DEVICE="eth1" IPADDR="192.168.1.30" # ISI IP DISINI NETMASK="255.255.255.0" # ISI NETMASK DISINI ONBOOT="no" BOOTPROTO="none" IPXNETNUM_802_2="" IPXPRIMARY_802_2="no" IPXACTIVE_802_2="no" IPXNETNUM_802_3="" IPXPRIMARY_802_3="no" IPXACTIVE_802_3="no" IPXNETNUM_ETHERII="" IPXPRIMARY_ETHERII="no" IPXACTIVE_ETHERII="no" IPXNETNUM_SNAP="" IPXPRIMARY_SNAP="no" IPXACTIVE_SNAP="no" ----------------------------------------------------------------------- N) EDIT FILE conf.modules # Perhatikan Bagian BEBERAPA CATATAN ** file berada pada direktori /etc cd /etc N.1) TAMBAHKAN 2 BARIS BERIKUT PADA FILE /etc/conf.modules alias eth1 am930_cs options am930_cs irq=3 io=100 # ISI IRQ DAN IO DISINI O) SEKARANG.... KAMU TINGGAL AKTIFKAN ITU ALAT... ;) O.1) AKTIFKAN ISAPNP CARD isapnp /etc/isapnp.conf O.2) AKTIFKAN PCMCIA CARD /etc/rc.d/init.d/pcmcia restart O.3) AKTIFKAN rc.wlan [ENTER] /etc/rc.d/rc.wlan P) BILA ACCESS POINT SUDAH BISA DI "ping"........ SELAMAT...!!! BERARTI KAMU SUDAH MENJALANKAN PROSEDUR INSTALASI DENGAN BENAR... KINI BERTERIAKLAH "YUUHUU..." Q) SEKARANG EDIT SEDIKIT AJA FILE /etc/rc.d/rc.local ** tambahin baris berikut ini... /etc/rc.d/rc.wlan ############################################################################### BEBERAPA CATATAN: ================= ** POINT 1), 2), DAN 3) HANYA UNTUK DISTRO SLACKWARE LINUX ** 1) KAMU TIDAK PERLU MEMBUAT DAN MENGEDIT FILE BERIKUT... /etc/sysconfig/network-scripts/ifcfg-eth1 /etc/conf.modules /etc/sysconfig/pcmcia 2) FILE /etc/rc.d/init.d/pcmcia BERADA PADA DIREKTORI /etc/rc.d ** contoh file /etc/rc.d/rc.pcmcia ----------------------------------------------------------------------- #!/bin/sh # # rc.pcmcia 1.23 1998/07/18 18:49:26 (David Hinds) # # This is designed to work in BSD as well as SysV init setups. See # the HOWTO for customization instructions. usage() { echo "Usage: $0 {start|stop|restart}" } cleanup() { while read SN CLASS MOD INST DEV EXTRA ; do if [ "$SN" != "Socket" ] ; then /etc/pcmcia/$CLASS stop $DEV 2> /dev/null fi done } # Allow environment variables to override all options if [ "$PCMCIA" ] ; then readonly PCMCIA ; fi if [ "$PCIC" ] ; then readonly PCIC ; fi if [ "$PCIC_OPTS" ] ; then readonly PCIC_OPTS ; fi if [ "$CORE_OPTS" ] ; then readonly CORE_OPTS ; fi if [ "$CARDMGR_OPTS" ] ; then readonly CARDMGR_OPTS ; fi if [ "$SCHEME" ] ; then readonly SCHEME ; fi # Source PCMCIA configuration, if available if [ -f /etc/pcmcia.conf ] ; then . /etc/pcmcia.conf elif [ -f /etc/sysconfig/pcmcia ] ; then . /etc/sysconfig/pcmcia if [ "$PCMCIA" != "yes" ] ; then exit 0 ; fi else # Should be either i82365 or tcic. The "probe" option is a Slackware # addition which tries loading both modules; usually one or the other # will load if a PCMCIA subsystem is present. Of course, the correct # thing to do is to pick i82365 or tcic manually. PCIC=probe # i82365|tcic|probe # Put socket driver timing parameters here. # "poll_interval=100" will save an IRQ. PCIC_OPTS="poll_interval=100" #PCIC_OPTS="irq=9 io=0x100" # Put pcmcia_core options here CORE_OPTS= # Put cardmgr options here CARDMGR_OPTS= # To set the PCMCIA scheme at startup... SCHEME= fi EXITCODE=1 for x in "1" ; do if [ "$PCIC" = "" ] ; then echo "PCIC not defined in rc.pcmcia!" break fi if [ $# -lt 1 ] ; then usage ; break ; fi action=$1 case "$action" in 'start') echo -n "Starting PCMCIA services:" SC=/var/run/pcmcia-scheme if [ -L $SC -o ! -O $SC ] ; then rm -f $SC ; fi if [ ! -f $SC ] ; then umask 022 ; echo > $SC ; fi if [ "$SCHEME" ] ; then umask 022 ; echo $SCHEME > $SC ; fi fgrep -q pcmcia /proc/devices if [ $? -ne 0 ] ; then PC=/lib/modules/`uname -r`/pcmcia if [ -d $PC ] ; then # echo -n " modules" /sbin/insmod $PC/pcmcia_core.o $CORE_OPTS if [ "$PCIC" = "probe" ]; then # attempt to load both echo " " /sbin/insmod $PC/i82365.o $PCIC_OPTS 2> /dev/null if [ ! $? = 0 ]; then # try tcic /sbin/insmod $PC/tcic.o $PCIC_OPTS 2> /dev/null fi else # PCIC has been selected manually /sbin/insmod $PC/$PCIC.o $PCIC_OPTS fi /sbin/insmod $PC/ds.o else echo " module directory $PC not found." break fi fi if [ -s /var/run/cardmgr.pid ] && \ kill -0 `cat /var/run/cardmgr.pid` 2>/dev/null ; then echo " cardmgr is already running." else if [ -r /var/run/stab ] ; then cat /var/run/stab | cleanup fi # echo " cardmgr." /sbin/cardmgr $CARDMGR_OPTS fi if [ -d /var/lock/subsys ] ; then touch /var/lock/subsys/pcmcia fi ;; 'stop') echo -n "Shutting down PCMCIA services:" PID=`cat /var/run/cardmgr.pid` kill $PID echo -n " cardmgr" # Give cardmgr a few seconds to handle the signal kill -0 $PID 2>/dev/null && sleep 2 && \ kill -0 $PID 2>/dev/null && sleep 2 && \ kill -0 $PID 2>/dev/null && sleep 2 && \ kill -0 $PID 2>/dev/null if fgrep -q "ds " /proc/modules ; then echo -n " modules" /sbin/rmmod ds if [ "$PCIC" = "probe" ]; then /sbin/rmmod i82365 /sbin/rmmod tcic else /sbin/rmmod $PCIC fi /sbin/rmmod pcmcia_core fi echo "." rm -f /var/lock/subsys/pcmcia EXITCODE=0 ;; 'restart') $0 stop $0 start EXITCODE=0 ;; *) usage ;; esac done # Only exit if we're in our own subshell if [ "${0##*/}" = "rc.pcmcia" ] ; then exit $EXITCODE fi ----------------------------------------------------------------------- 3) YANG PERLU DIRESTART ADALAH /etc/rc.d/rc.pcmcia UNTUK MENGAKTIFKAN PCMCIA CARD.... **BUKAN** FILE /etc/rc.d/init.d/pcmcia /etc/rc.d/rc.pcmcia restart 4) BILA WLAN CARD TIDAK BERFUNGSI UNTUK BEBERAPA WAKTU.... **MAKA** YANG PERLU DILAKUKAN ADALAH /etc/rc.d/rc.wlan ** bila wlan card masih tetap tidak berfungsi lakukan hal berikut /etc/rc.d/init.d/pcmcia restart /etc/rc.d/rc.wlan ** untuk DISTRO SLACKWARE LINUX cukup dengan /etc/rc.wlan 5) FILE /etc/sysconfig/pcmcia PADA DISTRO REDHAT dan SEBANGSANYA... Terkadang harus dibuat seperti ini ----------------------------------------------------------------------- PCMCIA=yes PCIC=i82365 PCIC_OPTS="do_scan=0" CORE_OPTS="probe_io=0" CARDMGR_OPTS= ----------------------------------------------------------------------- 6) POINT L) , M) , N) , N.1) Bagian ini terkadang tidak perlu dilakukan untuk distro REDHAT dan SEBANGSANYA ;) 7) /me - F i P ------------------ firman-p@lintas.co.id =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= UCAPAN TERIMAKASIH... ===================== Beribu terimakasih ingin kutujukan pada mereka-mereka yang telah banyak memberi dorongan dan bantuan pada saya untuk menuliskan dokumentasi ini. Diantara mereka adalah... 1. Hikmat Rizal 2. Ifan Affandi 3. Irfan M Fanani 4. Robert Satria Feri 5. M Dudi Fahrizal 6. Yulian Firdaus Hendrayana 7. M Prasodjo 8. Pratama Jaka S 9. Siyam S Junianto 11. H Obe R S 12. All Linuxer wherever you are! --- akhir dari dokumen ini ---