# Uses TI module instead of MT7697

**URL:** <https://mangoh.discourse.group/t/uses-ti-module-instead-of-mt7697/5840>\
**Category:** mangOH Red\
**Created:** [December 14, 2020, 3:09pm UTC](https://mangoh.discourse.group/t/uses-ti-module-instead-of-mt7697/5840 "2020-12-14T15:09:51Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebastienmaviel](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@sebastienmaviel](https://mangoh.discourse.group/u/sebastienmaviel)\
**Post date:** [December 14, 2020, 3:09pm UTC](https://mangoh.discourse.group/t/uses-ti-module-instead-of-mt7697/5840/1 "2020-12-14T15:09:51Z")

</div>

Hey I am trying to run my mangoh as a gateway following this tutorial:

> **[mangOH/mangOH](https://github.com/mangOH/mangOH/wiki/mangOH-Red-mt7697-WiFi)**
>
> mangOH-Red-mt7697-WiFi

- I successfully updated the flash for the mt7697 as described.

- I could not applied patches as they are not available for the current Legato version

- I modified red.sdef to add the 3 samples app (wifiApTest, wifiWebAp, wifiClientTest)

- Added the shell script mtwifi in /etc/init.d/

- Modified my network interfaces

- Connected UART1 to the wifi module (at!mapuart=17,1)  
The interface is visible when i do ifconfig -a:

> **network interface**
>
> # /etc/network/interfaces – configuration file for ifup(8), ifdown(8)
> 
> # The loopback interface
> 
> auto lo  
> iface lo inet loopback
> 
> # Wired or wireless interfaces
> 
> auto eth0  
> iface eth0 inet dhcp
> 
> # Wireless interfaces
> 
> iface wlan1 inet manual  
> pre-up /etc/init.d/mtwifi start uart 1  
> post-down /etc/init.d/mtwifi stop 1

However whenever I try to launch wifi, i get  
**Failed to start TI wifi, interface does not exist.**  
It looks like the mangOH look for this card that I don’t want to use.

Do you know a way to avoid this ?  
Thanks !

My config:  
VScode extension  
MangOH RED - Release 13 - Legato 19.11.2

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [December 14, 2020, 3:26pm UTC](https://mangoh.discourse.group/t/uses-ti-module-instead-of-mt7697/5840/2 "2020-12-14T15:26:49Z")

</div>

you can see this document:

> **[How to test MTK wifi chipset on MangOH Red board.docx](https://drive.google.com/file/d/12hjD3554Ufr29LOqjOvyIsrPek6JyI4_/view?usp=sharing)**
>
> Google Drive file.

---

<div class="post-metadata">

**Author:** ![sebastienmaviel](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@sebastienmaviel](https://mangoh.discourse.group/u/sebastienmaviel)\
**Post date:** [December 14, 2020, 4:43pm UTC](https://mangoh.discourse.group/t/uses-ti-module-instead-of-mt7697/5840/3 "2020-12-14T16:43:24Z")

</div>

Thanks for this document.

I am working with the module WP77xx, so I can not use the .update present in this document.

What should I update ?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [December 14, 2020, 4:47pm UTC](https://mangoh.discourse.group/t/uses-ti-module-instead-of-mt7697/5840/4 "2020-12-14T16:47:32Z")

</div>

You need to build it by yourself

> **[mangOH/mangOH](https://github.com/mangOH/mangOH/wiki/mangOH-Red-mt7697-WiFi)**
>
> mangOH-Red-mt7697-WiFi

---

<div class="post-metadata">

**Author:** ![sebastienmaviel](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@sebastienmaviel](https://mangoh.discourse.group/u/sebastienmaviel)\
**Post date:** [December 14, 2020, 4:57pm UTC](https://mangoh.discourse.group/t/uses-ti-module-instead-of-mt7697/5840/5 "2020-12-14T16:57:46Z")

</div>

I am working with VSCode, I do not see where to apply patches  
Can you help me with that ?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [December 14, 2020, 5:07pm UTC](https://mangoh.discourse.group/t/uses-ti-module-instead-of-mt7697/5840/6 "2020-12-14T17:07:59Z")

</div>

No, you cannot use vscode to do that

---

<div class="post-metadata">

**Author:** ![sebastienmaviel](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@sebastienmaviel](https://mangoh.discourse.group/u/sebastienmaviel)\
**Post date:** [December 14, 2020, 5:15pm UTC](https://mangoh.discourse.group/t/uses-ti-module-instead-of-mt7697/5840/7 "2020-12-14T17:15:47Z")

</div>

Ok thanks, I will try that.  
Is it impossible to run this with Release 13 on WP77xx ?

---

<div class="post-metadata">

**Author:** ![sebastienmaviel](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@sebastienmaviel](https://mangoh.discourse.group/u/sebastienmaviel)\
**Post date:** [December 14, 2020, 11:55pm UTC](https://mangoh.discourse.group/t/uses-ti-module-instead-of-mt7697/5840/8 "2020-12-14T23:55:27Z")

</div>

I installed the Legato AF following this: [https://docs.legato.io/latest/basicBuildLegato.html](https://docs.legato.io/latest/basicBuildLegato.html)  
And with the tar files of the 18.03.0 version I did succeed to run make to compile this version.

Then after cloning Legato\_patches an trying to apply the patch at my legatoAF, I get:

`./apply_legato_patches.sh ~/legato_workspace/legato-18.03.0 18.03.0`  
fatal: not a git repository (or any of the parent directories): .git  
“18.03.0” doesn’t appear to be a valid release tag

I’m stuck, can you help with that ?

It would help me a lot if you could give me the right .update file !

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [December 15, 2020, 2:09am UTC](https://mangoh.discourse.group/t/uses-ti-module-instead-of-mt7697/5840/9 "2020-12-15T02:09:13Z")

</div>

Didn’t there is 18.3.0?

> **[mangOH/Legato\_patches](https://github.com/mangOH/Legato_patches/tree/master/18.03.0)**
>
> master/18.03.0

---

<div class="post-metadata">

**Author:** ![sebastienmaviel](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@sebastienmaviel](https://mangoh.discourse.group/u/sebastienmaviel)\
**Post date:** [December 15, 2020, 9:50am UTC](https://mangoh.discourse.group/t/uses-ti-module-instead-of-mt7697/5840/10 "2020-12-15T09:50:45Z")

</div>

Ok to make it works I had to use apply\_legato\_patches\_untracked.sh as it seems they are some errors with the git tracking.

Now as I try to compile the mangOH source code I have path issue with:  
#include “${LEGATO\_ROOT}/modules/WiFi/wifi.sinc”

This directory does not exist in the legato version. I removed this link and add a full path to a similar one.

**First question, do I have to change the mangOH source code version ? As it is not compatible with the old release ? (18.03.0 or 19.01.0)**

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [December 15, 2020, 9:59am UTC](https://mangoh.discourse.group/t/uses-ti-module-instead-of-mt7697/5840/11 "2020-12-15T09:59:29Z")

</div>

Where can you download the old mangoh source?

---

<div class="post-metadata">

**Author:** ![sebastienmaviel](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@sebastienmaviel](https://mangoh.discourse.group/u/sebastienmaviel)\
**Post date:** [December 15, 2020, 11:51am UTC](https://mangoh.discourse.group/t/uses-ti-module-instead-of-mt7697/5840/12 "2020-12-15T11:51:37Z")

</div>

Ok for the record here is how I did:

Follow [https://github.com/mangOH/mangOH/wiki/mangOH-Red-mt7697-WiFi](https://github.com/mangOH/mangOH/wiki/mangOH-Red-mt7697-WiFi) until the section _Patch Legato_

- Install the .spk from here [Release11\_WP77xx](https://source.sierrawireless.com/resources/airprime/software/wp77xx/wp77xx-firmware-release-11/#sthash.1XlR47iT.dpbs)
- Create a leaf profile with _swi-wp77\_2.3.0_ SDK
- Clone Legato patches from `https://github.com/mangOH/Legato_patches`
- Apply patches to my LegatoAF:  
`./apply_legato_patches_untracked.sh $LEGATO_ROOT/leaf-data/$PROFILE_NAME/wp77-legato 19.01.0`
- Clone the mangOH source code
- Change the branch to v0.5.0 as the v0.6.0 include the wifi definition files from the LegatoAF (and they are not present here)
- Uncomment line 15 of wifi.sdef

> **wifi.sdef**
>
> //--------------------------------------------------------------------------------------------------  
> // Sample system definition that includes essential services and WiFi-related services and sample  
> // applications.  
> //  
> // Copyright © Sierra Wireless Inc.  
> //--------------------------------------------------------------------------------------------------
> 
> #include “${LEGATO\_ROOT}/default.sdef”
> 
> buildVars:  
> {  
> LEGATO\_WIFI\_ROOT={LEGATO\_ROOT}/modules/WiFi // File is selected by users, replace "ti" with "qca" to support qca chipset // For mangOH we select the PA script in the board file - i.e. red/yellow ... LEGATO\_WIFI\_PA={LEGATO\_WIFI\_ROOT}/service/platformAdaptor/ti/pa\_wifi.sh  
> }
> 
> apps:  
> {  
> // WiFi services  
> $LEGATO\_WIFI\_ROOT/service/wifiService.adef { start: manual }  
> $LEGATO\_WIFI\_ROOT/apps/tools/wifi/wifi.adef  
> }
> 
> commands:  
> {  
> wifi = wifi:/bin/wifi  
> }

- Go to `leaf-data/wp77_wifi/wp77-legato/modules/WiFi/service/daemon/Component.cdef`and correct the sources link copy this:

> **Component.cdef**
>
> provides:  
> {  
> api:  
> {  
> {LEGATO\_ROOT}/interfaces/wifi/le\_wifiClient.api {LEGATO\_ROOT}/interfaces/wifi/le\_wifiAp.api  
> }  
> }
> 
> sources:  
> {  
> wifiService.c  
> le\_wifiClient.c  
> le\_wifiAp.c  
> //Put hardlink here
> 
> ```
> ${LEGATO_WIFI_ROOT}/service/platformAdaptor/ti/pa_wifi_client_ti.c
> ${LEGATO_WIFI_ROOT}/service/platformAdaptor/ti/pa_wifi_ap_ti.c
> 
> ```
> 
> }
> 
> cflags:  
> {  
> -I${LEGATO\_WIFI\_ROOT}/service/platformAdaptor/inc/  
> }
> 
> bundles:  
> {  
> file:  
> {  
> // Script file implementing Wifi PA  
> ${LEGATO\_WIFI\_ROOT}/service/platformAdaptor/ti/pa\_wifi.sh pa\_wifi.sh  
> }  
> }

Now it is possible to compile the mangOH source successfully and update it to red\_wp77xx.

Then I followed the indication in the document _How to test MTK wifi chipset on MangOH Red board_ (added mtwifi in /etc/init.d/ and chmod +x it, modifying interfaces to look like below, and setup the UART protocol as indicated).

> **interfaces**
>
> # /etc/network/interfaces – configuration file for ifup(8), ifdown(8)
> 
> # The loopback interface
> 
> auto lo  
> iface lo inet loopback
> 
> # Wired or wireless interfaces
> 
> auto eth0  
> iface eth0 inet dhcp
> 
> # Wireless interfaces
> 
> iface wlan1 inet manual  
> pre-up /etc/init.d/mtwifi start uart 1  
> post-down /etc/init.d/mtwifi stop 1

Typing the commands below allows me start successfully the wifi uC and to observe wifi AP SSID on my mobile phone.

> **Commands**
>
> wifi ap setssid “SIERRAWIFI123”
> 
> wifi ap setdriver 1
> 
> wifi ap setmaxclients 1
> 
> wifi ap setsecurityproto 1
> 
> wifi ap setpassphrase “knockknock”
> 
> wifi ap setdiscoverable 1
> 
> wifi ap start wlan1

I then added the wifiWebAp app to my module, starts it, everything run but I now **can’t see the SSID with my mobile phone** , I got those errors:

> **Logs**
>
> ![Capture d’écran de 2020-12-15 12-50-14](https://us1.discourse-cdn.com/flex016/uploads/mangoh/original/2X/4/4f845c0328b7ba2701c384e43256c644114d52af.png)

Any ideas why I can’t connect ?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [December 15, 2020, 12:14pm UTC](https://mangoh.discourse.group/t/uses-ti-module-instead-of-mt7697/5840/13 "2020-12-15T12:14:06Z")

</div>

Did you see wlan0?

Did you power cycle after these commands?

```
wifi ap setssid “SIERRAWIFI123”

wifi ap setdriver 1

wifi ap setmaxclients 1

wifi ap setsecurityproto 1

wifi ap setpassphrase “knockknock”

wifi ap setdiscoverable 1

wifi ap start wlan1
```

---

<div class="post-metadata">

**Author:** ![sebastienmaviel](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@sebastienmaviel](https://mangoh.discourse.group/u/sebastienmaviel)\
**Post date:** [December 15, 2020, 3:15pm UTC](https://mangoh.discourse.group/t/uses-ti-module-instead-of-mt7697/5840/14 "2020-12-15T15:15:05Z")

</div>

No I can’t see wlan0 after launching the app

ifup wlan0 (using mtwifi script) show then wlan1 in ifconfig -a

> **logs**
>
> ```
> root@swi-mdm9x28-wp:~# app status
> [running] atAirVantage
> [running] atQmiLinker
> [running] atService
> [running] audioService
> [running] avcService
> [running] battery
> [running] cellNetService
> [running] dataConnectionService
> [running] dataHub
> [running] fwupdateService
> [running] gpioService
> [running] ledService
> [running] modemService
> [running] portService
> [running] positioningService
> [running] powerMgr
> [running] qmiAirVantage
> [stopped] redCloud
> [running] redSensor
> [running] secStore
> [stopped] smsInboxService
> [stopped] spiService
> [stopped] tools
> [stopped] voiceCallService
> [stopped] wifi
> [running] wifiService
> [running] wifiWebAp
> root@swi-mdm9x28-wp:~# ifconfig -a
> bridge0 Link encap:Ethernet HWaddr 0A:15:37:78:90:87  
> inet addr:192.168.225.1 Bcast:192.168.225.255 Mask:255.255.255.0
> inet6 addr: fe80::815:37ff:fe75:8d84%1257381756/64 Scope:Link
> UP BROADCAST MULTICAST MTU:1500 Metric:1
> RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:0 
> RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
> 
> ecm0 Link encap:Ethernet HWaddr C6:61:B8:10:27:44  
> inet addr:192.168.2.2 Bcast:192.168.2.255 Mask:255.255.255.0
> inet6 addr: fe80::c461:b8ff:fe10:2744%1257381756/64 Scope:Link
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:9460 errors:0 dropped:0 overruns:0 frame:0
> TX packets:9528 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000 
> RX bytes:608980 (594.7 KiB) TX bytes:3764644 (3.5 MiB)
> 
> lo Link encap:Local Loopback  
> inet addr:127.0.0.1 Mask:255.0.0.0
> inet6 addr: ::1%1257381756/128 Scope:Host
> UP LOOPBACK RUNNING MTU:65536 Metric:1
> RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:0 
> RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
> 
> rmnet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
> UP RUNNING MTU:2000 Metric:1
> RX packets:16 errors:0 dropped:0 overruns:0 frame:0
> TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000 
> RX bytes:2144 (2.0 KiB) TX bytes:2327 (2.2 KiB)
> 
> rmnet_data0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
> inet addr:10.142.78.112 Mask:255.255.255.224
> inet6 addr: fe80::a244:f705:e5f9:1841%1257381756/64 Scope:Link
> UP RUNNING MTU:1500 Metric:1
> RX packets:16 errors:0 dropped:0 overruns:0 frame:0
> TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000 
> RX bytes:2016 (1.9 KiB) TX bytes:2327 (2.2 KiB)
> 
> rmnet_data1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
> [NO FLAGS] MTU:1500 Metric:1
> RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000 
> RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
> 
> rmnet_data2 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
> [NO FLAGS] MTU:1500 Metric:1
> RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000 
> RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
> 
> rmnet_data3 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
> [NO FLAGS] MTU:1500 Metric:1
> RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000 
> RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
> 
> sit0 Link encap:IPv6-in-IPv4  
> NOARP MTU:1480 Metric:1
> RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:0 
> RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
> 
> ```

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [December 15, 2020, 3:31pm UTC](https://mangoh.discourse.group/t/uses-ti-module-instead-of-mt7697/5840/15 "2020-12-15T15:31:29Z")

</div>

the error message is using wlan0 but now you don’t have this interface, probably this makes the problem.  
you need to fix that part.

Did you really choose MediaTek in the webpage?

---

<div class="post-metadata">

**Author:** ![sebastienmaviel](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@sebastienmaviel](https://mangoh.discourse.group/u/sebastienmaviel)\
**Post date:** [December 15, 2020, 3:48pm UTC](https://mangoh.discourse.group/t/uses-ti-module-instead-of-mt7697/5840/16 "2020-12-15T15:48:26Z")

</div>

Ok thanks a lot.

No I don’t have any choice here:

 ![Capture d’écran de 2020-12-15 16-47-00](https://us1.discourse-cdn.com/flex016/uploads/mangoh/original/2X/d/d6b4841518223ae0e68e33d96a779ca53e4915bf.png)

---

<div class="post-metadata">

**Author:** ![sebastienmaviel](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@sebastienmaviel](https://mangoh.discourse.group/u/sebastienmaviel)\
**Post date:** [December 15, 2020, 4:03pm UTC](https://mangoh.discourse.group/t/uses-ti-module-instead-of-mt7697/5840/17 "2020-12-15T16:03:55Z")

</div>

Ok got it working,

My error was to use the app from: [https://github.com/legatoproject/legato-WiFi/tree/19.01-release](https://github.com/legatoproject/legato-WiFi/tree/19.01-release)  
Which is not up to date.

By taking the app directly from the legato repo I managed to have the right version. Everything is working now, thanks @jyijyi !
