After getting SampleApp running the next steps to bring NetSoM development board to fully functional Alexa development kit was adding voice controllers.
Looks simple at first glance.
Just make few changes in source code as explained in manual above:
- add definition to enable controller you are going to use:
- add option to cmake file:
- and provide handlers to skill you enabled:
system(“echo ‘$(date) ON’ > /tmp/alexa.log”);
system(“echo ‘$(date) OFF’ > /tmp/alexa.log”);
writing to log file in that case. But any commands and/or scripts might be called to make actions you need to be controlled by voice commands.
Surprisingly resulted built image was 21 Mb size. So running it from RAM (/tmp) folder was available only. Copying via SCP:
# scp <host_user>@<host_address>:/home/<host_user>/imx6ull-openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/alexa/alexa-sdk-build/CapabilityAgents/PowerController/src/libPowerController.so /tmp/
# scp <host_user>@<host_address>:/home/<host_user>/imx6ull-openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/alexa/alexa-sdk-build/SampleApp/src/libLibSampleApp.so /tmp/
# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp
# /tmp/SampleApp /etc/alexa/AlexaClientSDKConfig.json
After registering the device (as explained in previous post) Alexa reacts on voice commands as expected:
Commit with changes made to enable Alexa controllers might be found here.
Next step need to be done – hardware/software migration from 16 Mb flash to 32 Mb. For now we did it and voice controlling enabled SampleApp available on NetSoM development board out of box.