Автор Тема: Wireless usb adapter edimax  (Прочетена 4795 пъти)

sonyj7

  • Напреднали
  • *****
  • Публикации: 69
    • Профил
Wireless usb adapter edimax
« -: Sep 02, 2008, 08:46 »
Здравейте.
Slackware 12.0, kernel 2.6.25-smp
Купих си wireless usb adapter  "Edimax EW-7318USg" -
product page
за да мога да си пусна интернет на телефона nokia N82.
Адаптера е с чипсет rt73, което ще рече че чипсета е на ralink. С инсталирането на драйвера нямах никакъв проблем - driver. Всичко премина успешно - създате wlan0. Като се поразтърсих из нета разбрах , че трябва да го пусна в master mode за да направя Access Point. Само че не става. С командата 'iwconfig wlan0 mode master' ми дава че устройството не подържа master mode. Пробвах и  с оригиналните дривери, но и там беше същото положение.
В накой форуми бяха вкарали в този mode с hostapd. Но на моя комп hostapd не може да ми дигне wlan0. Иначе успях да го вкарам в Ad-Hoc mode, но това май не ми върши работа. Пиша тук защото май ми се изчерпиха възможностите, а пък рутер за един телефон не ми се купува.
Лек Ден '<img'>
Активен

teleport

  • Напреднали
  • *****
  • Публикации: 134
    • Профил
Wireless usb adapter edimax
« Отговор #1 -: Sep 02, 2008, 13:14 »
hostapd е за Atheros prism2 базирани карти. Само те могат да работят в Master mode. Intel, ralink, broadcom и т.н. не поддържат master mode в самия firmware на картата.

Но повечето телефони нямат проблем да работят с ad-hoc.
Активен

sonyj7

  • Напреднали
  • *****
  • Публикации: 69
    • Профил
Wireless usb adapter edimax
« Отговор #2 -: Sep 02, 2008, 14:36 »
Да така е. С телефона се връзвам към адаптера, но нет няма въпреки че съм настройл ip на телефона - 192.168.0.2 с маска 255.255.255.0 и dns съм сложил. На адаптера са 192.168.0.1 0 и маска 255.255.255.0. Направил съм и маскирането. Но въпроса е че навсякъде казват, че за да има нет трябва да е в мастер mode. Не знам дали в Ad-Hoc mode може да се пусне net на телефона. Ако може кажи ?
Активен

teleport

  • Напреднали
  • *****
  • Публикации: 134
    • Профил
Wireless usb adapter edimax
« Отговор #3 -: Sep 02, 2008, 15:07 »
Нета няма нищо общо с ad-hoc-a. Пусни си ip_forwarding на слак-а и направи NAT. Примерно:

eth0 - външния интерфейс

echo "1" > /proc/sys/net/ipv4/ip_forward

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

В случaй че пак не стане дай малко повече подробности. Примерно резулата от "ifconfig -a" и "tcpdump -i wlan0 -nnn -vvv" при опит да заредиш нещо от телефона.

PS: А default GW към 192.168.0.1 сложил ли си на телефона?



Активен

sonyj7

  • Напреднали
  • *****
  • Публикации: 69
    • Профил
Wireless usb adapter edimax
« Отговор #4 -: Sep 02, 2008, 19:54 »
1. ip_forwarding е пуснат.

2. Нат ми е това:
#!/bin/sh
#
# rc.firewall-iptables
FWVER=0.76
#
#               Initial SIMPLE IP Masquerade test for 2.6 / 2.4 kernels
#               using IPTABLES.  
#
#               Once IP Masquerading has been tested, with this simple
#               ruleset, it is highly recommended to use a stronger
#               IPTABLES ruleset either given later in this HOWTO or
#               from another reputable resource.
#
#
#
# Log:
#       0.76 - Added comments on why the default policy is ACCEPT
#       0.75 - Added more kernel modules to the comments section
#       0.74 - the ruleset now uses modprobe vs. insmod
#       0.73 - REJECT is not a legal policy yet; back to DROP
#       0.72 - Changed the default block behavior to REJECT not DROP
#       0.71 - Added clarification that PPPoE users need to use
#              "ppp0" instead of "eth0" for their external interface
#       0.70 - Added commented option for IRC nat module
#            - Added additional use of environment variables
#            - Added additional formatting
#       0.63 - Added support for the IRC IPTABLES module
#       0.62 - Fixed a typo on the MASQ enable line that used eth0
#              instead of $EXTIF
#       0.61 - Changed the firewall to use variables for the internal
#              and external interfaces.
#       0.60 - 0.50 had a mistake where the ruleset had a rule to DROP
#              all forwarded packets but it didn't have a rule to ACCEPT
#              any packets to be forwarded either
#            - Load the ip_nat_ftp and ip_conntrack_ftp modules by default
#       0.50 - Initial draft
#

