OpenWrt 21.02.2 drivers

Good to know, you indeed made a 'real bridge' in Windows and used the 'term' brigde which may also work if the nearby wifi gives you multiple ip-address by dhcp. One for your netbook and one for your windows laptop.

Ok so your netbook/OpenWrt router has ip but your windows laptop cannot ping that ip. Is your windows laptop with its wifi/ethernet or bridge interface also on that same subnet for instance

WAN should be pingable by Openwrt but maybe its a windows firewall thing that it blocks.

Therefor try to open a ssh port on the OpenWrt firewall by running the following commands:

cp /etc/config/firewall /etc/config/firewall.bak
nano /etc/config/firewall
#scroll down to the end and type following 4 lines

config rule
        option src              wan
        option dest_port        22
        option target           ACCEPT
        option proto            tcp 

Quit and save nano and restart your firewall by typing /etc/init.d/firewall restart than try from Windows laptop to access ssh as in ssh root@

Did it, ssh works. In the end when tried to ping it and access ssh found that maybe it was my mistake a tiped .193 instead of .139 :man_facepalming: sorry
anyway as i understood we created a new rule that allows connection from outside to port 22

Ok good, so now you are in the situation that from a Windows machine you can 'ssh' and actually copy paste 'commands' instead of typing them to the physical keyboard on the netbook/OpenWrt router?

Than copy paste the 'whole' following codeblock when loggon on via ssh and noticed you have edited the firewall text file without using nano :wink:

cp /etc/config/firewall /etc/config/firewall.bak
cat <<'_EOF_' >> /etc/config/firewall

config rule
        option src              wan
        option dest_port        80
        option target           ACCEPT
        option proto            tcp 

/etc/init.d/firewall restart

Check via the webbrowser on Windows laptop host to see if luci works again:

Ok, copied the whole block to ssh.
Luci works!
Noticed no nano :joy:
A couple of questions occured by the way:
What that means? cat <<'EOF' >>
and another question: by cp command we had overwriten the previous firewall backup file? And is there any mechanism that uses backup file if something fail, or we must use it by hand after something fails?

Ok, copied the whole block to ssh.
Luci works!


Noticed no nano :joy:
A couple of questions occured by the way:
What that means? cat <<'EOF' >>

The cat command catonates stuff somewhere... so if you see cat textfile it will output it in shell standard output. But if you add redirects as in > or >> you can in the first place > overwrite the content of a file with the first file or with double >> add content to a file while keeping the existing content.

cat textfilea #outputs to screen
cat textfilea > textfileb #outputs/overwrites to file b
cat textfilea >> textfileb #outputs/overwrites content of file a at end of file b

With more redirect tricks you can copy paste a code block starting with EOF identifier until it reaches that EOF again.

and another question: by cp command wehad ovverwriten the privous firewall backup file?

Very accurate to see, actually could have called it bak1 bak2 bat3 whatever

And is there any mechanism that uses backup file if something fail, or we must use it by hand after something fails?

No with luci or uci everything can get reverted and saved and automated, but with manually hard editing everything has to be reverted manually.

Ok, i think i got it :slightly_smiling_face:
Whats next? Try to get driver packadge in luci?

Something weird just happenned: tried to surf in luci menu, did not changed anything, wanted to open page with packadges. And connection got lost. Ssh connection is lost too. ifconfig says that ip is now but this is the same ip that my pc has. and i cant reach to ssh or luci with that ip too.
reboot openwrt or replug cable does not help, when this occured cable or netbook was not touched

EDIT, just read your comment about losing connection, it is therefor wise to alter the OpenWrt auto DHCP client config to a static ip config first!

Although you lost connectivity IP-wise, you still can access and edit the netbook keyboard shell the wan settings /etc/config/network?

config interface 'wan' #keep wan
	option device 'br-lan'
	option proto 'static' #notice change back from dhcp > static ?
	option ipaddr ''
	option netmask ''
#	option ip6assign '60'
    option gateway ''
    option dns ''

Makes settings active with: /etc/init.d/network restart or reboot whole router.

