I am experiencing this problem, and another user here: WiFi client error on mangoOH Red - #2 by rauger1 is experiencing a similar problem. The wifi commands are not working as they are on the Mangoh Green, and returning:
ERROR:le_wifiAp_Start returns -6.
Here is the error log for the mangoh red when running “wifi ap start”:
Jan 4 23:23:21 swi-mdm9x15 user.debug Legato: DBUG | wifiService[524]/framework T=main | LE_FILENAME ExtractFileDescriptor() 33 | Received fd (10).
Jan 4 23:23:21 swi-mdm9x15 user.debug Legato: DBUG | wifiService[524]/framework T=main | LE_FILENAME ExtractFileDescriptor() 33 | Received fd (11).
Jan 4 23:23:21 swi-mdm9x15 user.info Legato: INFO | wifiService[524]/daemon T=main | pa_wifi_ap_ti.c pa_wifiAp_Start() 449 | AP starts
Jan 4 23:23:21 swi-mdm9x15 user.debug Legato: DBUG | wifiService[524]/framework T=main | LE_FILENAME le_mem_ForceAlloc() 841 | Memory pool ‘framework.DestructorObjs’ overflowed. Expanded to 6 blocks.
Jan 4 23:23:21 swi-mdm9x15 user.info Legato: INFO | wifiService[524]/daemon T=main | pa_wifi_ap_ti.c pa_wifiAp_Start() 463 | SSID = ryan
Jan 4 23:23:21 swi-mdm9x15 user.debug Legato: DBUG | wifiService[524]/framework T=WifiApPaThread | LE_FILENAME PThreadStartRoutine() 362 | Set nice level to 0.
Jan 4 23:23:21 swi-mdm9x15 user.debug Legato: DBUG | wifiService[524]/framework T=WifiApPaThread | LE_FILENAME le_mem_ForceAlloc() 841 | Memory pool ‘framework.DestructorObjs’ overflowed. Expanded to 7 blocks.
Jan 4 23:23:21 swi-mdm9x15 user.info Legato: INFO | wifiService[524]/daemon T=WifiApPaThread | pa_wifi_ap_ti.c WifiApPaThreadMain() 230 | Started!
Jan 4 23:23:21 swi-mdm9x15 user.info Legato: INFO | wifiService[524]/daemon T=WifiApPaThread | pa_wifi_ap_ti.c WifiApPaThreadMain() 247 | PARSING:WIFI_SET_EVENT : len:15
Jan 4 23:23:21 swi-mdm9x15 user.info Legato: INFO | wifiService[524] | WIFI_START Jan 4 23:23:22 swi-mdm9x15 user.err Legato: =ERR= | wifiService[524] | ERR failed to write i2c data** > Jan 4 23:23:22 swi-mdm9x15 user.err Legato: =ERR= | wifiService[524] | FTL Failed to enable PCA9548A I2C switch* > Jan 4 23:23:22 swi-mdm9x15 user.err Legato: =ERR= | wifiService[524]/daemon T=main | pa_wifi_ap_ti.c pa_wifiAp_Start() 484 | WiFi Access Point Command Failed: (23296)wlan0 WIFI_START > Jan 4 23:23:22 swi-mdm9x15 user.err Legato: =ERR= | wifiService[524]/daemon T=main | pa_wifi_ap_ti.c pa_wifiAp_Start() 614 | WiFi Client Command Failed: As a result, configuration file (/tmp/hostapd.conf) is removed.
Jan 4 23:23:22 swi-mdm9x15 user.debug Legato: DBUG | wifiService[524]/framework T=main | le_wifiAp_server.c Handle_le_wifiAp_Start() 557 | Sending response to client session 0x27cac : 4 bytes sent
Jan 4 23:23:22 swi-mdm9x15 user.debug Legato: DBUG | wifiService[524]/daemon T=main | le_wifiClient.c CloseSessionEventHandler() 414 | sessionRef 0x27d3c GetFirstSessionRef (nil)
Jan 4 23:23:22 swi-mdm9x15 user.debug Legato: DBUG | wifiService[524]/framework T=main | le_wifiClient_server.c CleanupClientData() 195 | Client 0x27d3c is closed !!!
Jan 4 23:23:22 swi-mdm9x15 user.debug Legato: DBUG | wifiService[524]/framework T=main | le_wifiAp_server.c CleanupClientData() 195 | Client 0x27cac is closed !!!
Is there another support avenue to address this issue since we are all encountering this issue on MangOH Red? Also I have questions on USB cellular connections over USB using connman that the community isn’t able to answer or help resolve. Does MangOH provide support for their products beyond the community when they fail to work as advertised? And what and where is this support? MangOH we natives are restless and need assistance!
So, I saw something new. After the ‘wifi ap start’ command, logread is re-populated constantly, multiple times a second, with this recurring message below. I have no idea why it is doing this, or what it indicates, but I imagine it is related:
Jan 6 00:01:11 swi-mdm9x15 user.info kernel: [ 61.830978] gpio_sync_ri: RI owner is Modem
Jan 6 00:01:11 swi-mdm9x15 user.debug kernel: [ 61.834182] ->gpio16 = 0
Jan 6 00:01:11 swi-mdm9x15 user.debug kernel: [ 61.834182] ->gpio17 = 0
Jan 6 00:01:11 swi-mdm9x15 user.debug kernel: [ 61.834213] ->gpio18 = 0
Jan 6 00:01:11 swi-mdm9x15 user.debug kernel: [ 61.834213] ->gpio19 = 0
Jan 6 00:01:11 swi-mdm9x15 user.debug kernel: [ 61.834274] gpio-80 (sysfs): gpiod_request: status -16
Jan 6 00:01:11 swi-mdm9x15 user.debug kernel: [ 61.834274] export_store: status -16
I have updated logs - I updated the board to legato 17.10 and ran ‘wifi ap start’ again. The issue is persistent. While the board and commands work on the mangoh green, it fails on the mangoh red. Is there anything in the logs that gives you a hint at the error?
Thank you for your help in advance!
Jan 6 00:25:01 swi-mdm9x15 user.debug Legato: DBUG | wifiService[580]/framework T=main | LE_FILENAME ExtractFileDescriptor() 34 | Received fd (11).
Jan 6 00:25:01 swi-mdm9x15 user.debug Legato: DBUG | wifiService[580]/framework T=main | LE_FILENAME ExtractFileDescriptor() 34 | Received fd (12).
Jan 6 00:25:01 swi-mdm9x15 user.info Legato: INFO | wifiService[580]/daemon T=main | pa_wifi_ap_ti.c pa_wifiAp_Start() 453 | AP starts
Jan 6 00:25:01 swi-mdm9x15 user.debug Legato: DBUG | wifiService[580]/framework T=main | LE_FILENAME le_mem_ForceAlloc() 841 | Memory pool ‘framework.DestructorObjs’ overflowed. Expanded to 6 blocks.
Jan 6 00:25:01 swi-mdm9x15 user.info Legato: INFO | wifiService[580]/daemon T=main | pa_wifi_ap_ti.c pa_wifiAp_Start() 467 | SSID = ryan
Jan 6 00:25:01 swi-mdm9x15 user.debug Legato: DBUG | wifiService[580]/framework T=WifiApPaThread | LE_FILENAME PThreadStartRoutine() 362 | Set nice level to 0.
Jan 6 00:25:01 swi-mdm9x15 user.debug Legato: DBUG | wifiService[580]/framework T=WifiApPaThread | LE_FILENAME le_mem_ForceAlloc() 841 | Memory pool ‘framework.DestructorObjs’ overflowed. Expanded to 7 blocks.
Jan 6 00:25:01 swi-mdm9x15 user.info Legato: INFO | wifiService[580]/daemon T=WifiApPaThread | pa_wifi_ap_ti.c WifiApPaThreadMain() 234 | Started!
Jan 6 00:25:01 swi-mdm9x15 user.info Legato: INFO | wifiService[580] | WIFI_START
Jan 6 00:25:01 swi-mdm9x15 user.info Legato: INFO | wifiService[580]/daemon T=WifiApPaThread | pa_wifi_ap_ti.c WifiApPaThreadMain() 251 | PARSING:WIFI_SET_EVENT : len:15
Jan 6 00:25:01 swi-mdm9x15 user.err Legato: =ERR= | wifiService[580] | ERRfailed to write i2c data*
Jan 6 00:25:01 swi-mdm9x15 user.err kernel: [ 1346.986784] qup_i2c qup_i2c.0: QUP: I2C status flags :0x1343c8, irq:187
Jan 6 00:25:01 swi-mdm9x15 user.err kernel: [ 1346.992552] qup_i2c qup_i2c.0: I2C slave addr:0x71 not connected
Jan 6 00:25:01 swi-mdm9x15 user.err Legato: =ERR= | wifiService[580] | FTL Failed to enable PCA9548A I2C switch
Jan 6 00:25:02 swi-mdm9x15 user.err kernel: [ 1348.108072] qup_i2c qup_i2c.0: QUP: I2C status flags :0x1300c8, irq:187
Jan 6 00:25:02 swi-mdm9x15 user.err Legato: =ERR= | wifiService[580] | ERR failed to write i2c data
Jan 6 00:25:02 swi-mdm9x15 user.err kernel: [ 1348.114512] qup_i2c qup_i2c.0: I2C slave addr:0x71 not connected
Jan 6 00:25:02 swi-mdm9x15 user.err Legato: =ERR= | wifiService[580] | FTL* Failed to enable PCA9548A I2C switch
Jan 6 00:25:02 swi-mdm9x15 user.err kernel: [ 1348.190691] qup_i2c qup_i2c.0: QUP: I2C status flags :0x1300c8, irq:187
Jan 6 00:25:02 swi-mdm9x15 user.err kernel: [ 1348.196337] qup_i2c qup_i2c.0: I2C slave addr:0x71 not connected
Jan 6 00:25:02 swi-mdm9x15 user.err Legato: =ERR= | wifiService[580] | ERR* failed to write i2c data
Jan 6 00:25:02 swi-mdm9x15 user.err Legato: =ERR= | wifiService[580] | FTL* Failed to enable PCA9548A I2C switch
Jan 6 00:25:02 swi-mdm9x15 user.err Legato: =ERR= | wifiService[580]/daemon T=main | pa_wifi_ap_ti.c pa_wifiAp_Start() 488 | WiFi Access Point Command Failed: (23296)wlan0 WIFI_START
Jan 6 00:25:02 swi-mdm9x15 user.err Legato: =ERR= | wifiService[580]/daemon T=main | pa_wifi_ap_ti.c pa_wifiAp_Start() 618 | WiFi Client Command Failed: As a result, configuration file (/tmp/hostapd.conf) is removed.
Jan 6 00:25:02 swi-mdm9x15 user.debug Legato: DBUG | wifiService[580]/daemon T=main | le_wifiClient.c CloseSessionEventHandler() 414 | sessionRef 0x27ce4 GetFirstSessionRef (nil)
Jan 6 00:25:02 swi-mdm9x15 user.debug Legato: DBUG | wifiService[580]/framework T=main | le_wifiClient_server.c CleanupClientData() 139 | Client 0x27ce4 is closed !!!
Jan 6 00:25:02 swi-mdm9x15 user.debug Legato: DBUG | wifiService[580]/framework T=main | le_wifiAp_server.c CleanupClientData() 139 | Client 0x27d74 is closed !!!
the issue is that the gpio used to control wifi reset is different for red and green. We will provide you the changes you need to do on wifinitscript file next week. Are you using WP76? @dclark75 lets wall him through on Monday/Tuesday.
I’m using a wp85 for both the Red and Green, but I could find a wp76 around here. Changes need to be made in the wifiinitscript - what is the name of that script in the mangoh directory?
I sincerely appreciate your willingness to work with me through this and the time you all are taking to address our issues, it goes a long way!
TI wireless wl18xx specific applications start or stop here
TI WIFI IoT board is managed by SDIO/MMC bus. Some signals need to be set
and managed before the SDIO/MMC module is inserted.
TI WIFI IoT conflicts with others devices using the SDIO/MMC bus
export PATH=$PATH:/usr/bin:/bin:/usr/sbin:/sbin
ti_wifi_start() {
# Add mdev rule for crda
grep crda /etc/mdev.conf > /dev/null
if [ $? -ne 0 ]; then
echo “$COUNTRY=… root:root 0660 */sbin/crda” >> /etc/mdev.conf
fi
lsmod | grep wlcore >/dev/null
if [ $? -ne 0 ]; then
# Check if MMC/SDIO module is inserted. Because WIFI use SDIO/MMC bus
# we need to remove the SDIO/MMC module
lsmod | grep msm_sdcc >/dev/null
if [ $? -eq 0 ]; then
grep -q mmcblk /proc/mounts
if [ $? -ne 0 ]; then
rmmod msm_sdcc
else
false
fi
if [ $? -ne 0 ]; then
# Unable to remove. May be others devices use SDIO/MMC bus
echo "!!!"
echo "Unable to remove the SDIO/MMC module… May be in use ?"
echo "Please, free all SDIO/MMC devices before using TI WIFI."
echo "!!!"
exit 127
fi
fi
# SDIO mux select IOT card by writing 0 to gpio expander offset 9
# Enable GPIO expander port of i2c switch
i2cset -y 0 0x71 0x04
# Reset the GPIO expander
i2cset -y 0 0x3e 0x7d 0x12
i2cset -y 0 0x3e 0x7d 0x34
# Set output to low for offset 9
i2cset -y -m 0x02 0 0x3e 0x10 0x00
# Set direction to output by performing masked write of 0 to bit 1 of RegDirB
i2cset -y -m 0x02 0 0x3e 0x0e 0x00
# Set IOT0_GPIO2 = 1 (WP GPIO13)
[ -d /sys/class/gpio/gpio13 ] || echo 13 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio13/direction
echo 1 > /sys/class/gpio/gpio13/value
# Set IOTO_RESET = 1 (WP GPIO2)
[ -d /sys/class/gpio/gpio2 ] || echo 2 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio2/direction
echo 1 > /sys/class/gpio/gpio2/value
# Set IOT0_GPIO4 = 1 (WP GPIO8)
[ -d /sys/class/gpio/gpio8 ] || echo 8 >/sys/class/gpio/export
echo out >/sys/class/gpio/gpio8/direction
echo 1 >/sys/class/gpio/gpio8/value
modprobe msm_sdcc || exit 127
modprobe wlcore || exit 127
modprobe wlcore_sdio || exit 127
modprobe wl18xx || exit 127
fi
sleep 5
ifconfig -a | grep wlan0 >/dev/null
if [ $? -ne 0 ] ; then
echo "Failed to start TI wifi"; exit 127
fi
ifconfig wlan0 up >/dev/null
if [ $? -ne 0 ] ; then
echo "Failed to start TI wifi"; exit 127
fi
}
ti_wifi_stop() {
ifconfig | grep wlan0 >/dev/null
if [ $? -eq 0 ]; then
ifconfig wlan0 down
fi
lsmod | grep wlcore >/dev/null
if [ $? -eq 0 ]; then
rmmod wl18xx || exit 127
rmmod wlcore_sdio || exit 127
rmmod wlcore || exit 127
rmmod mac80211 || exit 127
rmmod cfg80211 || exit 127
rmmod compat || exit 127
I installed legato release 14(16.10.3) for the wp85 :
root@swi-mdm9x15:~# fwupdate query
Connecting to service …
Firmware Version: SWI9X15Y_07.12.09.00 r34123 CARMD-EV-FRMWR1 2017/04/26 23:34:19
Bootloader Version: SWI9X15Y_07.12.09.00 r34123 CARMD-EV-FRMWR1 2017/04/26 23:34:19
Linux Version: 3.14.29ltsi-961ca71325_ab5094eade #2 PREEMPT Thu Apr 27 02:17:10 PDT 2017
root@swi-mdm9x15:~# legato version
16.10.3_a53df126993341d9868f9957ab7b1184
Then I copied the script you sent me to /etc/init.d/tiwifi , and ran the following command:
root@swi-mdm9x15:~# cp wifi_cmds.sh /etc/init.d/tiwifi
root@swi-mdm9x15:~# chmod +x /etc/init.d/tiwifi
root@swi-mdm9x15:~# wifi ap setssid “RAUGER1”
SSID set successfully.
root@swi-mdm9x15:~# wifi ap start
ERROR:le_wifiAp_Start returns -6.
root@swi-mdm9x15:~# wifi ap setssid “RAUGER1”
SSID set successfully.
root@swi-mdm9x15:~# wifi ap setchannel 1
Channel set to 1.
root@swi-mdm9x15:~# wifi ap setsecurityproto 1
Security protocol set to 1.
root@swi-mdm9x15:~# wifi ap setpassphrase “SIERRA_WIFI”
Passphrase set.
root@swi-mdm9x15:~# wifi ap setdiscoverable 1
Discoverable set to 1.
root@swi-mdm9x15:~# wifi ap setmaxclients 5
Max number of clients set to 5.
root@swi-mdm9x15:~# wifi ap start
ERROR:le_wifiAp_Start returns -6.
logread:
Feb 7 18:17:19 swi-mdm9x15 user.debug Legato: DBUG | wifiService[568]/framework T=main | LE_FILENAME ExtractFileDescriptor() 33 | Received fd (10).
Feb 7 18:17:19 swi-mdm9x15 user.debug Legato: DBUG | wifiService[568]/framework T=main | LE_FILENAME ExtractFileDescriptor() 33 | Received fd (11).
Feb 7 18:17:19 swi-mdm9x15 user.info Legato: INFO | wifiService[568]/daemon T=main | pa_wifi_ap_ti.c pa_wifiAp_Start() 449 | AP starts
Feb 7 18:17:19 swi-mdm9x15 user.debug Legato: DBUG | wifiService[568]/framework T=main | LE_FILENAME le_mem_ForceAlloc() 841 | Memory pool ‘framework.DestructorObjs’ overflowed. Expanded to 6 blocks.
Feb 7 18:17:19 swi-mdm9x15 user.info Legato: INFO | wifiService[568]/daemon T=main | pa_wifi_ap_ti.c pa_wifiAp_Start() 463 | SSID = RAUGER1
Feb 7 18:17:19 swi-mdm9x15 user.debug Legato: DBUG | wifiService[568]/framework T=WifiApPaThread | LE_FILENAME PThreadStartRoutine() 362 | Set nice level to 0.
Feb 7 18:17:19 swi-mdm9x15 user.debug Legato: DBUG | wifiService[568]/framework T=WifiApPaThread | LE_FILENAME le_mem_ForceAlloc() 841 | Memory pool ‘framework.DestructorObjs’ overflowed. Expanded to 7 blocks.
Feb 7 18:17:19 swi-mdm9x15 user.info Legato: INFO | wifiService[568]/daemon T=WifiApPaThread | pa_wifi_ap_ti.c WifiApPaThreadMain() 230 | Started!
Feb 7 18:17:19 swi-mdm9x15 user.info Legato: INFO | wifiService[568] | WIFI_START
Feb 7 18:17:19 swi-mdm9x15 user.info Legato: INFO | wifiService[568]/daemon T=WifiApPaThread | pa_wifi_ap_ti.c WifiApPaThreadMain() 247 | PARSING:WIFI_SET_EVENT : len:15
Feb 7 18:17:24 swi-mdm9x15 user.info Legato: INFO | wifiService[568] | Failed to start TI wifi Feb 7 18:17:24 swi-mdm9x15 user.err Legato: =ERR= | wifiService[568]/daemon T=main | pa_wifi_ap_ti.c pa_wifiAp_Start() 484 | WiFi Access Point Command Failed: (23296)wlan0 WIFI_START Feb 7 18:17:24 swi-mdm9x15 user.err Legato: =ERR= | wifiService[568]/daemon T=main | pa_wifi_ap_ti.c pa_wifiAp_Start() 614 | WiFi Client Command Failed: As a result, configuration file (/tmp/hostapd.conf) is removed.
Feb 7 18:17:24 swi-mdm9x15 user.debug Legato: DBUG | wifiService[568]/framework T=main | le_wifiAp_server.c Handle_le_wifiAp_Start() 557 | Sending response to client session 0x27d3c : 4 bytes sent
Feb 7 18:17:24 swi-mdm9x15 user.debug Legato: DBUG | wifiService[568]/daemon T=main | le_wifiClient.c CloseSessionEventHandler() 414 | sessionRef 0x27cac GetFirstSessionRef (nil)
Feb 7 18:17:24 swi-mdm9x15 user.debug Legato: DBUG | wifiService[568]/framework T=main | le_wifiClient_server.c CleanupClientData() 195 | Client 0x27cac is closed !!!
Feb 7 18:17:24 swi-mdm9x15 user.debug Legato: DBUG | wifiService[568]/framework T=main | le_wifiAp_server.c CleanupClientData() 195 | Client 0x27d3c is closed !!!
Is there anything that pops out to you that I could be doing wrong?
@rauger can you try this - reboot board and do a dmesg -c to clear kernel logs - then try /sbin/ifup wlan0 - and see if this command succeeds - double check by seeing if the wlan0 interface shows up using ifconfig. If you see it fails can u do another dmesg -c and paste output here.
Here is the setup in case you’re wondering. When i set the required fields for wifi_ap, I still receive the -6 error and logread outputs the same. But dmesg -c doesnt show anything…:
root@swi-mdm9x15:~# /sbin/ifup wlan0
Failed to start TI wifi
root@swi-mdm9x15:~# dmesg -c
root@swi-mdm9x15:~#
@rauger in addition tried the wifi ap commands shown below - although FYI when i set up an AP i usually use the web application. This involves starting the wifiWebAp legato application and then I use a web browser with the url 192.168.2.2:8080.
root@swi-mdm9x15:~# wifi ap setssid "RAUGER1"
SSID set successfully.
root@swi-mdm9x15:~# wifi ap start
starting…
root@swi-mdm9x15:~# wifi ap setssid "RAUGER1"
SSID set successfully.
root@swi-mdm9x15:~# wifi ap setchannel 1
Channel set to 1.
root@swi-mdm9x15:~# wifi ap setsecurityproto 1
Security protocol set to 1.
root@swi-mdm9x15:~# wifi ap setpassphrase "SIERRA_WIFI"
Passphrase set.
root@swi-mdm9x15:~# wifi ap setdiscoverable 1
Discoverable set to 1.
root@swi-mdm9x15:~# wifi ap setmaxclients 5
Max number of clients set to 5.
root@swi-mdm9x15:~# wifi ap start
starting…
root@swi-mdm9x15:~# ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr 80:30:DC:05:4A:10
inet6 addr: fe80::8230:dcff:fe05:4a10/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:792 (792.0 B)