echo -e "\n\nLoading simple rc.firewall-iptables version $FWVER..\n"


# The location of the iptables and kernel module programs
#
#   If your Linux distribution came with a copy of iptables,
#   most likely all the programs will be located in /sbin.  If
#   you manually compiled iptables, the default location will
#   be in /usr/local/sbin
#
# ** Please use the "whereis iptables" command to figure out
# ** where your copy is and change the path below to reflect
# ** your setup
#
#IPTABLES=/sbin/iptables
IPTABLES=iptables
DEPMOD=/sbin/depmod
MODPROBE=/sbin/modprobe


#Setting the EXTERNAL and INTERNAL interfaces for the network
#
#  Each IP Masquerade network needs to have at least one
#  external and one internal network.  The external network
#  is where the natting will occur and the internal network
#  should preferably be addressed with a RFC1918 private address
#  scheme.
#
#  For this example, "eth0" is external and "eth1" is internal"
#
#
#  NOTE:  If this doesnt EXACTLY fit your configuration, you must
#         change the EXTIF or INTIF variables above. For example:
#
#            If you are a PPPoE or analog modem user:
#
#               EXTIF="ppp0"
#
#
EXTIF="eth0"
INTIF="wlan0"
echo "   External Interface:  $EXTIF"
echo "   Internal Interface:  $INTIF"


#======================================================================
#== No editing beyond this line is required for initial MASQ testing ==


echo -en "   loading modules: "

# Need to verify that all modules have all required dependencies
#
echo "  - Verifying that all kernel modules are ok"
$DEPMOD -a

# With the new IPTABLES code, the core MASQ functionality is now either
# modular or compiled into the kernel.  This HOWTO shows ALL IPTABLES
# options as MODULES.  If your kernel is compiled correctly, there is
# NO need to load the kernel modules manually.  
#
#  NOTE: The following items are listed ONLY for informational reasons.
#        There is no reason to manual load these modules unless your
#        kernel is either mis-configured or you intentionally disabled
#        the kernel module autoloader.
#

# Upon the commands of starting up IP Masq on the server, the
# following kernel modules will be automatically loaded:
#
# NOTE:  Only load the IP MASQ modules you need.  All current IP MASQ
#        modules are shown below but are commented out from loading.
# ===============================================================

echo "----------------------------------------------------------------------"

#Load the main body of the IPTABLES module - "iptable"
#  - Loaded automatically when the "iptables" command is invoked
#
#  - Loaded manually to clean up kernel auto-loading timing issues
#
echo -en "ip_tables, "
$MODPROBE ip_tables


#Load the IPTABLES filtering module - "iptable_filter"
#  - Loaded automatically when filter policies are activated


#Load the stateful connection tracking framework - "ip_conntrack"
#
# The conntrack  module in itself does nothing without other specific
# conntrack modules being loaded afterwards such as the "ip_conntrack_ftp"
# module
#
#  - This module is loaded automatically when MASQ functionality is
#    enabled
#
#  - Loaded manually to clean up kernel auto-loading timing issues
#
echo -en "ip_conntrack, "
$MODPROBE ip_conntrack


#Load the FTP tracking mechanism for full FTP tracking
#
# Enabled by default -- insert a "#" on the next line to deactivate
#
echo -en "ip_conntrack_ftp, "
$MODPROBE ip_conntrack_ftp


