I am working on updating some wifi-driver software. My end goal is to be able to trigger the wifi on/off and use a callback function to do something whenever a new device connects. Right now, the legato code supports 3 apps that work via the command line to perform “sample” functionality, but the only way to control it is through bash, so I can’t get a callback function into the mix or get notified when there is a connection. I would like to embed the functionality into some code for better control. Unfortunately, I can’t figure out where all of the source files are.
I went through the setup here http://legato.io/legato-docs/latest/basicBuildLegato.html#buildDownload , and installed everything. I ran cfgLegato which sets up the development environment variables.
So, for example, one issue is compiling the open source wifi code here: https://github.com/legatoproject/legato-WiFi . When I run “make wp85”, I get an error saying there are missing files. I thought maybe this may just be reference code without a working makefile, so I pulled all of the wifi code out into my own little directory, but there are a ton of function calls that don’t seem to be declared anywhere. I downloaded the git repo here for release 17.10: https://github.com/legatoproject/legato-af.git and the function is nowhere to be found. For example, here is a link to a search i did through the whole legato project for a function declaration I am getting an error on with one result - the invocation of the function: https://github.com/search?q=org%3Alegatoproject+le_wifiClient_GetClientSessionRef&type=Code . This is one of a few hundred function calls that I can’t find the declaration for. Furthermore, “interface.h” file seems to be required for every file, is there any way that I can generate this? All of the .c files include the same “interface.h” file but there have to be 50 in the legato source tree.
Overall, I am lost on how I should go about this. Do you have any idea about how my task could be accomplished, or do you have any other ideas?
Thank you for your time!
Modules: wp85, wp750x
SDK Path: /home/mangoh/legato/packages/legato.sdk.17.6.0.wp85-wp75-native-x86_64-201707120921
Framework Path: /home/mangoh/legato/packages/legato.framework.17.6.0.wp85-wp750x-201707120855 - $LEGATO_ROOT
Toolchain Path: /home/mangoh/legato/packages/legato.toolchain.1.7.3.SWI9X15Y_07121000-wp85-wp750x-native-x86_64-201707120848 - $WP85_TOOLCHAIN_DIR $WP750X_TOOLCHAIN_DIR
Device Image Path: /home/mangoh/legato/packages/legato.device.image.7.12.10.00.wpX5-201707120854 - $LEGATO_DEVICE_IMAGE
Recovery tools Path: /home/mangoh/legato/packages/legato.recovery.18.104.22.168.linux-201704190909 - $LEGATO_RECOVERY
No toolchain found for target ‘ar7’.
Unable to find compatible cross-build toolchain for target ‘ar7’.
No toolchain found for target ‘ar86’.
Unable to find compatible cross-build toolchain for target ‘ar86’.
Toolchain specified for target ‘wp76xx’ is invalid.
Unable to find compatible cross-build toolchain for target ‘wp76xx’.
Toolchain specified for target ‘ar758x’ is invalid.
Unable to find compatible cross-build toolchain for target ‘ar758x’.
Toolchain specified for target ‘ar759x’ is invalid.
Unable to find compatible cross-build toolchain for target ‘ar759x’.
Toolchain specified for target ‘em75xx’ is invalid.
Unable to find compatible cross-build toolchain for target ‘em75xx’.
 I cloned the repo here: https://github.com/legatoproject/legato-WiFi.git and tried to make and got an error that a source file could not be found:
********************* VERSION ********************
Legato WiFi version is 17.09.0-7-g5445645
make -C /home/mangoh/repos/legato-WiFi/service wp85
make: Entering directory '/home/mangoh/repos/legato-WiFi/service’
mkapp -v -t wp85
Env var ‘WP77XX_TOOLCHAIN_DIR=/opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi’ became ‘SHELL=/bin/bash’.
Environment variables are different this time.
Parsing file: ‘/home/mangoh/repos/legato-WiFi/service/wifiService.adef’.
Modelling application: 'wifiService’
defined in '/home/mangoh/repos/legato-WiFi/service/wifiService.adef’
Application ‘wifiService’ contains executable ‘wifiService’.
Parsing file: ‘/home/mangoh/repos/legato-WiFi/service/daemon/Component.cdef’.
Modelling component: 'daemon’
found at: ‘/home/mangoh/repos/legato-WiFi/service/daemon’
/home/mangoh/repos/legato-WiFi/service/daemon/Component.cdef:15:4: error: Couldn’t find source file '/home/mangoh/repos/legato-WiFi/…/service/platformAdaptor/ti/pa_wifi_client_ti.c’
Makefile:10: recipe for target ‘wp85’ failed
make: *** [wp85] Error 1
make: Leaving directory '/home/mangoh/repos/legato-WiFi/service’
Makefile:86: recipe for target ‘/home/mangoh/repos/legato-WiFi/service/wifiService.wp85.update’ failed
make: *** [/home/mangoh/repos/legato-WiFi/service/wifiService.wp85.update] Error 2