Help! Stuck at /etc/init.d/network restart

Discussion about my Wifi Radio project at http://mightyohm.com/wifiradio/ or my WL-520gU talk at NOTACON.

Help! Stuck at /etc/init.d/network restart

Postby ozBillo » Mon Dec 06, 2010 7:49 am

Hi guys,

I get stuck at the "/etc/init.d/network restart" step.
It just seems to hang there and the Air light never comes on.
I've left it for 10 minutes without any luck.
I've retried many times from the start but I keep getting stuck at the same point.

Here's my config settings...

Code: Select all
root@OpenWrt:~# vi /etc/config/wireless
config wifi-device  wl0
        option type     broadcom
        option channel  2

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

config wifi-iface
        option device   wl0
        option network  lan
        option mode     sta
        option ssid     Bills-Network
        option encryption psk
        option key      'thisisnotmyrealkey'
~
root@OpenWrt:~# 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    dhcp
        # option ipaddr 192.168.1.1
        # option netmask        255.255.255.0


root@OpenWrt:~# vi /etc/resolv.conf
nameserver 127.0.0.1
~


Any ideas?

Cheers,
Bill
User avatar
ozBillo
 
Posts: 8
Joined: Sat Jun 26, 2010 2:24 am
Location: Melbourne, Australia

Re: Help! Stuck at /etc/init.d/network restart

Postby mightyohm » Mon Dec 06, 2010 8:52 am

Well, safe to say it is not connecting to your wireless network.

Have you double-checked the wifi channel number and that you are well within range of your wireless network?

Have you tried changing the security of your wireless network by turning it off temporarily or moving to WEP (and updating the config file), to see if that changes anything?

Try the command "iwlist wl0 scan" to list your available networks. I'm not sure if it works on the version of OpenWrt on the router, and I can't test it right now. But it might be worth a shot.
User avatar
mightyohm
Site Admin
 
Posts: 834
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA

Re: Help! Stuck at /etc/init.d/network restart

Postby ozBillo » Mon Dec 06, 2010 10:20 am

Hi Jeff,

You were right, my channel was wrong.
I'll change the config and give it another try.

Thanks for the help :)
User avatar
ozBillo
 
Posts: 8
Joined: Sat Jun 26, 2010 2:24 am
Location: Melbourne, Australia

Re: Help! Stuck at /etc/init.d/network restart

Postby ozBillo » Mon Dec 06, 2010 11:34 am

Still no luck, Jeff.
I am connecting to the router via ethernet using putty.
I suspect that might be complicating things.

I went thru the whole process again.
This time I used Tinkernuts settings (http://tinkernut.com/archives/2387)
and changed my LAN config like this...

option proto static
option ipaddr 192.168.15.103
option netmask 255.255.255.0
option gateway 192.168.15.1
option dns 8.8.8.8

I then restarted putty with 192.168.15.103 and did the network restart.
This time I got the following response...

udhcpc (v1.11.2) started
Sending discover...
root@OpenWrt:~:# Sending discover...
Sending discover...

Then it just sits there. Still no air light.

So, I've got a little further.

Any suggestions?
User avatar
ozBillo
 
Posts: 8
Joined: Sat Jun 26, 2010 2:24 am
Location: Melbourne, Australia

Re: Help! Stuck at /etc/init.d/network restart

Postby jeroen94704 » Wed Dec 08, 2010 12:48 am

Try this:

- In /etc/config/wireless, change the option "network" for the wifi-iface to "wlan"
- In /etc/config/network, add a block identical to the "config interface lan", called "config interface wlan", and set the ifname option to wl0

Then restart the network.

This is how my network is configured, and it works for me.

Jeroen
jeroen94704
 
Posts: 109
Joined: Sat Feb 13, 2010 4:27 am
Location: Eindhoven, the Netherlands

Re: Help! Stuck at /etc/init.d/network restart

Postby mightyohm » Wed Dec 08, 2010 9:09 am

Can you post tinkernut's settings here so I don't have to watch the video to look at them? :)

I still maintain that the router is not associating with your wireless network. You can aid your troubleshooting immensely by making your network easier to associate with, ie. temporarily turning off encryption. Then you can set the encryption to 'none' and comment out the key in /etc/config/wireless and try restarting the network again.

Also, don't set the IP address and other settings for the LAN if you still have bridging turned on, that's bound to cause problems. Comment out the line that reads "option bridge" if you want to set the LAN ports to a fixed IP address (to make it easy to use putty to connect).

Here are the config files I am using, for reference:

/etc/config/wireless
Code: Select all
config wifi-device  wl0
   option type     broadcom
   option channel  5

   # REMOVE THIS LINE TO ENABLE WIFI:

config wifi-iface
   option device   wl0
   option network   wan
   option mode     sta
   option ssid     MYSSID
   option encryption wep
   option key MYWEPKEY



/etc/config/network
Code: Select all
#### 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   dhcp