#Load the IRC tracking mechanism for full IRC tracking
#
# Enabled by default -- insert a "#" on the next line to deactivate
#
echo -en "ip_conntrack_irc, "
$MODPROBE ip_conntrack_irc


#Load the general IPTABLES NAT code - "iptable_nat"
#  - Loaded automatically when MASQ functionality is turned on
#
#  - Loaded manually to clean up kernel auto-loading timing issues
#
echo -en "iptable_nat, "
$MODPROBE iptable_nat


#Loads the FTP NAT functionality into the core IPTABLES code
# Required to support non-PASV FTP.
#
# Enabled by default -- insert a "#" on the next line to deactivate
#
echo -en "ip_nat_ftp, "
$MODPROBE ip_nat_ftp


#Loads the IRC NAT functionality into the core IPTABLES code
# Required to support NAT of IRC DCC requests
#
# Disabled by default -- remove the "#" on the next line to activate
#
#echo -e "ip_nat_irc"
#$MODPROBE ip_nat_irc

echo "----------------------------------------------------------------------"

# Just to be complete, here is a partial list of some of the other  
# IPTABLES kernel modules and their function.  Please note that most
# of these modules (the ipt ones) are automatically loaded by the
# master kernel module for proper operation and don't need to be
# manually loaded.
# --------------------------------------------------------------------
#
#    ip_nat_snmp_basic - this module allows for proper NATing of some
#                        SNMP traffic
#
#    iptable_mangle    - this target allows for packets to be
#                        manipulated for things like the TCPMSS
#                        option, etc.
#
# --
#
#    ipt_mark       - this target marks a given packet for future action.
#                     This automatically loads the ipt_MARK module
#
#    ipt_tcpmss     - this target allows to manipulate the TCP MSS
#                     option for braindead remote firewalls.
#                     This automatically loads the ipt_TCPMSS module
#
#    ipt_limit      - this target allows for packets to be limited to
#                     to many hits per sec/min/hr
#
#    ipt_multiport  - this match allows for targets within a range
#                     of port numbers vs. listing each port individually
#
#    ipt_state      - this match allows to catch packets with various
#                     IP and TCP flags set/unset
#
#    ipt_unclean    - this match allows to catch packets that have invalid
#                     IP/TCP flags set
#
#    iptable_filter - this module allows for packets to be DROPped,
#                     REJECTed, or LOGged.  This module automatically
#                     loads the following modules:
#
#                     ipt_LOG - this target allows for packets to be
#                               logged
#
#                     ipt_REJECT - this target DROPs the packet and returns
#                                  a configurable ICMP packet back to the
#                                  sender.
#

echo -e "   Done loading modules.\n"



#CRITICAL:  Enable IP forwarding since it is disabled by default since
#
#           Redhat Users:  you may try changing the options in
#                          /etc/sysconfig/network from:
#
#                       FORWARD_IPV4=false
#                             to
#                       FORWARD_IPV4=true
#
echo "   Enabling forwarding.."
echo "1" > /proc/sys/net/ipv4/ip_forward


# Dynamic IP users:
#
#   If you get your IP address dynamically from SLIP, PPP, or DHCP,
#   enable this following option.  This enables dynamic-address hacking
#   which makes the life with Diald and similar programs much easier.
#
#echo "   Enabling DynamicAddr.."
#echo "1" > /proc/sys/net/ipv4/ip_dynaddr


# Enable simple IP forwarding and Masquerading
#
#  NOTE:  In IPTABLES speak, IP Masquerading is a form of SourceNAT or SNAT.
#
#  NOTE #2:  The following is an example for an internal LAN address in the
#            192.168.0.x network with a 255.255.255.0 or a "24" bit subnet mask
#            connecting to the Internet on external interface "eth0".  This
#            example will MASQ internal traffic out to the Internet but not
#            allow non-initiated traffic into your internal network.
#
#            
#         ** Please change the above network numbers, subnet mask, and your
#         *** Internet connection interface name to match your setup
#        


