# Debugging IoT wifi module

**URL:** <https://forum.legato.io/t/debugging-iot-wifi-module/2587>\
**Category:** Legato Linux distribution (Yocto project)\
**Created:** [August 7, 2017, 10:16pm UTC](https://forum.legato.io/t/debugging-iot-wifi-module/2587 "2017-08-07T22:16:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![opoei](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/opoei/32/238_2.png) [@opoei](https://forum.legato.io/u/opoei)\
**Post date:** [August 7, 2017, 10:16pm UTC](https://forum.legato.io/t/debugging-iot-wifi-module/2587/1 "2017-08-07T22:16:56Z")

</div>

Hello,

Hoping someone will have a suggestion for me in regards to the WL18xx on Legato/Yocto.

This is my current version info on a FX30 (WP85xx)

Legato Version: 17.06.0\_f83005aa5145d934e8e282fffc8f7f25\_modified  
Firmware Version: SWI9X15Y\_07.11.22.00 r33729 CARMD-EV-FRMWR1 2017/01/11 18:04:06  
Bootloader Version: SWI9X15Y\_07.11.22.00 r33729 CARMD-EV-FRMWR1 2017/01/11 18:04:06  
Linux Version: 3.14.29ltsi-a00e464379\_3f15cd39ad #2 PREEMPT Mon Feb 20 11:11:17 PST 2017

Following the mangoh docs, I should have high enough versions to support the wl18xx module.

dmesg tells me:

> [0.395299] wl18xx board initialization done

however, if I try wifi client scan I get:

> root@fx30:~# wifi client start  
> successfully called start.  
> root@fx30:~# wifi client scan  
> starting scan  
> DEBUG: le\_wifiClient\_GetFirstAccessPoint ERROR

logread gives me:

> [@](#):
>
> Jan 6 01:20:13 fx30 user.debug Legato: DBUG | wifiService[580]/daemon T=main | le\_wifiClient.c le\_wifiClient\_Start() 560 | Client starts  
> Jan 6 01:20:13 fx30 user.debug Legato: DBUG | wifiService[580]/framework T=main | le\_wifiClient\_server.c Handle\_le\_wifiClient\_Start() 512 | Sending response to client session 0x27d6c : 4 bytes sent  
> Jan 6 01:20:14 fx30 user.debug Legato: DBUG | wifiService[580]/daemon T=main | le\_wifiClient.c CloseSessionEventHandler() 414 | sessionRef 0x27d6c GetFirstSessionRef (nil)  
> Jan 6 01:20:14 fx30 user.debug Legato: DBUG | wifiService[580]/framework T=main | le\_wifiClient\_server.c CleanupClientData() 126 | Client 0x27d6c is closed !!!  
> Jan 6 01:20:14 fx30 user.debug Legato: DBUG | wifiService[580]/framework T=main | le\_wifiAp\_server.c CleanupClientData() 126 | Client 0x27cdc is closed !!!  
> Jan 6 01:21:47 fx30 user.debug Legato: DBUG | wifiService[580]/framework T=main | LE\_FILENAME ExtractFileDescriptor() 34 | Received fd (11).  
> Jan 6 01:21:47 fx30 user.debug Legato: DBUG | wifiService[580]/framework T=main | LE\_FILENAME ExtractFileDescriptor() 34 | Received fd (15).  
> Jan 6 01:21:48 fx30 user.debug Legato: DBUG | wifiService[580]/framework T=main | LE\_FILENAME le\_mem\_ForceAlloc() 841 | Memory pool ‘.le\_wifiClient\_ServerData’ overflowed. Expanded to 1 blocks.  
> Jan 6 01:21:48 fx30 user.debug Legato: DBUG | wifiService[580]/daemon T=main | le\_wifiClient.c le\_wifiClient\_AddNewEventHandler() 508 | Add new event handler  
> Jan 6 01:21:48 fx30 user.debug Legato: DBUG | wifiService[580]/framework T=main | le\_wifiClient\_server.c Handle\_le\_wifiClient\_AddNewEventHandler() 401 | Sending response to client session 0x27cdc : 4 bytes sent  
> Jan 6 01:21:48 fx30 user.debug Legato: DBUG | wifiService[580]/daemon T=main | le\_wifiClient.c IsScanRunning() 430 | IsScanRunning .0  
> Jan 6 01:21:48 fx30 user.debug Legato: DBUG | wifiService[580]/daemon T=main | le\_wifiClient.c le\_wifiClient\_Scan() 639 | Scan started  
> Jan 6 01:21:48 fx30 user.debug Legato: DBUG | wifiService[580]/framework T=main | le\_wifiClient\_server.c Handle\_le\_wifiClient\_Scan() 598 | Sending response to client session 0x27cdc : 4 bytes sent  
> Jan 6 01:21:48 fx30 user.debug Legato: DBUG | wifiService[580]/framework T=WiFi Client Scan Thread | LE\_FILENAME PThreadStartRoutine() 362 | Set nice level to 0.  
> Jan 6 01:21:48 fx30 user.info Legato: INFO | wifiService[580]/daemon T=WiFi Client Scan Thread | pa\_wifi\_client\_ti.c pa\_wifiClient\_Scan() 419 | Scanning  
> Jan 6 01:21:48 fx30 user.debug Legato: DBUG | wifiService[580]/daemon T=WiFi Client Scan Thread | le\_wifiClient.c MarkAllAccessPointsOld() 317 | Mark all AP as old  
> Jan 6 01:21:48 fx30 user.debug Legato: DBUG | wifiService[580]/daemon T=WiFi Client Scan Thread | le\_wifiClient.c MarkAllAccessPointsOld() 346 | Marked: 0  
> Jan 6 01:21:48 fx30 user.info Legato: INFO | wifiService[580]/daemon T=WiFi Client Scan Thread | pa\_wifi\_client\_ti.c pa\_wifiClient\_GetScanResult() 484 | Scan results  
> Jan 6 01:21:48 fx30 user.info Legato: INFO | wifiService[580]/daemon T=WiFi Client Scan Thread | pa\_wifi\_client\_ti.c pa\_wifiClient\_GetScanResult() 504 | PARSING:WIFICLIENT\_START\_SCAN : len:22  
> Jan 6 01:21:48 fx30 user.err Legato: =ERR= | wifiService[580] | command failed: No such device (-19)  
> Jan 6 01:21:48 fx30 user.debug Legato: DBUG | wifiService[580]/daemon T=WiFi Client Scan Thread | le\_wifiClient.c ScanThreadDestructor() 395 | Scan thread exited.  
> Jan 6 01:21:48 fx30 user.debug Legato: DBUG | wifiService[580]/daemon T=WiFi Client Scan Thread | le\_wifiClient.c PaEventHandler() 118 | Event: 2  
> Jan 6 01:21:48 fx30 user.debug Legato: DBUG | wifiService[580]/daemon T=main | le\_wifiClient.c FirstLayerWifiClientEventHandler() 452 | Event: 2  
> Jan 6 01:21:48 fx30 user.debug Legato: DBUG | wifiService[580]/framework T=main | le\_wifiClient\_server.c AsyncResponse\_le\_wifiClient\_AddNewEventHandler() 326 | Sending message to client session 0x27cdc : 8 bytes sent  
> Jan 6 01:21:48 fx30 user.debug Legato: DBUG | wifiService[580]/daemon T=main | le\_wifiClient.c IsScanRunning() 430 | IsScanRunning .0  
> Jan 6 01:21:48 fx30 user.debug Legato: DBUG | wifiService[580]/daemon T=main | le\_wifiClient.c le\_wifiClient\_GetFirstAccessPoint() 681 | Get first AP  
> Jan 6 01:21:48 fx30 user.debug Legato: DBUG | wifiService[580]/daemon T=main | le\_wifiClient.c le\_wifiClient\_GetFirstAccessPoint() 700 | AP not found  
> Jan 6 01:21:48 fx30 user.debug Legato: DBUG | wifiService[580]/framework T=main | le\_wifiClient\_server.c Handle\_le\_wifiClient\_GetFirstAccessPoint() 641 | Sending response to client session 0x27cdc : 4 bytes sent  
> Jan 6 01:21:48 fx30 user.err Legato: =ERR= | wifi[5022]/wifi T=main | wifi\_client.c WifiReadScanResults() 123 | le\_wifiClient\_GetFirstAccessPoint ERROR  
> Jan 6 01:21:48 fx30 user.debug Legato: DBUG | wifiService[580]/daemon T=main | le\_wifiClient.c le\_wifiClient\_RemoveNewEventHandler() 538 | Remove event handler  
> Jan 6 01:21:48 fx30 user.debug Legato: DBUG | wifiService[580]/framework T=main | le\_wifiClient\_server.c Handle\_le\_wifiClient\_RemoveNewEventHandler() 466 | Sending response to client session 0x27cdc : 0 bytes sent  
> Jan 6 01:21:48 fx30 user.debug Legato: DBUG | wifiService[580]/daemon T=main | le\_wifiClient.c CloseSessionEventHandler() 414 | sessionRef 0x27cdc GetFirstSessionRef 0x27cdc  
> Jan 6 01:21:48 fx30 user.debug Legato: DBUG | wifiService[580]/framework T=main | le\_wifiClient\_server.c CleanupClientData() 126 | Client 0x27cdc is closed !!!  
> Jan 6 01:21:48 fx30 user.debug Legato: DBUG | wifiService[580]/framework T=main | le\_wifiAp\_server.c CleanupClientData() 126 | Client 0x27d6c is closed !!!  
> root@fx30:~#

similar logread output if I try to use the legato wifi client api.

Anywhere I can look? does yocto have something like lspci?

---

<div class="post-metadata">

**Author:** ![mahtab](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@mahtab](https://forum.legato.io/u/mahtab)\
**Post date:** [September 20, 2017, 3:25pm UTC](https://forum.legato.io/t/debugging-iot-wifi-module/2587/2 "2017-09-20T15:25:28Z")

</div>

Hi all,

I’m also having problems with this. I get an “SIOCGIFFLAGS: No such device” error from **ifup wlan0** and:

> ERR\* failed to write i2c data  
> FTL\* Failed to enable PCA9548A I2C switch

if I run the tiwifi script in /etc/init.d. Needless to say legato gives a **ERROR:le\_wifiAp\_Start returns -6** error from **wifi ap start** and none of the apps work, like the Web app.

Has anyone managed to get the FX30 working with the wifi IOT card ? I’m using a production FX30 with 16.10.1. Any help would be appreciated, thanks.

---

<div class="post-metadata">

**Author:** ![mahtab](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@mahtab](https://forum.legato.io/u/mahtab)\
**Post date:** [September 20, 2017, 4:08pm UTC](https://forum.legato.io/t/debugging-iot-wifi-module/2587/3 "2017-09-20T16:08:54Z")

</div>

Oh, actually [this post](http://forum.legato.io/t/request-for-advice-on-board-bring-up-of-a-custom-board-with-wp8548-ti-wifi-chipset-board-bring-up/2280) has the solution ! Thanks !
