How to set wifi interface to ap mode?

I am testing a wifi chip with AP+AP+STA concurrency mode on hikey960 board. Now with the settings->wifi, I can enable AP+STA concurrency feature. I don’t know how to deal with the other AP interface.

First, the other interface is STA mode, how to set it to AP mode. No iwconfig command on hikey960 system.
Second, how to connect to it?

Anyone can help?

Thanks.

@jasmine8gu

I am don’t know much about the combination of modes in your post.
Also not sure about the support from driver side.

But you can get the iwconfig source from wireless-tools package.
https://hewlettpackard.github.io/wireless-tools/Tools.html
Latest release - https://hewlettpackard.github.io/wireless-tools/wireless_tools.29.tar.gz

I just tried to cross build it statically as follows.

$ make BUILD_STATIC='y' LDFLAGS='-static' CC=aarch64-linux-gnu-gcc
$ file iwconfig
iwconfig: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, for GNU/Linux 3.7.0,

I think you can ‘adb push’, give execute permission to the binary file and run it on target board.

chmod +x iwconfig (for execute permission)
./iwconfig -h (for help)

AOSP may have some permission issue in certain locations I believe.(Like it has some partitions mounted as read only etc.)

In debian, you can just copy to /tmp and execute.

Thanks for your solution. I tried this way. After push iwconfig, it showed all interfaces as “no wireless extensions.”, any idea about this?

Thanks.

Oh, mine is dynamically linked. Let me try static link way.

I don’t think static or dynamic has anything to do with it.
I suggested static build first to avoid any dependency issues if any.

I can also see the same message in my Ubuntu host PC.
It is correct in my case. First is Ethernet. I don’t have a wifi device.

 sreenad@linux:~/Downloads/iwconfig/wireless_tools.29$ ./iwconfig 
    enp0s31f6  no wireless extensions.

    lo        no wireless extensions.

As I don’t have hikey960 board with me now I cannot check it.

I found the below link.
Just check.
https://discuss.96boards.org/t/how-to-bring-up-wireless-through-command-line-in-ubuntu/2643/11

Went through the link.
It mentioned two solutions:
nmcli – hikey960 doesn’t have this in the system
firmware – I guess iwconfig couldn’t find my customized firmware path, tried mkdir /lib/firmware, and copied my chip bin into it. Still not working.

Any way, my AP+AP mode works now. Won’t research this way further.

Thanks very much for all your help.

For anyone who visit this post, hostapd support multiple APs.

# hostapd /data/vendor/wifi/hostapd/hostapd1.conf /data/vendor/wifi/hostapd/hostapd2.conf

#iw def
you can see two interfaces change mode to AP mode

Then start two hostapd_cli to connect to both hostapd processes to test all the features.

Then you can connect your devices to both APs.

ok I understood what you were trying to do.
You wanted to create two APs from the hikey960. One on 2.4Ghz and other on 5Ghz.
But is it possible to work as AP+AP+STA ?

Because the onboard wifi is dual band I believe.

Or do you have another chip?

Anyways you got it working.
Great👍.

Yes, we have another wifi chip - cypress dual band chip.

It support AP+AP+STA mode. Till now, AP+AP mode worked, but AP+AP+STA not working yet. I am trying to figure out why. Looks like it’s framework layer configuration issue.

The hikey board chip support AP or STA mode, but doesn’t support AP+STA concurrency mode.

Thanks for your reply.

Regards.