Hello!

I don't think you've understood the situation. I do understand how interfaces 
are added in the system, and I do have two wireless interfaces on my system - 
wlan0 and wlan1. Both are tested and working.
Wpa_supplicant supports managing multiple wireless cards simultaneously - there 
are fancy command line switches for it and so on. There's a "interface_add" 
command which can be passed to a running wpa_supplicant instance which is 
already managing one card, and that command tells it it has one more interface 
to manage. From what I've understood, wpa_cli accepts this command, passes it 
through a control socket to a running wpa_supplicant instance and receives an 
"UNKNOWN COMMAND" reply message for some reason. That's the problem I'm dealing 
with.

Best regards,
Arsenijs.

I'm trying to add an interface (already added to the system),
05.04.2016, 07:58, "Stefan Lippers-Hollmann" <s....@gmx.de>:
>  Hi
>
>  On 2016-04-05, Pičugins Arsenijs wrote:
>>   Package: wpa
>>   Version: 2.3
>>
>>   I want to use wpa_cli to add/remove a wireless interface to a running 
>> wpa_supplicant instance. I try to use "wpa_cli interface_add wlan1" and it 
>> prints out "UNKNOWN COMMAND". Same if I use wpa_cli command line. If I use 
>> "interface_add" without arguments, it asks me to use at least one argument. 
>> If I use "wpa_cli interface_list", it doesn't print out any interface (which 
>> is weird, since "wpa_cli interface" prints an interface which was supplied 
>> to wpa_supplicant by /etc/network/interfaces using wpa_conf directive).
>>   I grepped through wpa 2.3 source and this message appears in 
>> wpa_supplicant ctrl_iface.c file, but I can't quite figure out what are the 
>> circumstances when it is returned as a reply.
>>
>>   I am using Debian GNU/Linux 8.0, kernel 4.1.19-v7+ and glibc6 2.4. It's 
>> Raspbian, if that's important. I can check it on a Debian PC if necessary.
>
>  You can't add an "interface", that's a given based on your hardware/
>  respectively the kernel (ignoring virtual interfaces for a moment),
>  you can only add a network. Use the interactive mode of wpa_cli to get
>  accustomed to it (it has a decent help interface and tab expansion,
>  not to forget its manpage), but in short:
>
>>   add_network
>
>  7
>>   set_network 7 ssid "foo"
>
>  OK
>>   set_network 7 psk "secretpassphrase"
>
>  OK
>>   enable_network 7
>
>  OK
>>   save_config
>
>  OK
>
>  Regards
>          Stefan Lippers-Hollmann

Reply via email to