OpenWrt router as a Wi-Fi adapter

I am writing to know if it is possible to use a router (on which OpenWrt is installed, of course) with the same features of a Wi-Fi adapter, such as those that connect to the PC via USB cable or as if it were just a network card inside the computer.
By doing so I could take advantage of the fairly good antennas of my router as if they were directly connected to the PC, without having to buy a separate Alfa Wi-Fi adapter which would still be less valid than my router.
To understand: typing "iwconfig" from the terminal (on PC), I would like to be able to see wlan0, that is the Wi-Fi card of my laptop, and wlan1, that would be the router in fact.

you could, but probably not via USB, but using an ethernet cable ...

Even if my router has a USB output?
How could I proceed? Do I have to create a special wireless interface?

yes, both ports are USB hosts, and they're not designed to talk to each other.

you go to wifi -> scan -> join, and connect to your existing wireless, then connect your computer to the router via cable.

another option is to retransmit the wifi using the same, or the 2nd radio, in your router, to the computer.

That also means double routing, double NAT, and possible IP range conflits ?

Range/subnet conflict could happen, but it's easily resolvable.

But it depends on which solution you go for.

This is the "best" solution, but requires more work -

Wifi -> scan -> join, the simplest.

You can read more about the two in Howto configure as client

1 Like

That was a rethorical question to inform @xV2eDquhX3442b9aLewS that further settings are required. I already knew your answers. :wink:

First of all thanks for your answers.
I have read the links that you have attached and, although I have not fully went deep and fully understood, I would like to say that I have probably explained myself badly.
What I am trying to do is not create a Wi-Fi extender, a repeater or a bridge. What I want to do is to be able to use my router as if it were my PC's internal Wi-Fi card (rather than having to specifically buy one like this one).
If you type iwconfig from the terminal (Linux), the internal Wi-Fi card of a PC is shown (usually one): well, I would like to be able to make sure that the router is recognized as a second internal Wi-Fi card of the PC and that therefore it is shown by this command (or a similar command, is not the fundamental point).

No, OpenWrt can not do that.

Edit: ... hmmm, on second thought, it might.

1 Like

you already received a no to that question, three days ago ...

That's exactly what I meant.
I wasn't sure if it could be done, but I wanted to ask the same because in the end I thought that the hardware of a router is not very (probably very little) different from that of a plug-n-play USB Wi-Fi adapter.
Still thanking you all for your help, I ask you: it could not even be done if I found a way not to consider OpenWrt and its features, but by finding a way to connect "directly" only the antennas of the router to the laptop, for example making them communicate via Ethernet cable?
I'm throwing it there, but I'm probably talking nonsense.

Forgive me, I missed it: where?

scroll up ?

It seems clear to me that if I ask you "where" it means that then I did not understand your answer, not that I actually missed a "no" (which by the way I still don't see).
That said, you suggested that I try joining an existing network via the router, making a Wi-Fi extender, making a bridge, etc. but my request did not concern any of these matters.

here .... ?

No no, of course, I don't pretend that anything can be made to communicate with another that it has nothing to do with, simply because you can connect a cable to both. But I tried to ask, because maybe in this case there was a way, precisely because of the similarity of the hardware between a router and a Wi-Fi adapter.
Thank you very much anyway!

Am I wrong or did your "no" in that message refer to the USB connection only? Right above you wrote to me that it could probably be done via an ethernet cable... That's not a "no" in absolute terms then. Consequently, it seems to me entirely legitimate that I continue to ask and do not stop at your "no", which honestly in my eyes has the weight of that of anyone else because I do not know you: you can be a network engineer, or you can be any idiot (and from the level of arrogance that transpire from so few of your messages, I would say the second).

Key word here is "Router"
Secondary is "OpenWrt"
Tertiary is "adapter"

Router's have to be configured within their own software.
OpenWrt is this software that programs the adapter's settings.
The adapter on the router is not a plug-n-play device.

Shame on me, I actually forgot about "gadget mode". Some OpenWrt devices -- not all of them, but some -- can use the kmod-usb-gadget-eth kernel mod to emulate an USB ethernet device.

I don't have any experience doing that or setting it up, though, and documentation is very scarce. And wiring that up may end up a bit tricky, I'm sure they exist and are readily available, but I actually never held a USB-A to USB-A cable in hands.

1 Like

Man I love learning new things!!!