Wifi exp board on legato21 (R15)

after investigating a little more it seems that the problem is with the missing hostapd:
/bin/hostapd: not found

this is what stops the wlan0 from being created and the errors with the i2c interface were only happening on attempting the cleanup

if you use the wifi card as client mode by “wifi client start” instead of using it as access point, can it work?

yes it does, I can use the wifi app to setup a client and to start it.
It does brings up the wlan0 interface.

you need to go to “meta-columbia-x/meta-columbia-x-public/recipes/images/mdm9x28-image-minimal.bbappend” and remove the following line and rebuild the yocto image
IMAGE_INSTALL_remove = "hostapd"

OR you can directly use the image of “swi-fx30-catm_4.0.0.beta” which uses
SDK for FX30-CATM (Release R15.0.2.001.BP2 + Legato 21.05.0)

beautiful, will give it a go thank you for the help!

Just have a try on “9999999_9907618_SWI9X06Y_02.36.08.02_00_GENERIC_001.077_000-full.spk” from the Leaf package “swi-fx30-catm_4.0.0.beta”, I can see “hostapd”

root@fx30:~# ls /bin/host*
/bin/hostapd /bin/hostapd_cli /bin/hostname


ati3
Manufacturer: Sierra Wireless, Incorporated
Model: WP7702
Revision: SWI9X06Y_02.36.08.02 c3f5ef jenkins 2021/09/07 08:00:51
IMEI: 352653090012345
IMEI SV:  6
FSN: VU735370312345
+GCAP: +CGSM

OK
ati8
Legato Ver: 21.05.0.0d38bc34_40288ac0b0ffed9ebe2ffce8ae730a91
Yocto Ver:  SWI9X06Y_03.00.03.00 2021-11-26_12:02:26
OS Ver: Linux version 4.14.253 (oe-user@oe-host) ( gcc version 9.3.0 (GCC), GNU ld (GNU Binutils) 2.34.0.20200220) #1 PREEMPT Fri Nov 26 09:52:28 UTC 2021
LK Ver: 1.3.0_1aea4d8ec8
RootFS Ver: SWI9X06Y_03.00.03.00 2021-11-26_12:02:26
UserFS Ver: unknown
MCU Ver: 002.015

OK

the problem is that we would rather try to solve the problem with the most recent release instead of chasing our tale on a previous one which we are not going to use.
The problem indeed seems related with the missing hostapd from the bin directory, and as you noted caused by this being removed when building the yocto project for the target.

@jyijyi the AP interface is up and running but we are now facing an issue with the bridging as we would like to use the device as a bridge between eth0 and wlan0 interfaces.
I see this has already been done and it works with the previous release R14 (LE19), but with the new release R15 (LE21) it seems that the bridging fails and I am not sure what is the reason for this.

wifiService[1438] | Configuration file: /tmp/hostapd.conf
wifiService[1438] | rfkill: Cannot open RFKILL control device
wifiService[1438] | nl80211: Failed to add interface wlan0 into bridge br0: Operation not supported

Now, for some reason the wifiService on the previous release R14 didn`t run this command, I thought it could be related to the new recipe version of hostapd or wpa_supplicant, so I have used the 2.6 version (R14) while this is the 2.9 version on the R15 release.
hostapd v2.6
wpa_supplicant v2.6

Still the problem persists and we can`t figure out what is the problem, any idea?
your help is much appreciated.

did you rebuild the yocto image to include the hostapd in R15?

yes the hostapd now is fine, we can bring up the wlan0 interface but we are having a problem with the bridging to eth0.

just to fill in with the whole logs, this is where it fails:
Nov 24 14:35:13 fx30 user.info Legato: INFO | wifiService[1439] | WIFIAP_HOSTAPD_START
Nov 24 14:35:13 fx30 user.info Legato: INFO | wifiService[1439] | Configuration file: /tmp/hostapd.conf
Nov 24 14:35:13 fx30 user.info Legato: INFO | wifiService[1439] | rfkill: Cannot open RFKILL control device
Nov 24 14:35:14 fx30 user.info Legato: INFO | wifiService[1439] | nl80211: Failed to add interface wlan0 into bridge br0: Operation not supported
Nov 24 14:35:14 fx30 user.info Legato: INFO | wifiService[1439] | nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Nov 24 14:35:14 fx30 user.info Legato: INFO | wifiService[1439] | nl80211 driver initialization failed.
Nov 24 14:35:14 fx30 user.info Legato: INFO | wifiService[1439] | wlan0: interface state UNINITIALIZED->DISABLED
Nov 24 14:35:14 fx30 user.info Legato: INFO | wifiService[1439] | wlan0: AP-DISABLED

in the start-up script is just passing the hostapd.conf to the hostapd, which is the same command for the old legato version as well.

WIFIAP_HOSTAPD_START)
echo “WIFIAP_HOSTAPD_START”
(/bin/hostapd /tmp/hostapd.conf -i${IFACE} - B) && exit 0

if we remove the first line from the hostapd.conf, the configuration works fine.

This is what the hostapd.conf looks like:
driver=nl80211
wmm_enabled=1
beacon_int=100
dtim_period=2
rts_threshold=2347
fragm_threshold=2346
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=AP_VU050687491510
channel=6
max_num_sta=10
country_code=US
ignore_broadcast_ssid=0
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
rsn_pairwise=CCMP
wpa_passphrase=xxxxxx
hw_mode=g

while if we add the first line to be:
bridge=br0
driver=nl80211
wmm_enabled=1
beacon_int=100
dtim_period=2
rts_threshold=2347
fragm_threshold=2346
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=AP_VU050687491510
channel=6
max_num_sta=10
country_code=US
ignore_broadcast_ssid=0
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
rsn_pairwise=CCMP
wpa_passphrase=xxxxxx
hw_mode=g

it will fail.

if we deploy the old version R14, it will work all right, so we basically rebuild the same apps with the older R14 release, the configuration file is:
bridge=br0
driver=nl80211
wmm_enabled=1
beacon_int=100
dtim_period=2
rts_threshold=2347
fragm_threshold=2346
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=AP_VU050687491510
channel=6
max_num_sta=10
country_code=US
ignore_broadcast_ssid=0
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
rsn_pairwise=CCMP
wpa_passphrase=xxxxxxx
hw_mode=g

and it brings up the interface without any problem.
we were wondering if you have seen this problem before and if you know if this is related to the drivers or hostapd version (which we have already tried to downgrade) and the wpa_supplicant (same)

we believe this is related to the drivers for the wl18xx but not sure where to look to be honest…

no idea, i have never gone so deep in the WIFI.
BTW, I guess you want to share WIFI data to ethernet, will you consider NAT?

well, yes if we can get what we need… :slight_smile:
how do you setup the NAT instead?
I think we did give it a try but didn`t go past that…

Here is a script for sharing cellular data (rmnet_data0) to ethernet interface (eth0) by NAT in FX30.
cfg_gateway_eth0_auto.sh (7.1 KB)

You might change it to share the wifi data (wlan0) to ethernet interface (eth0).

Other user says it should be working fine: