Mksys can't bind to non-existent server app 'wifiService'

Hello All,

Trying to build my first system for the WP7603 and hitting an issue. It looks like mksys can’t find the wifiService app. I created a simple system to show the problem. It consists of two hello-world-style apps and one that uses the WiFi Client Service. Each of the three apps successfully build on their own. When I try to build the system it fails because it can’t find the “server app ‘wifiService’.”

The file structure and some of their content is listed below. I’ve also included a ZIP file of the whole system at the bottom.

When building I’ve tried many variations of the --interface-search option to mksys as well as interfaceSearch option in the system definition file. Hopefully it’s not a bug and I’m just misunderstanding something. Thanks for any input!

Thanks Again!

File Structure

apps/
  testApp1/
    testApp1.adef
    testApp1Component/
      Component.cdef
      testApp1.c
  testApp2/
    testApp2.adef
    testApp2Component/
      Component.cdef
      testApp2.c
  testWifiApp/
    testWifiApp.adef
    testWifiAppComponent/
      Component.cdef
      testWifiApp.c
testSystem.sdef

System Definition

#include "$LEGATO_ROOT/default.sdef"

apps: {
  testApp1
  testApp2
  testWifiApp
}

appSearch: {
  $CURDIR/apps/testApp1
  $CURDIR/apps/testApp2
  $CURDIR/apps/testWifiApp
}

testApp1 Definition

executables: {
  testApp1 = (testApp1Component)
}

processes: {
  run: {
    (testApp1)
  }
}

testApp2 Definition

executables: {
  testApp2 = (testApp2Component)
}

processes: {
  run: {
    (testApp2)
  }
}

testWifiApp Definition

executables: {
  testWifiApp = (testWifiAppComponent)
}

processes: {
  run: {
    (testWifiApp)
  }
}

bindings: {
  testWifiApp.testWifiAppComponent.le_wifiClient -> wifiService.le_wifiClient
}

testWifiAppComponent Definition

sources: {
  testWifiApp.c
}

requires: {
  api: {
    ${LEGATO_ROOT}/interfaces/wifi/le_wifiClient.api
  }
}

Building The Apps

$ cd apps/testApp1/
$ mkapp -t wp76xx testApp1.adef 
[9/9] Packaging app

$ cd ../testApp2/
$ mkapp -t wp76xx testApp2.adef 
[9/9] Packaging app

$ cd ../testWifiApp/
$ mkapp -t wp76xx testWifiApp.adef   # <-- It builds here??
[12/12] Packaging app

Trying To Build The System

$ mksys -t wp76xx testSystem.sdef 
** Warning: Ignoring empty app specification
** Warning: Ignoring empty app specification
** Warning: Ignoring empty app specification
** ERROR:
... /testSystem/apps/testWifiApp/testWifiApp.adef:12:2: error: Binding to non-existent server app 'wifiService'.

$ mksys -t wp76xx --interface-search=$LEGATO_ROOT/interfaces/wifi testSystem.sdef 
** Warning: Ignoring empty app specification
** Warning: Ignoring empty app specification
** Warning: Ignoring empty app specification
** ERROR:
... /testSystem/apps/testWifiApp/testWifiApp.adef:12:2: error: Binding to non-existent server app 'wifiService'.

testSystem.zip (6.0 KB)

I got it to compile and figured I’d share what I did in case anyone else came across it. I went back to the docs and focused on the definition files. The section about bindings in the Application Definition says …

If server-side code was built using the ifgen tool and a compiler or using the mk tools and this executable was added to your app using a requires: or bundles: section, the tool reading your .adef file won’t know about the server-side interface. Use this work-around if you need to bind to one of those interfaces inside your own app:

bindings:
{
  clientExe.clientComponent.clientInterface -> *.le_data
}

This would bind the known client-side interface clientExe.clientComponent.clientInterface to the unknown server-side le_data interface served by a pre-built executable inside the current app.

So I modified the System Definition as well as the Component for the testWifiApp app …

Updated System Defintion

#include "$LEGATO_ROOT/default.sdef"

apps: {
  testApp1
  testApp2
  testWifiApp
}

appSearch: {
  $CURDIR/apps/testApp1
  $CURDIR/apps/testApp2
  $CURDIR/apps/testWifiApp
}

// need to search for interfaces since the apps/components
// don't use the full path
interfaceSearch: {
  ${LEGATO_ROOT}/interfaces/wifi
}

Updated testWifiApp Application Definition

executables: {
  testWifiApp = (testWifiAppComponent)
}

processes: {
  run: {
    (testWifiApp)
  }
}

bindings: {
  //testWifiApp.testWifiAppComponent.le_wifiClient -> wifiService.le_wifiClient
  testWifiApp.testWifiAppComponent.le_wifiClient -> *.le_wifiClient
}

