# MediaTek WiFi on SPI \[Solved\]

**URL:** https://mangoh.discourse.group/t/mediatek-wifi-on-spi-solved/2568
**Category:** mangOH Red
**Created:** [April 18, 2019, 7:51am UTC](https://mangoh.discourse.group/t/mediatek-wifi-on-spi-solved/2568 "2019-04-18T07:51:12Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![asifarshad](https://avatars.discourse-cdn.com/v4/letter/a/cdc98d/32.png) [@asifarshad](https://mangoh.discourse.group/u/asifarshad)
#### Post date: [April 18, 2019, 7:51am UTC](https://mangoh.discourse.group/t/mediatek-wifi-on-spi-solved/2568/1 "2019-04-18T07:51:12Z")

</div>

Has anyone tried using the Wifi using SPI? I can get the Wifi to work with UART but I need this port for some other stuff. I have flashed the WIfi to work using SPI but the init script uses UART. Any help would be appreciated

---

<div class="post-metadata">

### Author: ![asifarshad](https://avatars.discourse-cdn.com/v4/letter/a/cdc98d/32.png) [@asifarshad](https://mangoh.discourse.group/u/asifarshad)
#### Post date: [April 19, 2019, 5:26am UTC](https://mangoh.discourse.group/t/mediatek-wifi-on-spi-solved/2568/2 "2019-04-19T05:26:51Z")

</div>

@asyal anything from your side?

---

<div class="post-metadata">

### Author: ![dfrey](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/dfrey/32/303_2.png) [@dfrey](https://mangoh.discourse.group/u/dfrey)
#### Post date: [April 20, 2019, 4:42pm UTC](https://mangoh.discourse.group/t/mediatek-wifi-on-spi-solved/2568/3 "2019-04-20T16:42:34Z")

</div>

Did you try changing the /etc/network/interfaces section for the wifi interface to pass “spi” instead of “uart” to the mtwifi script? I haven’t used wifi over spi in quite a while, but I did use it at one time. The problem is that the wifi is significantly slower on spi compared to uart.

---

<div class="post-metadata">

### Author: ![asifarshad](https://avatars.discourse-cdn.com/v4/letter/a/cdc98d/32.png) [@asifarshad](https://mangoh.discourse.group/u/asifarshad)
#### Post date: [April 22, 2019, 6:55am UTC](https://mangoh.discourse.group/t/mediatek-wifi-on-spi-solved/2568/4 "2019-04-22T06:55:56Z")

</div>

Thank you. I feel kinda stupid now. Its working

---

<div class="post-metadata">

### Author: ![c.pahl](https://avatars.discourse-cdn.com/v4/letter/c/5f8ce5/32.png) [@c.pahl](https://mangoh.discourse.group/u/c.pahl)
#### Post date: [April 26, 2019, 10:39am UTC](https://mangoh.discourse.group/t/mediatek-wifi-on-spi-solved/2568/5 "2019-04-26T10:39:23Z")

</div>

Hello @asifarshad,

> I have flashed the WIfi to work using SPI

could you quickly recap for me what you did to enable Wifi over SPI?  
I wanted to try that too, but I’m not sure if/how I have to change the firmware.

---

<div class="post-metadata">

### Author: ![asifarshad](https://avatars.discourse-cdn.com/v4/letter/a/cdc98d/32.png) [@asifarshad](https://mangoh.discourse.group/u/asifarshad)
#### Post date: [April 29, 2019, 4:10pm UTC](https://mangoh.discourse.group/t/mediatek-wifi-on-spi-solved/2568/6 "2019-04-29T16:10:18Z")

</div>

> **[mangOH Red mt7697 WiFi](https://github.com/mangOH/mangOH/wiki/mangOH-Red-mt7697-WiFi)**
>
> Primary mangOH git repository. Contribute to mangOH/mangOH development by creating an account on GitHub.

Follow the above steps but change the build files as explained below

> [@Red MT7697 WiFi](https://mangoh.discourse.group/t/red-mt7697-wifi/917/2):
>
> Two things to check here: First was the MT7697 built for serial transport. To check goto the GCC/feature.mk and check the SWI\_SPI\_ENABLE (should be = n) and the SWI\_UART\_ENABLE (should be = y). Second insure AT port settings are correct by doing following: on the device run microcom -E /dev/ttyAT execute at!entercnd=“A710” execute at!mapuart=17,1

At the end where you pass uart to wifi in mtwifi script and then scp it to mangoh.  
It should work fine

---

<div class="post-metadata">

### Author: ![asifarshad](https://avatars.discourse-cdn.com/v4/letter/a/cdc98d/32.png) [@asifarshad](https://mangoh.discourse.group/u/asifarshad)
#### Post date: [April 29, 2019, 4:11pm UTC](https://mangoh.discourse.group/t/mediatek-wifi-on-spi-solved/2568/7 "2019-04-29T16:11:03Z")

</div>

Remember for SPI:  
SWI\_SPI\_ENABLE (should be = y)  
SWI\_UART\_ENABLE (should be = n)

---

<div class="post-metadata">

### Author: ![c.pahl](https://avatars.discourse-cdn.com/v4/letter/c/5f8ce5/32.png) [@c.pahl](https://mangoh.discourse.group/u/c.pahl)
#### Post date: [April 30, 2019, 6:58am UTC](https://mangoh.discourse.group/t/mediatek-wifi-on-spi-solved/2568/8 "2019-04-30T06:58:19Z")

</div>

Thank you @asifarshad, that worked indeed! 👍