However if you wifi adapter in windows drop connection it will break the bridge and you will be locked out again... cannot fix this.... Understand that these IP-address change if you used bridged or ICS nat in Windows. So I guess that if you use ICS nat in windows the gateway ip becomes the ip of the windows laptop ics interface itself and netbook openwrt router ip changes accordingly.

So we/you just finished Option1 having internet on a OpenWrt router using the WAN interface and doing minimal commandline/nano editing to accomplish this, also a little bit of firewall rule editing made most common things available again.

This was kind of simple using DHCP, another variant would be using static ip addressing. I would really recommend you to also try that and maybe even Option2 discussed earlier where OpenWrt internet via its LAN interface. But this can all be done later, first you want progress...

My crystal ball stops here since I don't know exactly which interfaces or wifi modules or even firmware is needed. Therefor you have to read back and follow the USB live linux desktop distro boot on the netbook to gather info?

If you type uname -a on the router it gives you the current linux version. This currently for is somewhat the same as ubuntu 20.04.1.

Try to boot the and see with:

dmesg #before plugging in USB wifi and after
lsmod #before plugging in USB wifi and after

Which modules are in use for your mini-pci-e intel wifi or usb realtek wifi. Than try with opkg update and install to fill the gaps.

If you don't want the live linux desktop distro, try to install with opkg packages like

opkg update
opkg install pciutils usbutils wireless-tools wpa-supplicant whateverintelwifikmodmodule

If you have the right module for interface wifi driver or firmware, which can be discoverd with ifconfig -a and iwlist/iw scan interfacename you need a wireless network stack configuration tool as in. You only need wpasupplicant and no other tools if you are only using the wifi-client mode. To conclude your answer, before all this works you may append 'luci' variants of the cli tools to make it all work.

example stuff for wifi mac80211 cfg80211 hostap wpad

Yes i still can controle it by lcd and keyboard. But how could happen that openwrt and pc getting the same ip and why they decided to do so if nothing was touched? tried replugging cables, erase and creade bridge connection in windows, rebooted both, no luck

I edited previous post see:

However if you wifi adapter in windows drops connection it will break the bridge and you will be locked out again... cannot fix this...

Will be leaving for today, please experiment more or otherwise repeat steps until things are solid than continue with wireless interfaces or maybe usb mobile tethering.

Ok did it, now connection is back again-
Thank You very much, i appreciate your help!
At least i am learning and maybe later lost connection wont be so complicated problem for me :joy:

Goodluck, will check in later to see if you have some wifi modules working.

More info on your wireless interfaces already, modules/firmware/device-id's or even tried USB tether with android phone?

Results are poor.
At first I tried rtl8812au usb wifi stick, since i used it on kali linux and windows.
I installed driver with suggested dependencies via luci. ( kmod-rtl8812au-ct 5.4.179+2020-01-12-e0d586aa-2)On wireless page appeared generic wireless device. It allows me to scan nearby stations, but when i try to connect somewhere or put it in master mode, interface becomes inactive.
At first ifconfig shows interface wlan0, after trying to connect it does not show it anymore.
Second thing i tried was to install driver for pci card of netbook itself.
lspci shows the same name as windows
"05:00.0 Network controller: Intel Corporation Centrino Wireless-N 100"
driver used also found on luci packadges ( iwlwifi-firmware-iwl100 20211216-1 177.7 KB Intel Centrino Wireless-N 100 firmware)
The second interface is not visible at all. Nor wlan0 or radio1 appeared.
Also tried to install different packadges from your previous post.
rtl8812au becomes visible in ifconfig after deleting connection task in wireless page and rebooting. Tried to google a little bit about that 8812 driver, but nothing helpful not yet found. About centrino pci, no physical button for it on laptop, blue indicator shows its on, from windows works.
I will proceed with usb android tether later, because i belive it would be good to have that option. At first i think a have to get wifi going, because general use is wifi client, that provides wired and wireless connection.
P.S. after installing centrino driver, ifconfig does not show anymore wlan0 even after reboot, and network scan does not work anymore.

