OpenWrt Forum Archive

Topic: wifi configuring

The content of this topic has been archived on 22 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi, everybody! I have some trouble.
Hardware is asus wl-500gP. I want to make home-router: wifi for some PC and NAT to wan-port to my SP. I know how to configure NAT by iptables, know in common theory how to configure wifi (some time config Air-net cisco). But i don’t know how to configure wifi point at unix OS.
I read this manual http://downloads.openwrt.org/kamikaze/d … 110001.2.2 but I think it’s very small. I try to ask google, but without results. 
My config’s:
# vi /etc/config/wireless

config wifi-device  wl0
        option type     broadcom
        option channel  5

        # REMOVE THIS LINE TO ENABLE WIFI:
###     option disabled 1

config wifi-iface
        option device   wl0
        option network  lan
        option mode     ap
        option ssid     inet
###     option encryption wep
        option encryption none
        hidden          "0"
###     option key      qwqw!123
# vi /etc/config/network

#### VLAN configuration
config switch eth0
        option vlan0    "1 2 3 4 5*"
        option vlan1    "0 5"


#### Loopback configuration
config interface loopback
        option ifname   "lo"
        option proto    static
        option ipaddr   127.0.0.1
        option netmask  255.0.0.0


#### LAN configuration
config interface lan
        option type     bridge
        option ifname   "eth0.0"
        option proto    static
        option ipaddr   192.168.1.1
        option netmask  255.255.255.0


#### WAN configuration
config interface        wan
        option ifname   "eth0.1"
        option proto    static
        option ipaddr   10.1.16.6
        option netmask  255.255.255.0
        option gateway  10.1.16.254
        option dns      10.1.8.5

At PC I see my ssid, but wifi-card don’t receive ip-addres I don’t know how to fix this problem.
Please, give my some links or kinks or docks about wifi configuration at openwrt.

First, does it work if you plug in directly?  Can you get an IP address with dhcp and ping the router?

Can you get it to join if connect to the wireless network and manually set your IP address?
(in windows, you go to the network screen, right click, properties, TCP/IP, properties, "manually set IP address")
in linux, just join to the SSID and do "ifconfig wlan0 192.168.1.33"

Then you should be able to ping 192.168.1.1 and get something back.
If pinging works with a manual address then the dhcp server needs to be reconfigured.

If you can't ping it even after associating with it, I would check that there isn't some sort of iptables rule blocking it on the router, since usually once you manage to associate you have a connection.

If you aren't able to get it to work, could you run "ifconfig -a" and "iwconfig" and show us what it says?

When i plug wire at port net-card receive ip-address from router. DHCP is work.
At my PC (asus eeePC with OS Ubuntu) I set manually ip address 192.168.1.30/24 gw 192.168.1.1, after that ping wifi-card is correct, ping router 192.168.1.1 – no results.
At PC
iwgetid told me ESSID: “inet†. – is correct.
Ifconfig – ath0 192.168.1.30/24.
At router :
#Iwgetid – no results.
#Ifconfig
---- some commit ---
wl0       Link encap:Ethernet  HWaddr 00:1F:C6:62:1C:80 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:8
          TX packets:0 errors:23 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:2 Base address:0x2000
# iwlist wl0 scan
wl0       Scan completed :
          Cell 01 - Address: 00:C0:02:0C:4D:F9
                    ESSID:"savage external"
                    Mode:Master
                    Channel:1
                    Quality:0/0  Signal level:-51 dBm  Noise level:-81 dBm
                    Encryption key:on
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
                              12 Mb/s; 24 Mb/s; 36 Mb/s; 9 Mb/s; 18 Mb/s
                              48 Mb/s; 54 Mb/s

The discussion might have continued from here.