Ok for the record here is how I did:
Follow https://github.com/mangOH/mangOH/wiki/mangOH-Red-mt7697-WiFi until the section Patch Legato
- Install the .spk from here Release11_WP77xx
- 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
Any ideas why I can’t connect ?