lspci shows the same name as windows
"05:00.0 Network controller: Intel Corporation Centrino Wireless-N 100"
driver used also found on luci packadges ( iwlwifi-firmware-iwl100 20211216-1 177.7 KB Intel Centrino Wireless-N 100 firmware)

This package is only the firmware not the driver for OpenWrt! Did you opkg install kmod-something-intel-iwlwifi. It seems related to kmod-mac80211

More info is always useful, names of Wifi hardware don't mean that much:

ifconfig #shows configured interfaces not inactive
ifconfig -a #shows inactive interfaces like wifi adapters doing nothing

#please report device-id's of every adapter!
lspci -v #shows devicename and kernel module (desktop linux)
lspci -n #shows device-id but not the realname look at module

lsusb -v #more verbose info also post device-ids

lsmod #shows kernel modules, usefull before and after opkg install kmod drivers

#using 'dmesg' after a certain 'kmod' gets installed shows if driver is loading

Please keep away yet from the luci webinterface and don't do any settings from there yet accept don't even do scanning for wifi spectrum. Remove the current rm /etc/config/wireless file and adapter references if they are made in /etc/config/network. Reboot the netbook/Router.

Start again with only the intel pci wireless adapter connected. Good catch about hardware blue led wireless button. Look in bios if there is option to always power-on radio? If intel wireless is working in Kali linux what does rfkill list mentions? The rfkill program may help in enabling/disabling radios.

It is common that wifi interfaces can have multiple names for kernel like wlan0/radio0 or longer driver based names this can be confusing.

Try to do a wifi scan from terminal with iw or iwlist or iwinfo tool for the specifc intel wireless adapter and report back.

Remember device-id's have 8 fields x.x.x.x:y.y.y.y

No, not kmod i thought it was the driver :man_facepalming:
Why i cannot get device id from ssh? commands you provided seem to work from there:
lspci -v
05:00.0 Network controller: Intel Corporation Centrino Wireless-N 100
Subsystem: Intel Corporation Centrino Wireless-N 100 BGN
Flags: bus master, fast devsel, latency 0, IRQ 11
Memory at f0100000 (64-bit, non-prefetchable) [size=8K]
Capabilities: [c8] Power Management version 3
Capabilities: [d0] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [e0] Express Endpoint, MSI 00

lspci -n
05:00.0 0280: 8086:08ae
Fast Googled device id shows drivers for intel centrino n-100
that number appeared a ven dev numbers, there are also visible in windows Thats Right? :slight_smile:

removed etc/config/wireless
vi /etc/config/network not any word about wlan or radio

Why i cannot get device id from ssh? commands you provided seem to work from there:

OpenWrt used stripped down or older versions of the utils, therefor I recommended Desktop Linux distro Kali is also fine.

opkg install kmod-iwlwifi



Sorry installed and rebooted already, before you edited another 2 commands.
Remove, reboot, reinstall?

Just show the output of commands and see if the module is loaded, also dmesg output is usefull to see if the module actually loads firmware.

ifconfig -a #should show an adapter?

ifconfig -a, no wlan0 interface
dmesg: the etire block is needed or this is enough?

[    9.358337] xt_time: kernel timezone is -0000
[    9.375475] Intel(R) Wireless WiFi driver for Linux
[    9.380919] iwlwifi 0000:05:00.0: Direct firmware load for iwlwifi-100-5.ucode failed with error -2
[    9.385590] iwlwifi 0000:05:00.0: Falling back to sysfs fallback for: iwlwifi-100-5.ucode
[    9.411070] PPP generic driver version 2.4.2
[    9.417029] NET: Registered protocol family 24
[    9.437079] kmodloader: done loading kernel modules from /etc/modules.d/*
[    9.523718] iwlwifi 0000:05:00.0: no suitable firmware found!
[    9.528039] iwlwifi 0000:05:00.0: iwlwifi-100-5 is required
[    9.532743] iwlwifi 0000:05:00.0: check git://
[   12.011796] sky2 0000:09:00.0 eth0: enabling interface