How can I install a specified version package?

I want to install a specified version packeage: kmod-rtl8187-4.14.131 instead of kmod-rtl8187-4.14.209.
And I saw a post which said that i can write a function to find a specified version package.
But I don't know how to write a function in openwrt.
Where should I create that fuction and how to use it? Or how can i install kmod-rtl8187-4.14.131?

opkg info <package>

The second line will provide Version:


You haven't explained what you want to do with this information.

Use it for what?


I want to install kmod-rtl8187-4.1.131.But if i use 'opkg install rtl8187',it will install rtl-8187-4.14.209.
Someone tell me that i can write a function to find specified version package,but i don't know how to write functions in openwrt.

and i tried 'opkg info rtl8187' just now,but it doesn't work.

Should be kmod-rtl8187

To find that, do -

opkg list | grep rtl8187

Yes,you are right and it works.But it is kmod-rtl8187-4.14.209,i want to install kmod-rtl8187-4.14.131.I want to know how to install that version:4.14.131

But 4.14.131 and 4.14.209 are kernel versions, and you cannot install a package for a different kernel version that the one running your system. And no, you cannot install a different kernel version on your system, you have to install a new image with the right kernel version.

Before diving into how to create a new image, perhaps you could explain why you need to install a different version of a kernel module.


Thank you a lot.
The reason I want to install 4.14.131 is:
According to, only set 'mode' and 'channel' by hand can make it work, just like this:

Only set by hand can make it works, otherwise it shows "Wireless is disabled or not associated".
However, in 4.14.209, I can not set 'mode' in Luci.

That is why I want to install 4.14.131.
And I have prepared 3 images, tried for 3 times, but all failed.(In virtualbox)

This is my Luci, I can not set 'mode' any more.

What device are you using, and what version of OpenWrt?

I saw it. But I don't know how to use a self-defining function in openwrt. :sob:

You don't want to use that for a kmod package.

As @eduperez said, it won't work and why.

is 19.07.5
and I also tried 20.02.2 , but failed.

What "failed"? On what device?

I want to enable wireless in luci. But it shows 'Wireless is not associated'.

In virtualbox

Someone says that set by hand can make it work, but I have no 'mode' to set.
That's why I want to install 4.14.131 instead of 4.14.209.

Examples of UCI entries for mode (where radio0 is 5 GHz and radio1 is 2.4 GHz)



So you would do -

uci set wireless.radio0.htmode='VHT80'

uci set wireless.radio1.htmode='HT20'

Then -

uci commit

You mean I should set it in the configuration file ?

SSH in and run from the command line interface.

See examples of how UCI commands are used in setting up OpenWrt on VirtualBox -

I will have a try and reply to you later. Thanks a lot.