#Clearing any previous configuration
#
#  Unless specified, the defaults for INPUT and OUTPUT is ACCEPT
#    The default for FORWARD is DROP (REJECT is not a valid policy)
#
#   Isn't ACCEPT insecure?  To some degree, YES, but this is our testing
#   phase.  Once we know that IPMASQ is working well, I recommend you run
#   the rc.firewall-*-stronger rulesets which set the defaults to DROP but
#   also include the critical additional rulesets to still let you connect to
#   the IPMASQ server, etc.
#
echo "   Clearing any existing rules and setting default policy.."
$IPTABLES -P INPUT ACCEPT
$IPTABLES -F INPUT
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -F OUTPUT
$IPTABLES -P FORWARD DROP
$IPTABLES -F FORWARD
$IPTABLES -t nat -F

echo "   FWD: Allow all connections OUT and only existing and related ones IN"
$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT
$IPTABLES -A FORWARD -j LOG

echo "   Enabling SNAT (MASQUERADE) functionality on $EXTIF"
$IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE

echo -e "\nrc.firewall-iptables v$FWVER done.\n"

3. ifconfig -a:
eth0      Link encap:Ethernet  HWaddr 00:19:E0:13'<img'>0:F7
          inet addr:192.168.1.2  Bcast:192.168.1.3  Mask:255.255.255.252
          inet6 addr: fe80::219:e0ff:fe13'<img'>0f7/64 Scope:Link
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:714 errors:0 dropped:0 overruns:0 frame:0
          TX packets:689 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:584554 (570.8 KiB)  TX bytes:110760 (108.1 KiB)
          Interrupt:22 Base address:0xe800

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:174 (174.0 'B)'  TX bytes:174 (174.0 'B)'

wlan0     Link encap:Ethernet  HWaddr 00:1F:1F:12:93:80
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::21f:1fff:fe12:9380/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:334 errors:0 dropped:1 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:228 (228.0 'B)'  TX bytes:26110 (25.4 KiB)
4.iwconfig:
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     RT73 WLAN  ESSID:"N82"  Nickname:"darkstar"
          Mode:Ad-Hoc  Frequency=2.412 GHz  Cell: 62:B3:11:3B:F2:F7
          Bit Rate=11 Mb/s
          RTS thr:off   Fragment thr:off
          Encryption key:0123-4500-00
          Link Quality=0/100  Signal level:-121 dBm  Noise level:-115 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
5. tcpdump -i wlan0 -nnn -vvv - не показва никаква активност при опит да заредя страница
6. А default GW към 192.168.0.1 съм го сложил на телефона.

Про опит да заредя стараница ми дава: Интернет: Няма отговор от шлюза.
Активен

sonyj7

  • Напреднали
  • *****
  • Публикации: 69
    • Профил
Wireless usb adapter edimax
« Отговор #5 -: Sep 04, 2008, 22:29 »
С ndiswrapper и оригиналните дривери за windows стана. Вече има net на телефона  '<img'>  '<img'>  '<img'>  Този wireless го инсталирам една седмица - ураааааааааааааааааааааааааааааааааааааааааааааааааааааааа.

Тук беше ключа за палатката - линк
Благодаря за помоща. Проблема е решен '<img'>
Активен

Подобни теми
Заглавие Започната от Отговора Прегледи Последна публикация
wireless usb adapter kak da go podkaram pod linux
Настройка на хардуер
kriskill 1 4076 Последна публикация Dec 28, 2005, 10:33
от Agent_SMITH
Wireless pci adapter asus 138g v2
Настройка на хардуер
souldead 3 3034 Последна публикация Mar 16, 2007, 11:57
от Italianeca
AR928X Wireless Network Adapter PCI
Лаптопи
onlinels 0 2705 Последна публикация Mar 21, 2009, 13:18
от onlinels
проблем с wireless pci edimax
Настройка на хардуер
ludsic 6 1985 Последна публикация Aug 08, 2009, 18:41
от ludsic
zdraveite ne moga da namerq draiveri za Wireless USB Adapter TL-WN422G
Кошче
ivan4oooo 0 2063 Последна публикация Oct 17, 2009, 17:41
от ivan4oooo