# \[SOLVED\] MediaTek wifi , wlan1, not starting properly

**URL:** <https://mangoh.discourse.group/t/solved-mediatek-wifi-wlan1-not-starting-properly/1544>\
**Category:** Uncategorized\
**Created:** [June 12, 2018, 5:03pm UTC](https://mangoh.discourse.group/t/solved-mediatek-wifi-wlan1-not-starting-properly/1544 "2018-06-12T17:03:25Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![rauger1](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@rauger1](https://mangoh.discourse.group/u/rauger1)\
**Post date:** [June 12, 2018, 5:03pm UTC](https://mangoh.discourse.group/t/solved-mediatek-wifi-wlan1-not-starting-properly/1544/1 "2018-06-12T17:03:25Z")

</div>

Hi,

I went through the steps here:[mangOH Red mt7697 WiFi · mangOH/mangOH Wiki · GitHub](https://github.com/mangOH/mangOH/wiki/mangOH-Red-mt7697-WiFi) and followed along the video here: [https://www.youtube.com/watch?v=KDO835vo1Lg&t=2036s](https://www.youtube.com/watch?v=KDO835vo1Lg&t=2036s) to install the wifi driver and scripts.

Once the github page ends, it doesn’t specify how to start the wifi, so following the video:

> root@swi-mdm9x28:~# /sbin/ifup wlan1

> ```
> Setup MT7697 UART
> Device: WP76
> Enable power control
> Initialized Linux WiFi modules
> Initialized MT7697 WiFi core
> Started MT7697 WiFi uart core wlan1
> root@swi-mdm9x28:~# wifi ap setssid "SIERRA TEST WIFI"
> SSID set successfully.
> root@swi-mdm9x28:~# wifi ap start wlan1
> starting...
> 
> ```

logread:  
\> Jun 12 16:58:33 swi-mdm9x28 user.info Legato: INFO | wifiService[855]/daemon T=main | pa\_wifi\_ap\_ti.c pa\_wifiAp\_SetSsid() 1235 | SSID length 16 | SSID: “SIERRA TEST WIFI”

> ```
> Jun 12 16:58:33 swi-mdm9x28 user.debug Legato: DBUG | wifiService[855]/daemon T=main | le_wifiClient.c CloseSessionEventHandler() 455 | sessionRef 0x7f57dd8c GetFirstSessionRef (nil)
> Jun 12 16:58:33 swi-mdm9x28 user.debug Legato: DBUG | wifiService[855]/framework T=main | le_wifiClient_server.c CleanupClientData() 139 | Client 0x7f57dd8c is closed !!!
> Jun 12 16:58:33 swi-mdm9x28 user.debug Legato: DBUG | wifiService[855]/framework T=main | le_wifiAp_server.c CleanupClientData() 139 | Client 0x7f57dcfc is closed !!!
> Jun 12 16:58:37 swi-mdm9x28 user.debug Legato: DBUG | wifiService[855]/framework T=main | LE_FILENAME ExtractFileDescriptor() 34 | Received fd (11).
> Jun 12 16:58:37 swi-mdm9x28 user.debug Legato: DBUG | wifiService[855]/framework T=main | LE_FILENAME ExtractFileDescriptor() 34 | Received fd (15).
> Jun 12 16:58:37 swi-mdm9x28 user.info Legato: INFO | wifiService[855]/daemon T=main | pa_wifi_ap_ti.c pa_wifiAp_Start() 795 | AP starts
> Jun 12 16:58:37 swi-mdm9x28 user.debug Legato: DBUG | wifiService[855]/framework T=main | LE_FILENAME le_mem_ForceAlloc() 841 | Memory pool 'framework.DestructorObjs' overflowed. Expanded to 4 blocks.
> Jun 12 16:58:37 swi-mdm9x28 user.info Legato: INFO | wifiService[855]/daemon T=main | pa_wifi_ap_ti.c pa_wifiAp_Start() 811 | SSID = SIERRA TEST WIFI
> Jun 12 16:58:37 swi-mdm9x28 user.debug Legato: DBUG | wifiService[855]/framework T=WifiApPaThread | LE_FILENAME PThreadStartRoutine() 362 | Set nice level to 0.
> Jun 12 16:58:37 swi-mdm9x28 user.debug Legato: DBUG | wifiService[855]/framework T=WifiApPaThread | LE_FILENAME le_mem_ForceAlloc() 841 | Memory pool 'framework.DestructorObjs' overflowed. Expanded to 5 blocks.
> Jun 12 16:58:37 swi-mdm9x28 user.info Legato: INFO | wifiService[855]/daemon T=WifiApPaThread | pa_wifi_ap_ti.c WifiApPaThreadMain() 264 | Started!
> Jun 12 16:58:37 swi-mdm9x28 user.info Legato: INFO | wifiService[855]/daemon T=WifiApPaThread | pa_wifi_ap_ti.c WifiApPaThreadMain() 285 | PARSING:WIFI_SET_EVENT : len:15
> Jun 12 16:58:37 swi-mdm9x28 user.info Legato: INFO | wifiService[855] | WIFI_START
> Jun 12 16:58:37 swi-mdm9x28 user.err Legato: =ERR= | wifiService[855] | ifup: interface wlan1 already configured
> Jun 12 16:58:37 swi-mdm9x28 user.info Legato: INFO | wifiService[855]/daemon T=main | pa_wifi_ap_ti.c pa_wifiAp_Start() 832 | WiFi Access Point Command('/legato/systems/current/apps/wifiService/read-only/pa_wifi.sh wlan1 WIFI_START') OK
> Jun 12 16:58:37 swi-mdm9x28 user.info Legato: INFO | wifiService[855] | WIFI_WLAN_UP
> Jun 12 16:58:37 swi-mdm9x28 user.info Legato: INFO | wifiService[855]/daemon T=main | pa_wifi_ap_ti.c pa_wifiAp_Start() 853 | WiFi Access Point Command('/legato/systems/current/apps/wifiService/read-only/pa_wifi.sh wlan1 WIFI_WLAN_UP') OK
> Jun 12 16:58:37 swi-mdm9x28 user.info Legato: INFO | wifiService[855]/daemon T=main | pa_wifi_ap_ti.c pa_wifiAp_Start() 923 | AP configuration: interface=wlan1 ssid=SIERRA TEST WIFI channel=1 max_num_sta=10
> Jun 12 16:58:37 swi-mdm9x28 user.info Legato: INFO | wifiService[855]/daemon T=main | pa_wifi_ap_ti.c pa_wifiAp_Start() 928 | LE_WIFIAP_SECURITY_NONE
> Jun 12 16:58:37 swi-mdm9x28 user.info Legato: INFO | wifiService[855]/daemon T=main | pa_wifi_ap_ti.c pa_wifiAp_Start() 1005 | hostapd.conf: ignore_broadcast_ssid=0
> Jun 12 16:58:37 swi-mdm9x28 user.info Legato: INFO | wifiService[855]/daemon T=main | pa_wifi_ap_ti.c pa_wifiAp_Start() 1029 | Waiting 15s for WiFi driver availability ...
> Jun 12 16:58:52 swi-mdm9x28 user.info Legato: INFO | wifiService[855]/daemon T=main | pa_wifi_ap_ti.c pa_wifiAp_Start() 1033 | Start Access Point
> Jun 12 16:58:52 swi-mdm9x28 user.info Legato: INFO | wifiService[855] | WIFIAP_HOSTAPD_START
> Jun 12 16:58:52 swi-mdm9x28 user.info Legato: INFO | wifiService[855]/daemon T=main | pa_wifi_ap_ti.c pa_wifiAp_Start() 1057 | WiFi Access Point Command('/legato/systems/current/apps/wifiService/read-only/pa_wifi.sh wlan1 WIFIAP_HOSTAPD_START') OK
> Jun 12 16:58:52 swi-mdm9x28 user.debug Legato: DBUG | wifiService[855]/framework T=main | le_wifiAp_server.c CleanupClientData() 139 | Client 0x7f57dd8c is closed !!!
> Jun 12 16:58:52 swi-mdm9x28 user.debug Legato: DBUG | wifiService[855]/daemon T=main | le_wifiClient.c CloseSessionEventHandler() 455 | sessionRef 0x7f57dcfc GetFirstSessionRef (nil)
> Jun 12 16:58:52 swi-mdm9x28 user.debug Legato: DBUG | wifiService[855]/framework T=main | le_wifiClient_server.c CleanupClientData() 139 | Client 0x7f57dcfc is closed !!!
> Jun 12 16:58:52 swi-mdm9x28 user.info Legato: INFO | wifiService[855] | Configuration file: /tmp/hostapd.conf
> Jun 12 16:58:52 swi-mdm9x28 user.info Legato: INFO | wifiService[855] | Using interface wlan1 with hwaddr 00:0c:43:76:87:22 and ssid "SIERRA TEST WIFI"
> Jun 12 16:58:52 swi-mdm9x28 user.debug kernel: [455.043493] mt7697core MAC 00000000: 00 00 00 00 00 00
> Jun 12 16:58:52 swi-mdm9x28 user.info Legato: INFO | wifiService[855] | Failed to set beacon parameters
> Jun 12 16:58:52 swi-mdm9x28 user.info Legato: INFO | wifiService[855] | Interface initialization failed
> Jun 12 16:58:52 swi-mdm9x28 user.info Legato: INFO | wifiService[855] | wlan1: interface state UNINITIALIZED->DISABLED
> Jun 12 16:58:52 swi-mdm9x28 user.info Legato: INFO | wifiService[855] | wlan1: AP-DISABLED 
> Jun 12 16:58:52 swi-mdm9x28 user.info Legato: INFO | wifiService[855] | wlan1: Unable to setup interface.
> Jun 12 16:58:52 swi-mdm9x28 user.info Legato: INFO | wifiService[855] | wlan1: interface state DISABLED->DISABLED
> Jun 12 16:58:52 swi-mdm9x28 user.info Legato: INFO | wifiService[855] | wlan1: AP-DISABLED 
> Jun 12 16:58:52 swi-mdm9x28 user.info Legato: INFO | wifiService[855] | hostapd_free_hapd_data: Interface wlan1 wasn't started
> Jun 12 16:58:52 swi-mdm9x28 user.info Legato: INFO | wifiService[855] | nl80211: deinit ifname=wlan1 disabled_11b_rates=0
> Jun 12 16:58:52 swi-mdm9x28 user.debug kernel: [455.141648] mt7697core MAC 00000000: 00 00 00 00 00 00
> 
> ```

The ssid doesn’t appear looking from my computer or phone. Dip switches up are 1,3,5,8.

Is there anything I could be missing?

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![fgodfrey](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@fgodfrey](https://mangoh.discourse.group/u/fgodfrey)\
**Post date:** [June 12, 2018, 6:55pm UTC](https://mangoh.discourse.group/t/solved-mediatek-wifi-wlan1-not-starting-properly/1544/2 "2018-06-12T18:55:06Z")

</div>

I’m not sure why, but there are TWO Wiki pages describing how to make this work. I initially tried the one you did with no success. The other one, which is similar (and has an almost-but-not-quite-identical URL), but has more steps, worked for me:

> **[mangOH/mangOH](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.

I think, in my case, it was the “mapuart” AT command that got me going. The documentation wasn’t clear on what, exactly, this did so I was nervous that I might somehow lose the console (or AT command access) after doing it, but it works fine and has no negative consequences (at least so far as I can tell).

I will caution that once you get it working, you may be extremely disappointed with the performance. I’m unable to get much more than about 850kbps out of the WiFi. It’s not useless, but for my application, it’s close to useless.

---

<div class="post-metadata">

**Author:** ![rauger1](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@rauger1](https://mangoh.discourse.group/u/rauger1)\
**Post date:** [June 12, 2018, 7:02pm UTC](https://mangoh.discourse.group/t/solved-mediatek-wifi-wlan1-not-starting-properly/1544/3 "2018-06-12T19:02:37Z")

</div>

@fgodfrey,

I had both wikis open, and I used the one that you linked to, I just accidentally posted the wrong wiki link.

and so you booted and run with success?

I just ran again, re-did the at command, and am still seeing “Failed to set beacon parameters”.

---

<div class="post-metadata">

**Author:** ![fgodfrey](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@fgodfrey](https://mangoh.discourse.group/u/fgodfrey)\
**Post date:** [June 12, 2018, 7:28pm UTC](https://mangoh.discourse.group/t/solved-mediatek-wifi-wlan1-not-starting-properly/1544/4 "2018-06-12T19:28:12Z")

</div>

I have, but I have not tried AP mode. I’m running in STA mode. “ifup wlan1” almost works correctly, but doesn’t correctly start wpa\_supplicant for WPA2 networks (this is for STA mode).

I think you may have a problem prior to the beacon mode error, though, since mt7697core seems to be trying to come up with a MAC address of all zero’s.

Try doing an “lsmod” and see what kernel modules are loaded? You should have mt7697common mt7697q mt7697serial mt7697wifi and, mangoh (not sure if that is mandatory).

---

<div class="post-metadata">

**Author:** ![rauger1](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@rauger1](https://mangoh.discourse.group/u/rauger1)\
**Post date:** [June 12, 2018, 8:03pm UTC](https://mangoh.discourse.group/t/solved-mediatek-wifi-wlan1-not-starting-properly/1544/5 "2018-06-12T20:03:07Z")

</div>

root@swi-mdm9x28:~# lsmod  
Tainted: G  
**2\_mt7697wifi\_core 70639 0 - Live 0xbf02e000 (O)**  
mac80211 437300 0 - Live 0xbf101000  
cfg80211 476220 2 2\_mt7697wifi\_core,mac80211, Live 0xbf060000  
spisvc 1069 0 - Live 0xbf05e000 (O)  
**9\_mangoh\_red\_dv5 8172 0 - Live 0xbf058000 (O)**  
4\_bmi160\_i2c 1396 0 - Live 0xbf054000 (O)  
3\_bmp280\_i2c 2631 0 - Live 0xbf050000 (O)  
3\_bmi160 5472 1 4\_bmi160\_i2c, Live 0xbf04b000 (O)  
2\_bmp280 9493 1 3\_bmp280\_i2c, Live 0xbf02a000 (O)  
**1\_mt7697serial 8150 1 2\_mt7697wifi\_core, Live 0xbf024000 (O)**  
**1\_mt7697q 19783 1 2\_mt7697wifi\_core, Live 0xbf01a000 (O)**  
0\_ltc294x 5591 0 - Live 0xbf015000 (O)  
0\_led 1935 0 - Live 0xbf011000 (O)  
0\_cp2130 20502 1 1\_mt7697q, Live 0xbf007000 (O)  
0\_bq24296 10860 0 - Live 0xbf000000 (O)

It looks like I have those modules loaded

---

<div class="post-metadata">

**Author:** ![rauger1](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@rauger1](https://mangoh.discourse.group/u/rauger1)\
**Post date:** [June 12, 2018, 10:57pm UTC](https://mangoh.discourse.group/t/solved-mediatek-wifi-wlan1-not-starting-properly/1544/6 "2018-06-12T22:57:10Z")

</div>

SOLVED:

config set dataConnectionService:/wifi/SSID “SSID of your WiFi” string  
config set dataConnectionService:/wifi/passphrase “password” string  
config set dataConnectionService:/wifi/interface wlan1 string  
config set dataConnectionService:/wifi/wpaSupplicantDriver wext string  
config set dataConnectionService:/wifi/secProtocol 3 int

^ this does not work

Use the command line ‘wifi ap’ commands

**root@swi-mdm9x28:~# wifi ap setssid "SIERRAWIFI"**  
SSID set successfully.  
**root@swi-mdm9x28:~# wifi ap setdriver 1**  
WPA driver set to ‘wext’.  
**root@swi-mdm9x28:~# wifi ap setmaxclients 1**  
Max number of clients set to 1.  
**oot@swi-mdm9x28:~# wifi ap setsecurityproto 1**  
**root@swi-mdm9x28:~# wifi ap setpassphrase "knockknock"**  
Passphrase set.  
**root@swi-mdm9x28:~# wifi ap setdiscoverable 1**  
Discoverable set to 1.  
**root@swi-mdm9x28:~# wifi ap start wlan1**

---

<div class="post-metadata">

**Author:** ![nick](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/nick/32/1380_2.png) [@nick](https://mangoh.discourse.group/u/nick)\
**Post date:** [June 13, 2018, 7:52pm UTC](https://mangoh.discourse.group/t/solved-mediatek-wifi-wlan1-not-starting-properly/1544/7 "2018-06-13T19:52:22Z")

</div>

Awesome work guys 👏🏼. Very excited to try out the MT functionality when it’s supported on the WP85.

---

<div class="post-metadata">

**Author:** ![Madan](https://avatars.discourse-cdn.com/v4/letter/m/6a8cbe/32.png) [@Madan](https://mangoh.discourse.group/u/Madan)\
**Post date:** [July 31, 2018, 5:27am UTC](https://mangoh.discourse.group/t/solved-mediatek-wifi-wlan1-not-starting-properly/1544/8 "2018-07-31T05:27:10Z")

</div>

Hi,

I got my new mangOH Red WP7608 boards last week.

We need to get the mangOH running as a server on a known TCP or a HTTP port to receive data from an exernal Wi-Fi Client. We dont want to add any other wifi router to bring them into a network, since the participants in the network are only these two. We leant that WP7608 can be configured to AP mode. And we want the other device get into this wifi network to get an IP address and connect to it.

I was trying to set the AP mode using wifiWebAp already installed on the board.

1. I started the app and opened the browser with 192.168.2.2:8080.
2. It opened a page to configure and set the device in AP mode. I started it with the default settings.
3. I scanned for the WiFi AP on my mobile and PC but nothing found with the default SSID configured nor there was a sign of a new Wifi ap. I tried to stop and start a couple of times but no avail.
4. Later turned off the device.
5. Today when powered the board, it lost the CF3 port IP address (192.168.2.2). When checked for ‘ipconfig /all’ on the host (windows 10), I get this (But earlier I used to see the ECM adapter with good IP)

* * *

Ethernet adapter Ethernet 2:

## Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Sierra Wireless LEGATO EthLink ECM #2 Physical Address. . . . . . . . . : 16-0E-D3-FC-1C-DC DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes Link-local IPv6 Address . . . . . : fe80::55bc:a980:2a8c:2b19%52(Preferred) **Autoconfiguration IPv4 Address. . : 169.254.43.25(Preferred)** Subnet Mask . . . . . . . . . . . : 255.255.0.0 Default Gateway . . . . . . . . . : DHCPv6 IAID . . . . . . . . . . . : 878890225 DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-21-28-61-85-C0-25-E9-27-2D-8F DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1 fec0:0:0:ffff::2%1 fec0:0:0:ffff::3%1 NetBIOS over Tcpip. . . . . . . . : Enabled

I tried to reboot it a few times but it won’t get the default IP of 192.168.2.2. Seems like It got stuck somewhere.

Please suggest if anyone has a solution for this to get it back or a process to reset the device.

Thanks  
Madan

---

<div class="post-metadata">

**Author:** ![rauger1](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@rauger1](https://mangoh.discourse.group/u/rauger1)\
**Post date:** [July 31, 2018, 2:03pm UTC](https://mangoh.discourse.group/t/solved-mediatek-wifi-wlan1-not-starting-properly/1544/9 "2018-07-31T14:03:09Z")

</div>

I’m not familiar with Windows, but in linux I had to manually add an ip address to the interface that the mangoh was connected through.

As for the wifi issue… Can you run wifiWebAp, connect on port 8080 and show the output of the web app so that we can see that it is attempting to initialize?

---

<div class="post-metadata">

**Author:** ![Madan](https://avatars.discourse-cdn.com/v4/letter/m/6a8cbe/32.png) [@Madan](https://mangoh.discourse.group/u/Madan)\
**Post date:** [July 31, 2018, 2:07pm UTC](https://mangoh.discourse.group/t/solved-mediatek-wifi-wlan1-not-starting-properly/1544/10 "2018-07-31T14:07:10Z")

</div>

Thanks for the reply.

As of now, I am not able connect to this board using CF3 USB.  
Console USB is working. Not sure if it works (browser) , if I run wifiWebAp from the console.  
I will give it a try.

---

<div class="post-metadata">

**Author:** ![Madan](https://avatars.discourse-cdn.com/v4/letter/m/6a8cbe/32.png) [@Madan](https://mangoh.discourse.group/u/Madan)\
**Post date:** [July 31, 2018, 2:16pm UTC](https://mangoh.discourse.group/t/solved-mediatek-wifi-wlan1-not-starting-properly/1544/11 "2018-07-31T14:16:34Z")

</div>

please check my other thread as well on the same issue.
