Problem with Voice call sample app

Sorry, I did not succeed.
It needs le_appCtrl_interface.h, which itself needs: le_limit_interface.h and le_appCtrl_common.h.

I couldn’t find le_appCtrl_common.h anywhere.

But I think my problem is different:

The voiceCallApp sample code provided by Legato is originally intended to be launched by doing the
SSH console manual operation: app start voiceCallService

I modified the voiceCallApp by adding functions (to be compliant to my application) and I’d like to get rid of this manual SSH console operation.

Problem is that the voiceCallApp does not seem to lauch until the manual SSH console operation is performed, then I can’t use system(“app start voiceCallService”); or le_appCtrl_Start…

Any ideas? :thinking:

How about using shell script?

I’m not familiar with shell script but ok, I’m going to try this way!

Do you think this script can be executed independantly of the main app? (since main app doesn’t launch until the VoiceCallService is executed)

Here says shell script can be run in app

jyijyi, it won’t work since the app does not lauch, so the “system(”/tmp/test.sh")" instruction won’t be completed!

My problem is that my app does not lauch. (until I do the “app start voiceCallService” in SSH console)

  1. Didn’t here already say it is running?
    Jan 6 00:05:52 | voiceCallApp[1429] | | sh:
    Jan 6 00:05:52 | voiceCallApp[1429] | | app: not found
    Jan 6 00:05:52 | voiceCallApp[1429] | |

  2. You can run the shell script during startup to start the service.

3.Another method is that you rebuild the legato.cwe after you make the voicecallservice to run during start

https://github.com/legatoproject/legato-af/blob/master/apps/platformServices/voiceCallService.adef

Hi jyijyi,

Thanks again for helping me!

  1. The main app only runs after manually starting the voiceCallService app in SSH console. I’d like the main app automatically lauch at power up.

  2. and 3. Interesting, I will look after that and come back to you!

It’s working!!!

I edited the .adef file in order to make the voicecallservice to run during start (Point 3 of last jyijyi post)

Thanks jyijyi you’re my hero :star_struck:

I also have a problem with the voiceCallApp when building the app.

I cd’ed to the folder of the app and want to run the following command:

mkapp -t wp76xx voiceCallApp.adef

but then I get the following error regarding lines 289/290 of the voiceCallApp.c code

[1/7] Compiling C source
FAILED: _build_voiceCallApp/wp76xx/component/670c8cde8414b1734b5871a2790f7c28/obj/d3b7b80574658ef4c8492196037533d0.o
/home/mangoh/workspace/leaf-data/wp76stable/wp76-toolchain/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc --sysroot=/home/mangoh/workspace/leaf-data/wp76stable/wp76-toolchain/sysroots/armv7a-neon-poky-linux-gnueabi -MMD -MF _build_voiceCallApp/wp76xx/component/670c8cde8414b1734b5871a2790f7c28/obj/d3b7b80574658ef4c8492196037533d0.o.d -c /home/mangoh/workspace/legato/apps/sample/voiceCallApp/voiceCallComponent/voiceCallApp.c -o _build_voiceCallApp/wp76xx/component/670c8cde8414b1734b5871a2790f7c28/obj/d3b7b80574658ef4c8492196037533d0.o -DLE_FILENAME=basename /home/mangoh/workspace/legato/apps/sample/voiceCallApp/voiceCallComponent/voiceCallApp.c -Wall -fPIC -Werror -fvisibility=hidden -DMK_TOOLS_BUILD -DLEGATO_EMBEDDED -I ./_build_voiceCallApp/wp76xx -I/home/mangoh/workspace/leaf-data/wp76stable/fx30-cat1-legato/interfaces -I/home/mangoh/workspace/leaf-data/wp76stable/fx30-cat1-legato/framework/include -I/home/mangoh/workspace/legato/apps/sample/voiceCallApp -I./_build_voiceCallApp/wp76xx/component/670c8cde8414b1734b5871a2790f7c28/src -I./_build_voiceCallApp/wp76xx/api/b1af0d9a397c39cea73fac3245f4150b/server -I./_build_voiceCallApp/wp76xx/api/451d8f6586c742a94ddc86f1769bfb2a/client -I./_build_voiceCallApp/wp76xx/api/1c3a360c2dde1770b87318e344d689ed/client -I./_build_voiceCallApp/wp76xx/api/159fe4937650fe5a5c28bd434057dae2/client -I./_build_voiceCallApp/wp76xx/api/159fe4937650fe5a5c28bd434057dae2/client -I./_build_voiceCallApp/wp76xx/api/1c3a360c2dde1770b87318e344d689ed/client -DLE_COMPONENT_NAME=voiceCallComponent -DLE_LOG_SESSION=voiceCallComponent_LogSession -DLE_LOG_LEVEL_FILTER_PTR=voiceCallComponent_LogLevelFilterPtr “-DCOMPONENT_INIT=LE_CI_LINKAGE LE_SHARED void _voiceCallComponent_COMPONENT_INIT()”
In file included from /home/mangoh/workspace/leaf-data/wp76stable/fx30-cat1-legato/framework/include/legato.h:200:0,
from /home/mangoh/workspace/legato/apps/sample/voiceCallApp/voiceCallComponent/voiceCallApp.c:1:
/home/mangoh/workspace/legato/apps/sample/voiceCallApp/voiceCallComponent/voiceCallApp.c: In function ‘OpenAudioFile’:
/home/mangoh/workspace/legato/apps/sample/voiceCallApp/voiceCallComponent/voiceCallApp.c:290:44: error: implicit declaration of function ‘LE_ERRNO_TXT’; did you mean ‘_ERRNO_H’? [-Werror=implicit-function-declaration]
AudioFilePath, errno, LE_ERRNO_TXT(errno)); // was LE_ERRNO_TXT before
^
/home/mangoh/workspace/leaf-data/wp76stable/fx30-cat1-legato/framework/include/le_log.h:468:37: note: in definition of macro ‘_LE_LOG_MSG’
formatString, ##VA_ARGS);
^~~~~~~~~~~
/home/mangoh/workspace/legato/apps/sample/voiceCallApp/voiceCallComponent/voiceCallApp.c:289:13: note: in expansion of macro ‘LE_ERROR’
LE_ERROR(“Open file %s failure: errno.%d (%s)”, // was errno.%d (%s) before
^~~~~~~~
/home/mangoh/workspace/legato/apps/sample/voiceCallApp/voiceCallComponent/voiceCallApp.c:289:22: error: format ‘%s’ expects argument of type ‘char *’, but argument 10 has type ‘int’ [-Werror=format=]
LE_ERROR(“Open file %s failure: errno.%d (%s)”, // was errno.%d (%s) before
^
AudioFilePath, errno, LE_ERRNO_TXT(errno)); // was LE_ERRNO_TXT before
~~~~~~~~~~~~~~~~~~~
/home/mangoh/workspace/leaf-data/wp76stable/fx30-cat1-legato/framework/include/le_log.h:468:21: note: in definition of macro ‘_LE_LOG_MSG’
formatString, ##VA_ARGS);
^~~~~~~~~~~~
/home/mangoh/workspace/legato/apps/sample/voiceCallApp/voiceCallComponent/voiceCallApp.c:289:13: note: in expansion of macro ‘LE_ERROR’
LE_ERROR(“Open file %s failure: errno.%d (%s)”, // was errno.%d (%s) before
^~~~~~~~
cc1: all warnings being treated as errors
ninja: build stopped: subcommand failed.

Does anyone know what I’m doing wrong?

I also tried this before:

mksys -t wp76xx voiceCallApp.sdef

as described here:

I’m afraid this throws the same error.

“-Werror=implicit-function-declaration” makes the problem.

Either you fix this in the code or you add “-Wno-error=implicit-function-declaration” flag during your compilation

After adding

cflags:
{
-Wno-error=implicit-function-declaration
}

to the Component.cdef file this is what shows up next

/home/mangoh/workspace/legato/apps/sample/voiceCallApp/voiceCallComponent/voiceCallApp.c:290:44: warning: implicit declaration of function ‘LE_ERRNO_TXT’; did you mean ‘_ERRNO_H’? [-Wimplicit-function-declaration]
AudioFilePath, errno, LE_ERRNO_TXT(errno)); // was LE_ERRNO_TXT before
^
/home/mangoh/workspace/leaf-data/wp76stable/fx30-cat1-legato/framework/include/le_log.h:468:37: note: in definition of macro ‘_LE_LOG_MSG’
formatString, ##VA_ARGS);
^~~~~~~~~~~
/home/mangoh/workspace/legato/apps/sample/voiceCallApp/voiceCallComponent/voiceCallApp.c:289:13: note: in expansion of macro ‘LE_ERROR’
LE_ERROR(“Open file %s failure: errno.%d (%s)”,
^~~~~~~~
/home/mangoh/workspace/legato/apps/sample/voiceCallApp/voiceCallComponent/voiceCallApp.c:289:22: error: format ‘%s’ expects argument of type ‘char *’, but argument 10 has type ‘int’ [-Werror=format=]
LE_ERROR(“Open file %s failure: errno.%d (%s)”,
^
AudioFilePath, errno, LE_ERRNO_TXT(errno));
~~~~~~~~~~~~~~~~~~~
/home/mangoh/workspace/leaf-data/wp76stable/fx30-cat1-legato/framework/include/le_log.h:468:21: note: in definition of macro ‘_LE_LOG_MSG’
formatString, ##VA_ARGS);
^~~~~~~~~~~~
/home/mangoh/workspace/legato/apps/sample/voiceCallApp/voiceCallComponent/voiceCallApp.c:289:13: note: in expansion of macro ‘LE_ERROR’
LE_ERROR(“Open file %s failure: errno.%d (%s)”,
^~~~~~~~
cc1: all warnings being treated as errors

I figure fixing the errors in the code might better than adding flags. It’s somewhat weird though as I’m working with a sample app and it throws errors anyway even though I didn’t change the code.

When I try to fix the error though like so

LE_ERROR(“Open file %s failure: errno.%d (%s)”,
AudioFilePath, errno, _ERRNO_H(errno)); // was LE_ERRNO_TXT before
DisconnectAllAudio(reference);

I get another error

“-DCOMPONENT_INIT=LE_CI_LINKAGE LE_SHARED void _voiceCallComponent_COMPONENT_INIT()” -Wno-error=implicit-function-declaration
In file included from /home/mangoh/workspace/leaf-data/wp76stable/fx30-cat1-legato/framework/include/legato.h:158:0,
from /home/mangoh/workspace/legato/apps/sample/voiceCallApp/voiceCallComponent/voiceCallApp.c:1:
/home/mangoh/workspace/legato/apps/sample/voiceCallApp/voiceCallComponent/voiceCallApp.c: In function ‘OpenAudioFile’:
/home/mangoh/workspace/legato/apps/sample/voiceCallApp/voiceCallComponent/voiceCallApp.c:290:44: error: called object is not a function or function pointer
AudioFilePath, errno, _ERRNO_H(errno)); // was LE_ERRNO_TXT before
^
/home/mangoh/workspace/leaf-data/wp76stable/fx30-cat1-legato/framework/include/le_log.h:490:41: note: in expansion of macro ‘_LE_LOG_MSG’
#define LE_ERROR(formatString, …) _LE_LOG_MSG(LE_LOG_ERR, formatString, ##VA_ARGS)
^~~~~~~~~~~
/home/mangoh/workspace/legato/apps/sample/voiceCallApp/voiceCallComponent/voiceCallApp.c:289:13: note: in expansion of macro ‘LE_ERROR’
LE_ERROR(“Open file %s failure: errno.%d (%s)”,
^~~~~~~~

The flag as described above is still implemented.

Don’t change the code, add another flag “-Wno-error=format=”

Don’t change as in leave it like this or leave it the way it originally was?

LE_ERROR(“Open file %s failure: errno.%d (%s)”,
AudioFilePath, errno, LE_ERRNO_TXT(errno));
DisconnectAllAudio(reference);

Because after adding the additional flag

cflags:
{
-Wno-error=implicit-function-declaration
-Wno-error=format=
}

it looks like I get a similar error

/home/mangoh/workspace/legato/apps/sample/voiceCallApp/voiceCallComponent/voiceCallApp.c:290:44: warning: implicit declaration of function ‘LE_ERRNO_TXT’; did you mean ‘_ERRNO_H’? [-Wimplicit-function-declaration]
AudioFilePath, errno, LE_ERRNO_TXT(errno));
^
/home/mangoh/workspace/leaf-data/wp76stable/fx30-cat1-legato/framework/include/le_log.h:468:37: note: in definition of macro ‘_LE_LOG_MSG’
formatString, ##VA_ARGS);
^~~~~~~~~~~
/home/mangoh/workspace/legato/apps/sample/voiceCallApp/voiceCallComponent/voiceCallApp.c:289:13: note: in expansion of macro ‘LE_ERROR’
LE_ERROR(“Open file %s failure: errno.%d (%s)”,
^~~~~~~~
/home/mangoh/workspace/legato/apps/sample/voiceCallApp/voiceCallComponent/voiceCallApp.c:289:22: warning: format ‘%s’ expects argument of type ‘char *’, but argument 10 has type ‘int’ [-Wformat=]
LE_ERROR(“Open file %s failure: errno.%d (%s)”,
^
AudioFilePath, errno, LE_ERRNO_TXT(errno));
~~~~~~~~~~~~~~~~~~~
/home/mangoh/workspace/leaf-data/wp76stable/fx30-cat1-legato/framework/include/le_log.h:468:21: note: in definition of macro ‘_LE_LOG_MSG’
formatString, ##VA_ARGS);
^~~~~~~~~~~~
/home/mangoh/workspace/legato/apps/sample/voiceCallApp/voiceCallComponent/voiceCallApp.c:289:13: note: in expansion of macro ‘LE_ERROR’
LE_ERROR(“Open file %s failure: errno.%d (%s)”,
^~~~~~~~

I don’t see problem to compile in Developer Studio with WP76 R13 package.
You can use my application attached.
voiceCallTest.rar (343.2 KB)

As far as I can tell there is no audio file playback implemented as it’s the case in the voiceCallApp.
This is what I want to test since I can already place a call with a different script (https://github.com/mangOH/mangOH/tree/master/samples/tutorials/voice/mangohVoiceCall).

I don’t see problem to compile the mangohVoiceCall app in Developer Studio with WP76 R13 package.

Not quite understand your situation, maybe you can directly attached your app here.

This is the app I’ve been trying to get running:

I’m afraid it’s too big to zip and upload here (the limit is 4mb) which is why I’m sharing the link with you.
The only changes I’ve made to this app is what you’ve suggested - adding new flags to Component.cdef like so

cflags:
{
    -Wno-error=implicit-function-declaration
    -Wno-error=format=
}