Re: [Madwifi-devel] Unable to configure MadWifi as a simple AP on Ubuntu

Mohammad Abdelhadi <[email protected]> Fri, 21 May 2010 10:46:17 +0300
Newsgroups gmane.linux.drivers.madwifi.user
Message-ID <[email protected]>
On Fri, May 21, 2010 at 12:09 AM, Aditya Bhave <[email protected]> wrote:

> Hi,
>
> Im trying to configure MadWifi as an AP on laptop A and connecting a
> client from laptop B. Although the station B associates correctly, Im
> unable to even do a simple ping to the AP
>
> Here is my configuration
>
> Laptop A: Lenovo Thinkpad
> Card: lshw -C network
>        description: interface
>        product: Atheros AR5001X+ Wireless Network Adapter
>        vendor: Atheros Communications Inc.
>        physical id: 0
>        bus info: pci@0000:16:00.0
>        logical name: wifi0
>        version: 01
>        serial: 00:0b:6b:20:40:dd
>        width: 32 bits
>        clock: 33MHz
>        capabilities: bus_master cap_list logical
>        configuration: broadcast=yes driver=ath_pci latency=96
> maxlatency=28 mingnt=10 multicast=yes
>        resources: irq:16 memory:c4000000-c400ffff
>
> Here is the script I used to create an AP
> /*********
> #!/bin/sh
>
> sudo modprobe -r ath5k || true
> sudo modprobe -r ath9k || true
> sudo modprobe -r ath_pci || true
> sudo modprobe ath_pci autocreate=none
>
> sudo wlanconfig ath1 destroy || true
> sudo wlanconfig ath1 create wlandev wifi0 wlanmode ap    # set up the AP
> sudo iwpriv ath1 mode 3                    # 11g mode
> sudo iwconfig ath1 essid "Aditya"      # essid
> sudo iwconfig ath1 key off                # no wep
> sudo iwconfig ath1 enc off                # no wep
> sudo iwpriv ath1 wpa 0                    # no wpa
>
> sudo ifconfig ath1 up
> sleep 1
> sudo ifconfig ath1 192.168.1.1 netmask 255.255.255.0
>
> sudo sysctl -w dev.wifi0.diversity=0
> sudo sysctl -w dev.wifi0.txantenna=1
> sudo sysctl -w dev.wifi0.rxantenna=
> ************************/
>
> Laptop B: Dell Inspiron
> Card: description: Wireless interface
>       product: AR928X Wireless Network Adapter (PCI-Express)
>       vendor: Atheros Communications Inc.
>       physical id: 0
>       bus info: pci@0000:0c:00.0
>       logical name: wifi0
>       version: 01
>       serial: 00:15:6d:84:35:8e
>       width: 64 bits
>       clock: 33MHz
>       capabilities: bus_master cap_list logical ethernet physical wireless
>       configuration: broadcast=yes driver=ath_pci latency=0
> multicast=yes wireless=IEEE 802.11g
>       resources: irq:19 memory:dfcf0000-dfcfffff
>
> Here is the script I used to create a STA
> /*************
> #!/bin/sh
>
> sudo modprobe -r ath5k || true
> sudo modprobe -r ath9k || true
> sudo modprobe -r ath_pci || true
>
> sudo modprobe ath_pci autocreate=none
> sudo wlanconfig ath1 destroy || true
> sudo wlanconfig ath1 create wlandev wifi0 wlanmode sta
> sudo iwpriv ath1 mode 3     # 11g
> sudo iwconfig ath1 essid "Aditya"
> sleep 1
>
> sudo sysctl -w dev.wifi0.diversity=0
> sudo sysctl -w dev.wifi0.txantenna=1
> sudo sysctl -w dev.wifi0.rxantenna=1
>
> ***********************/
>
> In NetworkManager, I configured so that address is obtained through DHCP
> whenever the STA connects to AP "Aditya"
> Here is my dhcpd.conf file
> /***************
> option domain-name-servers 192.168.1.1;
>
> default-lease-time 86400;
> max-lease-time 604800;
>
> authoritative;
>
> # basic setup by ADITYA BHAVE
> subnet 192.168.1.0 netmask 255.255.255.0 {
>     range 192.168.1.10 192.168.1.20;
>     option subnet-mask 255.255.255.0;
>     option broadcast-address 192.168.1.255;
>     option routers 192.168.1.1;
> }
> /*****************************/
>
> Firstly, the STA is unable to obtain an address through DHCP.
> I then manually gave the STA an address of 192.168.1.10, with a netmask
> of 255.255.255.0 and a gateway of 192.168.1.1. I even ran the following
> command
> route add default gw 192.168.1.1
>
> Inspite of both the above changes, a ping command fails
> ayb@AD-DELL:~$ ping -I ath1 192.168.1.1
> PING 192.168.1.1 (192.168.1.1) from 192.168.1.2 ath1: 56(84) bytes of data.
>  From 192.168.1.2 icmp_seq=1 Destination Host Unreachable
>  From 192.168.1.2 icmp_seq=3 Destination Host Unreachable
>  From 192.168.1.2 icmp_seq=4 Destination Host Unreachable
>  From 192.168.1.2 icmp_seq=5 Destination Host Unreachable
>  From 192.168.1.2 icmp_seq=6 Destination Host Unreachable
>
> Can someone please help to diagnose this problem?
>
> Thanks
> regards,
> Aditya Bhave
>
>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Madwifi-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/madwifi-devel
>

Hi,

You could try this:

For the AP, execute the following commands:

 ·          *sudo service network-manager stop           # Disable the
Network Manager.*

·         *sudo wlanconfig ath0 destroy*

·         *sudo wlanconfig ath0 create wlandev wifi0 wlanmode ap*

·         *sudo iwconfig ath0 essid 'name'*

·         *sudo* *iwconfig ath0 channel 6*

·         *sudo ifconfig ath0 up*

·         *sudo ifconfig ath0 169.255.1.2*

For the Station, execute the following commands:

·         *sudo service network-manager stop *

·         *sudo wlanconfig ath0 destroy*

·         *sudo wlanconfig ath0 create wlandev wifi0 wlanmode sta*

·         *sudo iwconfig ath0 essid 'name'*

·         *sudo* *iwconfig ath0 channel 6*

·         *sudo ifconfig ath0 up*

·         *sudo ifconfig ath0 169.255.9.2*

Hope this helps...

Regards,
-- 
Mohammad Jaser Abdelhadi
----------------------------------------------------------------------------
Communications Engineering-Senior Student
Princess Sumaya University for Technology
Mobile: +962777030924
Email: [email protected] \ [email protected]

------------------------------------------------------------------------------

_______________________________________________
Madwifi-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/madwifi-users