connect two WiFi simultaneously
Q:
I am trying to add a virtual wireless interface to my debian squeeze system using iw.
The output of iw list is shown below:
root@alix:~# iw list
Wiphy phy0
I am using the command:
iw dev phy0 interface add wlan1 type station
to add the virtual interface wlan1 however this gives me the error:
command failed: No such device (-19)
If I use the command:
iw dev wlan0 interface add wlan1 type station
it passes fine however if I try use both wlan0 and wlan1 I get an error saying neither are unique and so that doesn't work for me.
Anyone any ideas what could be causing this? Thanks
=======================================================================================
A:
About the first error you get ("command failed: No such device (-19)"): You can either use
iw phy phy0 interface add <name> type <type>
or
iw dev wlan0 interface add <name> type <type>
As long as the physical names and the device names don't clash, you can also omit the phy/dev keywords and simply use
iw phy0 interface add <name> type <type>
About using both interfaces at the same time and the message about them not being unique:
This is probably because they both use the same MAC address. You can try to change the MAC address of the new interface before activating it.
ip link set dev <dev-name> address <new-mac-address>
A word about your interface modes:
My iw command (v3.4) says
Valid interface types are: managed, ibss, monitor, mesh, wds.
Not sure what "station" will do.
Also, if you're trying to operate the two interfaces in different modes, make sure your wlan card supports this:
iw list
[...]
Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* WDS
* monitor
* mesh point
software interface modes (can always be added):
* AP/VLAN
* monitor
interface combinations are not supported
Notice the last line.
=======================================================================================
A:
iw dev <devname> interface add wlan1 type station
phy0
here in iw dev phy0 interface add wlan1 type station
is a phyname, so you need change it to
wlan0
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通