Hi,
I was trying to update OpenWRT's opkg catalog, but whenever attempting to download, it gives me error code 6.
I'm using a Raspberry Pi 3B and I am connected to Wi-Fi.
Here's my console output for debugging purpouses:
Downloading https://downloads.openwrt.org/releases/22.03.3/targets/bcm27xx/bcm2710/packages/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.3/targets/bcm27xx/bcm2710/packages/Packages.gz
Downloading https://downloads.openwrt.org/releases/22.03.3/packages/aarch64_cortex-a53/base/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.3/packages/aarch64_cortex-a53/base/Packages.gz
Downloading https://downloads.openwrt.org/releases/22.03.3/packages/aarch64_cortex-a53/luci/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.3/packages/aarch64_cortex-a53/luci/Packages.gz
Downloading https://downloads.openwrt.org/releases/22.03.3/packages/aarch64_cortex-a53/packages/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.3/packages/aarch64_cortex-a53/packages/Packages.gz
Downloading https://downloads.openwrt.org/releases/22.03.3/packages/aarch64_cortex-a53/routing/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.3/packages/aarch64_cortex-a53/routing/Packages.gz
Downloading https://downloads.openwrt.org/releases/22.03.3/packages/aarch64_cortex-a53/telephony/Packages.gz
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.3/packages/aarch64_cortex-a53/telephony/Packages.gz
Collected errors:
* opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.3/targets/bcm27xx/bcm2710/packages/Packages.gz, wget returned 4.
* opkg_download: Check your network settings and connectivity.
* opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.3/packages/aarch64_cortex-a53/base/Packages.gz, wget returned 4.
* opkg_download: Check your network settings and connectivity.
* opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.3/packages/aarch64_cortex-a53/luci/Packages.gz, wget returned 4.
* opkg_download: Check your network settings and connectivity.
* opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.3/packages/aarch64_cortex-a53/packages/Packages.gz, wget returned 4.
* opkg_download: Check your network settings and connectivity.
* opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.3/packages/aarch64_cortex-a53/routing/Packages.gz, wget returned 4.
* opkg_download: Check your network settings and connectivity.
* opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.3/packages/aarch64_cortex-a53/telephony/Packages.gz, wget returned 4.
* opkg_download: Check your network settings and connectivity.
Any help would be appreciated!
Can you elaborate here? Are you connected to the Pi via wifi (i.e. the Pi operating as a wifi AP), or is the Pi connected to an upstream network via wifi (Pi as a client/sta mode device)?
Let's see your config files:
Please copy the output of the following commands and post it here using the "Preformatted text </>
" button:

Remember to redact passwords, MAC addresses and any public IP addresses you may have:
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall
2 Likes
I'm using ethernet hooked up to my PC to get to the console and LuCI, and I'm running in AP mode.
Configuration (I think is basically stock):
Network:
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix '**'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
config interface 'wwan'
option proto 'dhcp'
Wireless:
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix '*'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
config interface 'wwan'
option proto 'dhcp'
config wifi-device 'radio0'
option type 'mac80211'
option path 'platform/soc/3f300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
option channel '1'
option band '2g'
option htmode 'HT20'
option cell_density '0'
option txpower '20'
config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option encryption 'psk2'
option key '*************'
option ssid '************'
option disassoc_low_ack '0'
DHCP:
config dnsmasq
option domainneeded '1'
option boguspriv '1'
option filterwin2k '0'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option nonegcache '0'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
option nonwildcard '1'
option localservice '1'
option ednspacket_max '1232'
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
option dhcpv6 'server'
option ra 'server'
option ra_slaac '1'
list ra_flags 'managed-config'
list ra_flags 'other-config'
config dhcp 'wan'
option interface 'wan'
option ignore '1'
config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'
option loglevel '4'
Firewall:
config wifi-device 'radio0'
option type 'mac80211'
option path 'platform/soc/3f300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
option channel '1'
option band '2g'
option htmode 'HT20'
option cell_density '0'
option txpower '20'
config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option encryption 'psk2'
option key '*****'
option ssid '*****'
option disassoc_low_ack '0'
root@OpenWrt:~# cat /etc/config/dhcp
config dnsmasq
option domainneeded '1'
option boguspriv '1'
option filterwin2k '0'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option nonegcache '0'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
option nonwildcard '1'
option localservice '1'
option ednspacket_max '1232'
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
option dhcpv6 'server'
option ra 'server'
option ra_slaac '1'
list ra_flags 'managed-config'
list ra_flags 'other-config'
config dhcp 'wan'
option interface 'wan'
option ignore '1'
config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'
option loglevel '4'
root@OpenWrt:~# cd /etc/config/
root@OpenWrt:/etc/config# cat firewall
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 'ACCEPT'
list network 'lan'
config zone
option name 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
list network 'wan'
list network 'wan6'
list network 'wwan'
config forwarding
option src 'lan'
option dest 'wan'
config rule
option name 'Allow-DHCP-Renew'
option src 'wan'
option proto 'udp'
option dest_port '68'
option target 'ACCEPT'
option family 'ipv4'
config rule
option name 'Allow-Ping'
option src 'wan'
option proto 'icmp'
option icmp_type 'echo-request'
option family 'ipv4'
option target 'ACCEPT'
config rule
option name 'Allow-IGMP'
option src 'wan'
option proto 'igmp'
option family 'ipv4'
option target 'ACCEPT'
config rule
option name 'Allow-DHCPv6'
option src 'wan'
option proto 'udp'
option dest_port '546'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-MLD'
option src 'wan'
option proto 'icmp'
option src_ip 'fe80::/10'
list icmp_type '130/0'
list icmp_type '131/0'
list icmp_type '132/0'
list icmp_type '143/0'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-ICMPv6-Input'
option src 'wan'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
list icmp_type 'router-solicitation'
list icmp_type 'neighbour-solicitation'
list icmp_type 'router-advertisement'
list icmp_type 'neighbour-advertisement'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-ICMPv6-Forward'
option src 'wan'
option dest '*'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-IPSec-ESP'
option src 'wan'
option dest 'lan'
option proto 'esp'
option target 'ACCEPT'
config rule
option name 'Allow-ISAKMP'
option src 'wan'
option dest 'lan'
option dest_port '500'
option proto 'udp'
option target 'ACCEPT'
Edit: Yes, I already removed my wireless signal before I uploaded this (not the Access Point, the wifi connection)
Also I'm able to get a MAC Address and everything, but I can't ping anything.
I see a wwan interface, but no sta (client) mode configuration for the wireless... so you have no uplink. The device is basically an island.
Do you have an upstream network? Is it wifi or wired?
By this, it is obvious that you have no uplink at all. You need to resolve that.
What do you want to do...
- Connect your computer by ethernet and use a wireless uplink
or
- connect your computer via wifi and make your wired ethernet into a wan.
By "Wireless uplink", do you mean disable the Wi-Fi broadcast and instead connect to my wifi network?
A wireless uplink means that it would connect via wifi to your existing wifi network... that would be the path for it to get internet access. In the case of the Pi, it does mean turning off the wifi broadcast (AP mode) because the chipset is not capable of operating in both AP and STA modes simultaneously.
Alright, I did that and even though it said it had an IP (it looked correct) and a MAC Address and everything, it still isn't working. I've reflashed 2 times now to no avail, but I have a USB Dongle (CanaKit 802.11 dongle for Raspberry Pi) but it doesn't have drivers. Should I try configuring Wired Ethernet to troubleshoot more?
Did you set the wireless uplink into a new network interface (called wan or wwan)? and did you associate that with the wan firewall zone?
I'm not sure, because I used LuCI to make the uplink
edit: I haven't changed the firewall settings for the uplink yet, I'm using default.
I think this may be helpful:
(you'll connect your computer by ethernet in this scenario).
Now realizing that it's not saving changes (I got the status error of [OK]
Alright, I did all that, though it's still not working. I think I'm gonna try another SD card, because that's helped me with Raspbian and Ubuntu in the past when Wi-Fi isn't working.
edit: actually, could I maybe get drivers for my USB 802.11 device without Wi-Fi?
Or just reflash the card.. whatever works best for you.
Once you associate with a wifi network, if it's still not delivering the expected results, post your config files again (as well as a description about what is and is not working) and we'll figure it out.
Just reflashed, still not working.
Letβs see the configuration files.
Real quick question: Could I maybe get a old backup point (when Wi-Fi worked) loaded on my pi and then use that?
sure... but it's not clear what you're doing -- the current configs (or previous ones) may reveal the issue.
Yeah, I think I give up. OpenWRT works for what I wanna do, and everything else is just an afterthought.
I'm a bit confused... but whatever makes sense for you is fine.
If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.
(even if it's not acutally solved, if you are indeed giving up on this specific issue, it makes sense to close the thread.... feel free to open new threads if/when needed).
1 Like