/etc/config/firewall
Code: Select all
config defaults
   option syn_flood   1
   option input      ACCEPT
   option output      ACCEPT
   option forward      REJECT

config zone
   option name      lan
   option input   ACCEPT
   option output   ACCEPT
   option forward   REJECT

config zone
   option name      wan
   option input   ACCEPT
   option output   ACCEPT
   option forward   REJECT
   option masq      1

config forwarding
   option src      lan
   option dest     wan


### EXAMPLE CONFIG SECTIONS
# do not allow a specific ip to access wan
#config rule
#   option src      lan
#   option src_ip   192.168.45.2
#   option dest      wan
#   option proto   tcp
#   option target   REJECT

# block a specific mac on wan
#config rule
#   option dest      wan
#   option src_mac   00:11:22:33:44:66
#   option target   REJECT

# block incoming ICMP traffic on a zone
#config rule
#   option src      lan
#   option proto   ICMP
#   option target   DROP

# port redirect port coming in on wan to lan
#config redirect
#   option src         wan
#   option src_dport   80
#   option dest         lan
#   option dest_ip      192.168.16.235
#   option dest_port   80
#   option proto      tcp

# include a file with users custom iptables rules
#config include
#   option path /etc/firewall.user


### FULL CONFIG SECTIONS
#config rule
#   option src      lan
#   option src_ip   192.168.45.2
#   option src_mac   00:11:22:33:44:55
#   option src_port   80
#   option dest      wan
#   option dest_ip   194.25.2.129
#   option dest_port   120
#   option proto   tcp
#   option target   REJECT

#config redirect
#   option src      lan
#   option src_ip   192.168.45.2
#   option src_mac   00:11:22:33:44:55
#   option src_port      1024
#   option src_dport   80
#   option dest_ip   194.25.2.129
#   option dest_port   120
#   option proto   tcp
User avatar
mightyohm
Site Admin
 
Posts: 834
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA

Re: Help! Stuck at /etc/init.d/network restart

Postby ozBillo » Wed Dec 08, 2010 10:25 am

Thanks Jeroen and Jeff for your suggestions.

I disabled security on my other router and commented out bridge as per your suggestion, Jeff.
Here are my current settings...
Code: Select all
root@OpenWrt:~# cat /etc/config/wireless
config wifi-device  wl0
        option type     broadcom
        option channel  1

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

config wifi-iface
        option device   wl0
        option network  lan
        option mode     sta
        option ssid     Bills-Network
        option encryption none

root@OpenWrt:~# cat /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    dhcp

I did the network restart and, woohoo!! the air light came on.
I then tried pinging google...
Code: Select all
root@OpenWrt:~# ping www.google.com
ping: bad address 'www.google.com'
root@OpenWrt:~# ping 72.125.19.104
PING 72.125.19.104 (72.125.19.104): 56 data bytes
ping: sendto: Network is unreachable

So, I'm closer to success but obviously there are still some things that need fixing.
I'm a software developer but I must confess to being a little bit at sea when it comes to setting up wireless networks.

Any idea why my pings aren't working"?
I'm only about 2 meters from my main wireless router.
User avatar
ozBillo
 
Posts: 8
Joined: Sat Jun 26, 2010 2:24 am
Location: Melbourne, Australia

Re: Help! Stuck at /etc/init.d/network restart

Postby mightyohm » Wed Dec 08, 2010 7:11 pm

Edit wireless and change this line:

option network lan

to

option network wan

Also, take a look at the config files I posted.
User avatar
mightyohm
Site Admin
 
Posts: 834
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA

Re: Help! Stuck at /etc/init.d/network restart

Postby ozBillo » Thu Dec 09, 2010 1:36 pm

Thanks, Jeff. Right again!

I did look at your config files but I had missed "option network wan" :oops:

Once that change was made it worked. Awesome!

I then re-enabled WPA on my main router and tried to get the Asus working with "option encryption psk". No luck.
I did a little reading and found out that the version of Openwrt we're using doesn't support WPA+AES (which my main router uses).
I changed it to WPA+TKIP and that worked okay.
I then changed it to WPA2+AES and changed the config/wireless to "option encryption psk2". That worked okay, too. Awesome.

Now, I just have to wait until my usb sound card arrives so I can make some noise!

Thanks again, Jeff, for all your help.
Very much appreciated.

Cheers,
Bill
User avatar
ozBillo
 
Posts: 8
Joined: Sat Jun 26, 2010 2:24 am
Location: Melbourne, Australia

Re: Help! Stuck at /etc/init.d/network restart

Postby mightyohm » Thu Dec 09, 2010 8:25 pm

Awesome! I didn't realize you could use WPA2-AES with OpenWrt, so thanks for educating me about that. I'll have to try it out. :)

Thanks and good luck!
User avatar
mightyohm
Site Admin
 
Posts: 834
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA

Next

Return to Wifi Radio Project / Hacking the Asus WL-520gU

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot] and 3 guests