MangOH RED 77 - Wifi Client config

Hello

I’m new on mangOH, and i try to connect my mangOH to a Wifi AP.
But when i try the connand “wifi client start”, i’ve this laconic message :
-> ERROR: le_wifiClient_Start returns ERROR.

cm info return:

Firmware Version:              SWI9X06Y_02.32.02.00 c2e98c jenkins 2019/08/30 07:28:21
Bootloader Version:            SWI9X06Y_02.32.02.00 c2e98c jenkins 2019/08/30 07:28:21

Legato version is:
20.04.0_ae298f9b1c63f46bf03abb990798e97a

I use the wifi client from legato git ( the version on mango git is deprecated !)

And the log from ‘wifi client start’ are

Jul 20 17:58:56 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[4406]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link '/legato/systems/current/apps/wifi/read-only/lib/libComponent_wifi.so' to '/legato/systems/current/appsWriteable/wifi/lib/libComponen
Jul 20 17:58:56 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[4406]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link '/legato/systems/current/apps/wifi/read-only/bin/wifi' to '/legato/systems/current/appsWriteable/wifi/bin/wifi': Already exists
Jul 20 17:58:56 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[4406]/supervisor T=main | proc.c proc_Start() 1403 | Starting process 'wifi@0' with pid 6795
Jul 20 17:58:56 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[4406]/supervisor T=main | supervisor.c SigChildHandler() 874 | Reaping unconfigured child process 6791.
Jul 20 17:58:56 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[6795]/supervisor T=main | proc.c proc_Start() 1363 | Execing 'bin/wifi'
Jul 20 17:58:56 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[6795]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxCoreDumpFileBytes to value 8192.
Jul 20 17:58:56 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[6795]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxFileBytes to value 90112.
Jul 20 17:58:56 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[6795]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxLockedMemoryBytes to value 8192.
Jul 20 17:58:56 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[6795]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxFileDescriptors to value 256.
Jul 20 17:58:56 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[6795]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxMQueueBytes to value 512.
Jul 20 17:58:56 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[6795]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxThreads to value 20.
Jul 20 17:58:56 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[6795]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxQueuedSignals to value 100.
Jul 20 17:58:56 swi-mdm9x28-wp user.debug Legato:  DBUG | wifiService[4577]/framework T=main | unixSocket.c ExtractFileDescriptor() 34 | Received fd (14).
Jul 20 17:58:56 swi-mdm9x28-wp user.debug Legato:  DBUG | wifiService[4577]/framework T=main | unixSocket.c ExtractFileDescriptor() 34 | Received fd (15).
Jul 20 17:58:56 swi-mdm9x28-wp user.info Legato:  INFO | wifiService[4577] | WIFI_START
Jul 20 17:58:57 swi-mdm9x28-wp user.err kernel: [ 1564.513861] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x70 MSTR_STS:0x0d1300c8 OPER:0x00000010
Jul 20 17:58:57 swi-mdm9x28-wp user.err kernel: [ 1564.528986] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x70 MSTR_STS:0x0d1300c8 OPER:0x00000010
Jul 20 17:58:57 swi-mdm9x28-wp user.err kernel: [ 1564.545662] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x70 MSTR_STS:0x0d1300c8 OPER:0x00000010
Jul 20 17:58:57 swi-mdm9x28-wp user.err kernel: [ 1564.560800] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x70 MSTR_STS:0x0d1300c8 OPER:0x00000010
Jul 20 17:58:57 swi-mdm9x28-wp user.err kernel: [ 1564.576544] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x70 MSTR_STS:0x0d1300c8 OPER:0x00000010
Jul 20 17:58:57 swi-mdm9x28-wp user.err kernel: [ 1564.593630] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x70 MSTR_STS:0x0d1300c8 OPER:0x00000010
Jul 20 17:58:57 swi-mdm9x28-wp user.info Legato:  INFO | wifiService[4577] | mangOH red board
Jul 20 17:58:57 swi-mdm9x28-wp user.debug kernel: [ 1564.631686] gpio_map_name_to_num: find GPIO 76
Jul 20 17:58:57 swi-mdm9x28-wp user.debug kernel: [ 1564.632799] gpio_map_name_to_num: find GPIO 38
Jul 20 17:58:57 swi-mdm9x28-wp user.info kernel: [ 1564.689267] cfg80211: Calling CRDA to update world regulatory domain
Jul 20 17:58:57 swi-mdm9x28-wp user.info kernel: [ 1564.689384] cfg80211: World regulatory domain updated:
Jul 20 17:58:57 swi-mdm9x28-wp user.info kernel: [ 1564.689396] cfg80211:  DFS Master region: unset
Jul 20 17:58:57 swi-mdm9x28-wp user.info kernel: [ 1564.689405] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
Jul 20 17:58:57 swi-mdm9x28-wp user.info kernel: [ 1564.689418] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
Jul 20 17:58:57 swi-mdm9x28-wp user.info kernel: [ 1564.689429] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
Jul 20 17:58:57 swi-mdm9x28-wp user.info kernel: [ 1564.689440] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
Jul 20 17:58:57 swi-mdm9x28-wp user.info kernel: [ 1564.689451] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
Jul 20 17:58:57 swi-mdm9x28-wp user.info kernel: [ 1564.689461] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
Jul 20 17:58:57 swi-mdm9x28-wp user.info kernel: [ 1564.689472] cfg80211:   (5490000 KHz - 5710000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
Jul 20 17:58:57 swi-mdm9x28-wp user.info kernel: [ 1564.689482] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
Jul 20 17:58:57 swi-mdm9x28-wp user.info kernel: [ 1564.689493] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
Jul 20 17:59:03 swi-mdm9x28-wp user.info Legato:  INFO | wifiService[4577] | Failed to start TI wifi, interface does not exist.
Jul 20 17:59:03 swi-mdm9x28-wp user.info Legato:  INFO | wifiService[4577] | Hardware is absent, perform clean up
Jul 20 17:59:03 swi-mdm9x28-wp user.err kernel: [ 1570.225842] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x70 MSTR_STS:0x011363c8 OPER:0x00000010
Jul 20 17:59:03 swi-mdm9x28-wp user.err kernel: [ 1570.240677] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x70 MSTR_STS:0x011363c8 OPER:0x00000010
Jul 20 17:59:03 swi-mdm9x28-wp user.err kernel: [ 1570.267238] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x70 MSTR_STS:0x0d1300c8 OPER:0x00000010
Jul 20 17:59:03 swi-mdm9x28-wp user.err kernel: [ 1570.282482] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x70 MSTR_STS:0x0d1300c8 OPER:0x00000010
Jul 20 17:59:03 swi-mdm9x28-wp user.err kernel: [ 1570.298274] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x70 MSTR_STS:0x0d1300c8 OPER:0x00000010
Jul 20 17:59:03 swi-mdm9x28-wp user.info Legato:  INFO | wifiService[4577] | mangOH red board
Jul 20 17:59:03 swi-mdm9x28-wp user.err kernel: [ 1570.313757] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x70 MSTR_STS:0x0d1300c8 OPER:0x00000010
Jul 20 17:59:03 swi-mdm9x28-wp user.warn Legato: -WRN- | wifiService[4577]/daemon T=main | pa_wifi_client.c pa_wifiClient_Start() 519 | WiFi card is not inserted
Jul 20 17:59:03 swi-mdm9x28-wp user.warn Legato: -WRN- | wifiService[4577]/daemon T=main | le_wifiClient.c le_wifiClient_Start() 821 | Unable to start WIFI client; return code: -1
Jul 20 17:59:03 swi-mdm9x28-wp user.debug Legato:  DBUG | wifiService[4577]/framework T=main | le_wifiClient_server.c CleanupClientData() 163 | Client 0x7f56c2f8 is closed !!!
Jul 20 17:59:03 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[4406]/supervisor T=main | proc.c proc_SigChildHandler() 2079 | Process 'wifi@0' (PID: 6795) has exited with exit code 1.
Jul 20 17:59:03 swi-mdm9x28-wp user.debug kernel: [ 1570.340853] gpio_map_name_to_num: find GPIO 76
Jul 20 17:59:03 swi-mdm9x28-wp user.debug kernel: [ 1570.341436] gpio_map_name_to_num: find GPIO 38
Jul 20 17:59:03 swi-mdm9x28-wp user.debug Legato:  DBUG | wifiService[4577]/framework T=main | le_wifiClient_server.c CleanupClientData() 185 | Found session ref 0x7f56c418; does not match
Jul 20 17:59:03 swi-mdm9x28-wp user.debug Legato:  DBUG | wifiService[4577]/framework T=main | le_wifiAp_server.c CleanupClientData() 163 | Client 0x7f56c268 is closed !!!
Jul 20 17:59:03 swi-mdm9x28-wp user.warn Legato: -WRN- | supervisor[4406]/supervisor T=main | app.c app_SigChildHandler() 4067 | Process 'wifi@0' in app 'wifi' faulted: Ignored.
Jul 20 17:59:03 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[4406]/supervisor T=main | app.c app_StopComplete() 4764 | app 'wifi' has stopped.
Jul 20 17:59:03 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[4406]/supervisor T=main | apps.c DeactivateAppContainer() 374 | Application 'wifi' has stopped.

So If you have a suggestion ?
Thank

Please surround inline inline code or logs with single backticks like `this`. For multi-line code or logs, surround with triple backticks
```
like
this
```

This will ensure that the formatting of the text is preserved which will make it easier for others to understand your logs/code.

I have similar problem with my mangoh red wp76xx.
When i try the “wifi client start” command i get ERROR: le_wifiClient_Start returns ERROR.
On the uart console I have multiple errors:

[  601.554892] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x70 MSTR_STS:0x0d1300c8 OPER:0x00000010
[  601.570766] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x70 MSTR_STS:0x0d1300c8 OPER:0x00000010
[  601.590169] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x70 MSTR_STS:0x0d1300c8 OPER:0x00000010
[  601.606785] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x70 MSTR_STS:0x0d1300c8 OPER:0x00000010
[  601.622872] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x70 MSTR_STS:0x0d1300c8 OPER:0x00000010
[  601.638576] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:1 tx:1) mode:FIFO slv_addr:0x70 MSTR_STS:0x0d1300c8 OPER:0x00000010

