Help - Stuck at Opkg Update

Discussion about my Wifi Radio project at http://mightyohm.com/wifiradio/ or my WL-520gU talk at NOTACON.
Post Reply
Drone
Posts: 4
Joined: Fri Jun 11, 2010 10:45 pm

Help - Stuck at Opkg Update

Post by Drone »

Hello All,

My name is David, I'm new to this forum. I'm trying to build the WiFi radio project. I've found it quite easy to follow the instructions and have had what seems success up until I try to update packages. Sorry for the long post buy I'll try to include all the pertinent configuration information and results so-far. Perhaps someone can suggest a way to get the package update working. I think perhaps I need to punch a hole in one of the boxes in my network(?)

The network looks like this:

DOCSIS-><-Cable Modem-><-Wired Router- LANGW @ 192.168.1.1/24-><-Wired Switch-><-Wireless Router-LANGW @ 10.0.1.1/24-><-WL-520GU as Device SSH @ 10.0.1.254/24-><-PC Wireless SSH

You might ask why the network is configured this way. The edge router is locked down pretty tight - no wireless is desired there. The internal wireless box is only for trivial device connections and is a pretty old WiFi router, really not suitable for the edge. I want to be able to move the WL-520GU as a portable music player.

I've followed all the instructions on setting up networking and the package repository. The post-configuration file dumps are below. The DNS servers are OpenDNS. The WL-520GU works as advertised when flashed with factory firmware. So the hardware is OK.

I can resolve and ping Yahoo.com and mightyohm.com when logged into the WL-520GU via wireless SSH to 10.0.1.254. So I'm able to access the Internet, at least with ICMP and for DNS lookups. The AIR LED and Power LED on the WL-520GU are lit.

My PC has no problem browsing the Web via wireless router with gateway address 10.0.1.1

The wireless router with gateway address is giving my PC a lease address of 10.0.1.100, I don't know how to find the DHCP lease in OpenWrt. It doesn't seem to be in the obvious places (help please?)

I then try to fetch packages:

root@OpenWrt:~# opkg update
Downloading http://mightyohm.com/files/kamikaze-2.4 ... ackages.gz
Connecting to mightyohm.com (98.129.212.1:80)
wget: cannot connect to remote host (98.129.212.1): Connection timed out
Signiture check for snapshots skipped because GPG support was not enabled in this build
Collected errors:
* opkg_download: ERROR: Command failed with return value 1: `wget --passive-ftp -P /tmp/opkg-dBCbGz http://mightyohm.com/files/kamikaze-2.4 ... ackages.gz'
root@OpenWrt:~#

Hmmm....

But there's no problem resolving and pinging mightyohm.com from within the WL-520GU:

root@OpenWrt:~# ping mightyohm.com
PING mightyohm.com (98.129.212.1): 56 data bytes
64 bytes from 98.129.212.1: seq=0 ttl=48 time=221.047 ms
64 bytes from 98.129.212.1: seq=1 ttl=48 time=231.072 ms
64 bytes from 98.129.212.1: seq=3 ttl=48 time=232.499 ms
64 bytes from 98.129.212.1: seq=4 ttl=48 time=220.125 ms
64 bytes from 98.129.212.1: seq=5 ttl=48 time=231.852 ms

--- mightyohm.com ping statistics ---
6 packets transmitted, 5 packets received, 16% packet loss
round-trip min/avg/max = 220.125/227.319/232.499 ms
root@OpenWrt:~#

Code: Select all

---- WL-520GU Configuration ----

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   10.0.1.254
        option netmask  255.255.255.0
        option gateway  10.0.1.1
        option dns      208.67.222.222 208.67.220.220

#### WAN configuration
config interface        wan
        option ifname   "eth0.1"
        option proto    dhcp
root@OpenWrt:~#

----

root@OpenWrt:~# cat /etc/config/wireless
config wifi-device  wl0
        option type     broadcom
        option channel  11

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

config wifi-iface
        option device   wl0
        option network  lan
        option mode     sta
        option ssid     Lepton-01
        option encryption psk
        option key      ar820sdf934453jwkd3168fnfs982398
root@OpenWrt:~#

----

root@OpenWrt:~# cat /etc/opkg.conf
#src/gz snapshots http://downloads.openwrt.org/snapshots/brcm-2.4/packages
src/gz snapshots http://mightyohm.com/files/kamikaze-2.4/packages/mipsel
dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
root@OpenWrt:~#

----
User avatar
mightyohm
Site Admin
Posts: 1063
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: Help - Stuck at Opkg Update

Post by mightyohm »

I'm not totally sure what's going on here. But here's an idea - Try turning off bridging, you definitely don't want that on since you're trying to set a different IP for the LAN and WAN sides of the router.

You can do this by commenting out the line that reads "option type bridge" in the LAN configuration section.

It also might be a good idea to move the LAN side of the router to a different IP subnet.

As an example, here's my LAN config.

Code: Select all

#### 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
One option might be to set up a local ftp site so you can host the packages on your own network, thus simplifying the path that the router has to traverse to get to them...
Drone
Posts: 4
Joined: Fri Jun 11, 2010 10:45 pm

Re: Help - Stuck at Opkg Update

Post by Drone »

Hi Jeff,

I'll try the configuration changes you suggest first. I can set up an FTP server on my LAN. Is that all that's necessary for the package manager to fetch the update? I though you needed an HTTP server to serve packages, isn't the updater using wget?

Best Regards, David
User avatar
mightyohm
Site Admin
Posts: 1063
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: Help - Stuck at Opkg Update

Post by mightyohm »

I'm sorry, I meant web server. You are correct!
caramel
Posts: 1
Joined: Sun Sep 26, 2010 2:05 am

Re: Help - Stuck at Opkg Update

Post by caramel »

Hey Drone, Jeff,

I had the same problem and just want to share how I solved it.

- opkg could not update, similar error msg as above. Workaround with local webserver worked ok for installing packages, but then
- streaming with mpd also didn't work, while playing media from local webserver worked ok.

So I compared kernel parameters with my other OpenWRT box (backfire release) where opkg update did work. Outcome was that I had to set

Code: Select all

net.ipv4.tcp_ecn=0
in /etc/sysctl.conf. Then restart sysctl and it worked.

Acc. to Wikipedia:
Some outdated or buggy network equipment drops packets with ECN bits set, rather than ignoring the bits
Regards,
Caramel
Post Reply