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


#1

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)


#2

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.