and logread:

Aug  4 14:47:48 red user.info Legato:  INFO | supervisor[888]/supervisor T=main | app.c app_Start() 3472 | Starting app 'wifi'
Aug  4 14:47:48 red user.info Legato:  INFO | supervisor[888]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link '/legato/systems/current/apps/wifi/read-only/lib/libComponent_wifi.so' to '/legato/systems/current/appsWriteable/wifi/lib/libComponent
Aug  4 14:47:48 red user.info Legato:  INFO | supervisor[888]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link '/legato/systems/current/apps/wifi/read-only/bin/wifi' to '/legato/systems/current/appsWriteable/wifi/bin/wifi': Already exists
Aug  4 14:47:48 red user.info Legato:  INFO | supervisor[888]/supervisor T=main | proc.c proc_Start() 1403 | Starting process 'wifi@0' with pid 2752
Aug  4 14:47:48 red user.info Legato:  INFO | supervisor[2752]/supervisor T=main | proc.c proc_Start() 1363 | Execing 'bin/wifi'
Aug  4 14:47:48 red user.debug Legato:  DBUG | wifiService[1711]/framework T=main | unixSocket.c ExtractFileDescriptor() 34 | Received fd (14).
Aug  4 14:47:48 red user.debug Legato:  DBUG | wifiService[1711]/framework T=main | unixSocket.c ExtractFileDescriptor() 34 | Received fd (15).
Aug  4 14:47:48 red user.info Legato:  INFO | wifiService[1711] | WIFI_START
Aug  4 14:47:49 red user.info Legato:  INFO | wifiService[1711] | mangOH red board
Aug  4 14:47:49 red user.err Legato: =ERR= | wifiService[1711] | ERR* failed to read i2c data
Aug  4 14:47:49 red user.err Legato: =ERR= | wifiService[1711] | ERR* I2c get addr 0x3e value failure
Aug  4 14:47:49 red user.err Legato: =ERR= | wifiService[1711] | ERR* Set mode 0 failure
Aug  4 14:47:49 red user.err Legato: =ERR= | wifiService[1711] | ERR* failed to read i2c data
Aug  4 14:47:49 red user.err Legato: =ERR= | wifiService[1711] | ERR* I2c get addr 0x3e value failure
Aug  4 14:47:49 red user.err Legato: =ERR= | wifiService[1711] | ERR* Set polarity 0 failure
Aug  4 14:47:50 red user.err Legato: =ERR= | wifiService[1711] | ERR* failed to read i2c data
Aug  4 14:47:50 red user.err Legato: =ERR= | wifiService[1711] | ERR* I2c get addr 0x3e value failure
Aug  4 14:47:50 red user.err Legato: =ERR= | wifiService[1711] | ERR* Set output 0 failure
Aug  4 14:47:50 red user.info Legato:  INFO | wifiService[1711] | Clean up due to unknown error
Aug  4 14:47:50 red user.warn Legato: -WRN- | wifiService[1711]/daemon T=main | pa_wifi_client.c pa_wifiClient_Start() 532 | Failed to start WiFi client command "WIFI_START" systemResult (32512)
Aug  4 14:47:50 red user.warn Legato: -WRN- | wifiService[1711]/daemon T=main | le_wifiClient.c le_wifiClient_Start() 821 | Unable to start WIFI client; return code: -6
Aug  4 14:47:50 red user.info Legato:  INFO | supervisor[888]/supervisor T=main | proc.c proc_SigChildHandler() 2079 | Process 'wifi@0' (PID: 2752) has exited with exit code 1.
Aug  4 14:47:50 red user.debug Legato:  DBUG | wifiService[1711]/framework T=main | le_wifiClient_server.c CleanupClientData() 163 | Client 0x7f56c268 is closed !!!
Aug  4 14:47:50 red user.debug Legato:  DBUG | wifiService[1711]/framework T=main | le_wifiClient_server.c CleanupClientData() 185 | Found session ref 0x7f56c418; does not match
Aug  4 14:47:50 red user.debug Legato:  DBUG | wifiService[1711]/framework T=main | le_wifiAp_server.c CleanupClientData() 163 | Client 0x7f56c2f8 is closed !!!
Aug  4 14:47:50 red user.warn Legato: -WRN- | supervisor[888]/supervisor T=main | app.c app_SigChildHandler() 4067 | Process 'wifi@0' in app 'wifi' faulted: Ignored.
Aug  4 14:47:50 red user.info Legato:  INFO | supervisor[888]/supervisor T=main | app.c app_StopComplete() 4764 | app 'wifi' has stopped.
Aug  4 14:47:50 red user.info Legato:  INFO | supervisor[888]/supervisor T=main | apps.c DeactivateAppContainer() 374 | Application 'wifi' has stopped.

It seems, that it is a common problem. Maybe there is a fix for that?

EDIT: I already tried applying Legato_patches , but it doesn’t support current (20.04) legato version.

Are you using this iot card?

No, I am not using any IOT cards. I want to use built-in mediatek wifi module.

Have you followed the guide here?

Yes, but I failed. I cannot apply Legato_patches because it doesn’t support current (20.04) legato version.

Suggest you to try on R13 first

Do you mean SDK for WP76 (Release 13 + Legato 19.02.0) ?

I’m afraid it won’t run because legato_patches only support 19.01.0, and there is no stable, nor legit sdk release for 19.01.0

How about FW R12 then?
I only tried on R9 before

Actually the only one stable version supported by Legato_patches is SDK for WP76 (Release 9 + Legato 18.03.0) Which is a bit old… I don’t won’t to use old sdk for my project. Are there any plans to release new version of Legato_patches? Or maybe there is a way to work around this problem?