[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

ACX100 Wireless



Alguem ja instalau a placa D-link 520 + seguinte o as instruções do site do Emota.
 
A Minha Placa  funcionou  mas estou com uma duvida o meu provedor me passou
somente o SSID e disse que nao precisa do restante mas a placa nao conecta
nada.
Entao se o meu provedor so me passou o SSID e o ÌP eo Gateway, e no windows
esta funcionado. No script start_net ficaria como ou tem outra forma de fazer isso
segue abaixo o script start_net  de inicialização da placa como exemplo:

#!/bin/bash

#########################################
# start_net script                      #
# acx100 project                        #
# acx100.sourceforge.net                #
# edited by arnie <urnotwelcome@gmx.de> #
#########################################

# Please edit here

DEV=wlan0
IP=192.168.0.10
NETMASK=255.255.255.0
GATEWAY=192.168.0.254
ESSID="any" # THIS IS CASE SeNsItIvE!! any == associate to any ESSID
# Default rate configured as 11Mbps to not cause connection problems with non-22Mbps hardware...
RATE=11M
CHAN=10
#TXPOWER=16 # 16 == 16.5dBm, 18 == 18dBm (default)
MODE=Managed
DEBUG=0xb
#KEY="B401CD21B44CCD21DEADBEEF11" # WEP128
ALG=open # open == Open System, restricted == Shared Key

# Usually no editing should be required below this line...
# -- unless you want this script to fetch stuff with dhcp

#########################################


if [[ $UID != 0 ]]; then echo "You are not root. To insert the module into your kernel, you need to be root. Enter su and try again. Bailing..."; exit 1; fi

SYNC=`which sync`
INSMOD=`which insmod`
IFCONF=`which ifconfig`
IWCONF=`which iwconfig`
ROUTE=`which route`
SCRIPT_AT=`dirname $0`

if [[ $SYNC == "" ]]; then echo "sync not found. Go get a sane Linux system. Bailing..."; exit 1; fi
if [[ $INSMOD == "" ]]; then echo "insmod not found. Go get a sane Linux system. Bailing..."; exit 1; fi
if [[ $IFCONF == "" ]]; then echo "ifconfig not found. I can insert the module for you, but you won't be able to configure your interface."; CONTINUE=ASK; fi
if [[ $IWCONF == "" ]]; then echo "iwconfig not found. Make sure it is installed. The interface might work without, though."; CONTINUE=ASK; fi

if [[ $CONTINUE == "ASK" ]]; then echo -n "Problems encountered. Do you want to continue? [n] "; read ANSWER
case $ANSWER in  ( y | Y | Yes | YES | yes | j | J | ja | Ja | JA ) ;;
                 ( * ) exit 1 ;;
esac
fi

MODULE_AT="${SCRIPT_AT}/../src/acx100_pci.o"

if ! [[ -r $MODULE_AT ]]; then echo "Module not found or not readable. Have you built it? This script expects it to be at ../src/acx100_pci.o, relative to the script's location. Bailing..."; exit 1; fi

# FIRMWARE_AT has to be given as an absolute path!!
FIRMWARE_AT="${SCRIPT_AT}/../firmware"

if ! [[ -r "$FIRMWARE_AT/WLANGEN.BIN" ]]; then echo "Firmware not found or not readable. Have you placed it in the firmware directory or run make extract_firmware once? This script expects it to be at ../firmware/WLANGEN.BIN, relative to the script's location. Bailing..."; exit 1; fi

if [[ $RATE != "11M" ]]; then echo "Transfer rate is not 11 Mbps, but $RATE. If something doesn't work, try 11 Mbps."; fi


# for better debugging
# set -x
#echo 8 > /proc/sys/kernel/printk


# just in case ;)
$SYNC
sleep 1

if [[ `lsmod |grep acx100_pci` ]]; then ${SCRIPT_AT}/stop_net; fi

$INSMOD $MODULE_AT debug=$DEBUG firmware_dir=$FIRMWARE_AT
if [[ $? == 0 ]]; then echo "Module successfully inserted."; else echo "Error while inserting module! Bailing..."; exit 1; fi

if [[ $IWCONF ]]; then

if [[ -n "$RATE" ]]; then
  echo Setting rate to $RATE.
  $IWCONF $DEV rate $RATE
  if [[ $? != 0 ]]; then echo Failed.; fi
fi
if [[ -n "$CHAN" ]]; then
  echo Setting channel $CHAN.
  $IWCONF $DEV channel $CHAN
  if [[ $? != 0 ]]; then echo Failed.; fi
fi
if [[ -n "$TXPOWER" ]]; then
  echo Setting Tx power level to $TXPOWER dBm.
  $IWCONF $DEV txpower $TXPOWER
  if [[ $? != 0 ]]; then echo Failed.; fi
  sleep 1
fi

echo Trying to join or setup ESSID $ESSID.
$IWCONF $DEV essid "$ESSID"
if [[ $? != 0 ]]; then echo Failed.; fi

if [[ -n "$MODE" ]]; then
  echo Setting mode to $MODE.
  $IWCONF $DEV mode $MODE
  if [[ $? != 0 ]]; then echo Failed.; fi
fi

if [[ -n "$KEY" ]]; then
  echo Setting key to $KEY, algorithm $ALG.
  $IWCONF $DEV key $ALG "$KEY"
  if [[ $? != 0 ]]; then echo Failed.; fi
fi

fi


# Hehe, this can be done after iwconfigs now :)
$IFCONF $DEV $IP netmask $NETMASK
if [[ $? != 0 ]]; then echo "Error in \"$IFCONF $DEV $IP netmask $NETMASK\". Bailing..."; exit 1; else echo "Interface has been set up successfully."; fi

# Finally, let's do some tweaking to make sure we don't have any
# buffer management problems (yeah, it's an ugly workaround!)
$IFCONF $DEV mtu 576
if [[ $? != 0 ]]; then echo "Error in \"$IFCONF $DEV mtu 576\". Bailing..."; exit 1; fi

if [[ -n "$GATEWAY" ]]; then
  $ROUTE add default gw $GATEWAY
fi

# # fetch an IP address from DHCP
# rm -f /etc/dhcpc/dhcpcd-wlan0.pid > /dev/null
# dhcpcd -d wlan0 -t 5

# just in case ;)
$SYNC


Reply to: