Connect OpenWrt to WLAN


My problem is:

my openWRT does not identify my modemstick, so i have to modify my openWRT

but i cannot do e.g. "opkg update" because of "failed establish connection"

i have a ubuntu-labtop connected to a WLAN-internet, the openWRT modem is connected to the labtop by LAN, the modem is NOT connected to internet, there is no WAN.

how can i establish a connection to internet?

You need to establish some temporarily internet connection to download the required packages, which you then install on your router.

Perhaps, you can use a laptop/PC to connect your modem stick and connect to the Internet, assuming your laptop/PC already has the drivers installed? Otherwise, you may need to take your laptop out, find a public network, download the OpenWrt drivers (or source code), bring them back and install on your router.

hey, i have a wifi-connection with my labtop, so my labtop has internet-connection, i'm connected to the modem by SSH.

but when i enter e.g.

root@OpenWrt:~# opkg update

i get the "failed establish connection" problem

Your OpenWrt router is not aware of the connection from your labtop to wifi/internet.
Basically you have to "bridge" your Wifi connection to LAN.

If you can you could connect your router to your wifi router also.

1 Like

Download packages (*.ipk files) to your laptop, copy them over to the router, and install with opkg install <package> --cache <dir>

If you can you could connect your router to your wifi router also


the wifi router is smartphone (AP), openwrt finds the wifi after scanning, tries to connect several times but fails....

You could also go for the method @savostyanov suggested. If it's only one file or a few. Otherwise bridge your wifi to lan interface.

Another possibility would be to use a USB stick if you router has USB connector. If you don't know how to copy your downloaded files to the router.


scp *.ipk root@
given that you reach your router with the IP above.

Set up a shared connection on the laptop, then use the laptop as a gateway to the internet:

uci -q delete network.wan
uci set network.lan.dns=""
uci set network.lan.gateway="laptop_ip"
uci commit network
/etc/init.d/network restart


tying to bridge my wifi connection to LAN:

do you think i also have to make some modification in openWRT

made a terrible mistake, can not connect to my modem anymore

i did not replace "laptop_iP" with my laptop_ip

can i adjust this?

It should not affect LAN connectivity.
In any case, you can access the device via its IPv6 link-local address.

the packages are *.gz

i download them, rename them in *.ipk

copy them to the router and then rename then again before installing?

The packages should normally be *.ipk when you download them. Could you explain where you got them from?

Renaming *.gz to *.ipk won't do the trick.


opkg update

i get e.g.

Failed to establish connection
*** Failed to download the package list from

Failed to establish connection
*** Failed to download the package list from

then i download this *.gz-packages on my labtop, when i unpack the gz-files, i get files without ending

The gz-files are package lists, not packages. You don't need to update package lists on your router. You need to download *.ipk packages on your laptop, copy them over on your router, and install them.

Later, when you have your connection from router active, you can do opkg update and install more packages from the internet.

1 Like

You can find ipk packages here:

Be aware! You have to choose the correct release tree you are using on your device and the correct architecture/platform according to your router hardware.


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.