Updated testWifiApp Component Definition

sources: {
  testWifiApp.c
}

requires: {
  api: {
    //${LEGATO_ROOT}/interfaces/wifi/le_wifiClient.api
    le_wifiClient.api
  }
}

Will It Work
I only got it to compile and didn’t really do anything with the wifi code. Hopefully I didn’t just trick it into compiling and the wifiService app is actually available once I start implementing it.

1 Like

Sorry, do you know if with this *.le_wifiClient the wifi app works? I can’t find a solution for versions below the 20 one…

I don’t see problem to build the testWifiApp inside above testSystem.zip on WP76 FW R13:

bindings: {
  testWifiApp.testWifiAppComponent.le_wifiClient -> wifiService.le_wifiClient
}

Hi @jyijyi unfortunately, with Legato versions below 20 I have this problem:


With 20one no because wifiService appears in the default apps.
The bind with the * doesn’t work: I just checked.
What did you do to make available wifiService with FW13? Have I to add something in the linux kernel module?

I did not use binding with *.
Here is my build command:

make: Entering directory `/home/owner/legato/workspace/testWifiApp/Target_Legato_Debug'
cd ..;mkapp -t wp76xx -o Target_Legato_Debug -w Target_Legato_Debug -i "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/interfaces/atServices" -i "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/interfaces/airVantage/legacy" -i "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/interfaces/watchdog" -i "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/interfaces/portService" -i "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/interfaces/supervisor" -i "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/interfaces/logDaemon" -i "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/interfaces/positioning" -i "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/interfaces/secureStorage" -i "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/interfaces" -i "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/interfaces/wifi" -i "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/interfaces/modemServices" -i "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/interfaces/airVantage" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/dataConnectionService/platformAdaptor/default" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/test/watchdogChain" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/apps/platformServices/airVantageConnector" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/airVantage" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/modules/WiFi/apps/tools/wifi" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/positioning" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/secStore" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/uartMode/platformAdaptor/default" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/portService" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/modemServices/platformAdaptor/default" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/audio/platformAdaptor/default" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/apps/tools" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/3rdParty" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/fwupdate/platformAdaptor/default" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/dataConnectionService" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/modules/WiFi/service" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/airVantage/platformAdaptor/default" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/fwupdate" -s "." -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/positioning/platformAdaptor/default" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/devMode" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/secStore/platformAdaptor/default" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/apps/platformServices/mqttClient" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/atServices" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/modemServices" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/uartMode" -C -g -X -g -L -g testWifiApp.adef
[1/12] Compiling C source
[2/12] Generating IPC interface code
[3/12] Compiling C source
[4/12] Generating IPC interface code
[5/12] Compiling C source
[6/12] Compiling C source
[7/12] Linking C library
[8/12] Linking C executable
[9/12] Bundling file
[10/12] Bundling file
[11/12] Creating info.properties
[12/12] Packaging app
make: Leaving directory `/home/owner/legato/workspace/testWifiApp/Target_Legato_Debug'

13:06:28 Build Finished (took 10s.953ms)

Sorry @jyijyi can you kindly say to me what did you do in you project of FW13 to make wifiService available? For example did you add libraries, kernel…etc?

I just compile the app.
Not relevant to kernel

It’s impossible, wifi services doesn’t appear in default apps for Legato versions below 20 :tired_face:

I don’t think so, i download fw R13, i can see wifi stuff in “app status” in my module

I see them only for Legato 20…for version19 no:
image
This is your code…

Did you use 13 or 13.1 version?

You can download the fw r13 legato source here

https://source.sierrawireless.com/resources/airprime/software/wp76xx/wp76xx-firmware-release-13-components/

I know but the fact is that I can’t make wifi available on FW 13 and I can’t make available green mangOH project on FW16 for dependancies problem. I need both on a same project :disappointed_relieved:
If I know how to make wifiService available on FW 13 for me is ok

I just compile with default R13 package, no problem is found

So why did you all this on your code if wifi services are embedded for FW13 as are you saying?

So I understand that I cannot use CAN and Wifi on the same project?

There is no relationship to to compile the app and this file in mangoh source

You can first install mangoh layer, and the update the wifi app

sorry @jyijyi I can now make available WiFi on FW version 13, ok. But I was wondering a thing. You gave me your mangOH_2_7_19 on FW13 to make available mux, spi and can. It works, ok. But: is there exist a version for Legato FW 16 version? I compiled my project looking to yours and it works on FW 13 and 13.1 but I can’t make it available on the last version of legato: It gives me lots of errors , it can’t find for example .sinc files. Has someone ever solved this issue? I don’t think it is a good thing not to compile a project on the latest SW versions released, at least for the other HWs I have always worked with this in mind. Sorry for the inconvenience

You might try the latest mangoh code