Digi board SoftAP Issue

When two digi boards are closer, even SoftAP names are different I could not connect either of the board. I was able to connect after changing the channel no in hostapd_wlan1.conf file, but Do we able to do something that board should be able to assign automatically by itself based on channel availability.

The channel is configured via config file. There is no auto mode. You have manually configure each board to an isolated channel to avoid collisions.

I had gone through hostapd.conf manaul page, there they mentioned that it is possible for the hostapd to choose/auto select the available channel,

Snap shot of hostapd manual page,
https://w1.fi/cgit/hostap/plain/hostapd/hostapd.conf
If CONFIG_ACS build option is enabled, the channel can be selected

automatically at run time by setting channel=acs_survey or channel=0, both of

which will enable the ACS survey based algorithm.

channel=1

ACS tuning - Automatic Channel Selection

So I compiled hostapd with “CONFIG_ACS” flag enabled, but boaord wifi name was not showing in the wifi client. It would be very much appreciated if you could help us on this,
Our requirement is, we have so many digi boards with us with different SSID name, but if we want to connect to any one of the board, we may have to switch off all other board which are closer to the board that we wanted to connect

Perhaps I do not understand the issue? Is the issue in that BSSID of all the different cc6ul boards is the same?
ifconfig wlan1
wlan1 Link encap:Ethernet HWaddr 02:03:7F:D7:00:01
You can set a unique BSSID via NVRAM variable

=> setenv wlan1addr 00:04:F3:07:3B:AB
=> saveenv

you may also need to set wlan2addr the same way instead.
This way all boards will have unique BSSID and there will be no conflicts.
Let me know if I get your issue wrong.

Sorry we don’t have an issue with BSSID name, I am talking about, SoftAP connection issue, when we have two Digi board closer to each other, we could not make connection until unless we keeping the channel number different in two board, now we are channel number number manually in “hoarapd_wlan1.conf” but there is a feature called Automatic Channel Selection (ACS)" in hostapd, we want to implement that in digi board, I would explain it clearly now,
Our requirement is, When we have multiple boards closer to each other, user/developer should be able to connect to any SoftAP, without any manual change in the hostapd_wlan1.conf every time.
Since we are using multiple boards, we could not connect Digi/custom board SoftAP, but even after changing SoftAP name to some unique name, we could not connect to SoftAP.
Finally we were able to connect to SoftAP, after keeping two different channel number in two different board in “hostapd_wlan1.conf” file, So rather changing this channel number manually every time in different board, It seems that there is feature in hostapd to automate this i.e “ACS tuning - Automatic Channel Selection”, we have enabled this feature by configuring “CONFIG_ACS=Y” in hostapd defconfig file and build was successfully compiled with this changes, Once this is done, the channel can be selected automatically at run time by setting channel=acs_survey or channel=0, in “hostapd_wlan1.conf”. but unfortunately when we run hostapd in target with new hostapd configuration, It threw en error message, we feel that “Automatic channel selection” feature is enabled in hostapd, but issue could be with ACS survey algorithm because it says that “ACS: Unable to collect survey data”, and we have also tried adding below two lines for ACS algorithm, it was available in hostapd manual page(https://w1.fi/cgit/hostap/plain/hostapd/hostapd.conf), but we end up with same error.
#acs_num_scans=5
#acs_chan_bias=1:0.8 6:0.8 11:0.8

Could you help us to get “Automatic Channel feature” works in our board. Please find attached log file for the reference. Please let us know if you need any addition information on this.

Logs:
root@ccimx6ulsbc:~# hostapd /etc/hostapd_wlan1.conf
Configuration file: /etc/hostapd_wlan1.conf
ACS: Automatic channel selection started, this may take a bit
wlan1: interface state UNINITIALIZED->ACS
wlan1: ACS-STARTED
ACS: Unable to collect survey data
ACS: All study options have failed
Interface initialization failed
wlan1: interface state ACS->DISABLED
wlan1: AP-DISABLED
ACS: Possibly channel configuration is invalid, please report this along with your config file.
ACS: Failed to start
wlan1: AP-DISABLED
hostapd_free_hapd_data: Interface wlan1 wasn’t started
nl80211: deinit ifname=wlan1 disabled_11b_rates=0
wlan1: interface state DISABLED->DISABLED
wlan1: interface state DISABLED->DISABLED
wlan1: AP-DISABLED
hostapd_free_hapd_data: Interface wlan1 wasn’t started

I’ve just found this question as we had the same issue. The underlying problem is that both boards will assign the same MAC (BSSID) for the AP interface on wlan1. The MAC needs to be unique per channel, just as it does for ethernet per LAN segment.

You can change the MAC for wlan1 by setting wlan2addr in U-Boot environment. Not wlan1addr as one might expect, that would be used for an ad hoc/P2P interface. If you don’t do this, then you will still have trouble if Auto Channel Selection gives the same channel number to two devices.

Any kudos here is really due to Digi support for the very rapid response, thanks guys !