Problem with Voice call sample 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

legato-af/voiceCallService.adef at master · legatoproject/legato-af · GitHub

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 (mangOH/samples/tutorials/voice/mangohVoiceCall at master · mangOH/mangOH · GitHub).

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=
}

So basically what I want to be able to do is call a cellphone using the mangOH Green and when the cellphone picks up I want the mangOH Green to play a .wavfile.

have you tried with AT!AVAUDIO command?

BTW, I don’t see problem to compile the voiceCallApp app in Developer Studio with WP76 Legato 19.11.0 package.

I’ve tried this How to do audio record and playback of VoLTE calls using WP7607 module - #5 by shatrughan - WP Series - Sierra Wireless Forum. There you described a similar approach.

root@swi-mdm9x28-wp:~# microcom /dev/ttyAT
ati3
Manufacturer: Sierra Wireless, Incorporated
Model: WP7607
Revision: SWI9X07Y_02.25.02.01 000000 jenkins 2019/01/30 08:13:05
IMEI: 359779081234565
IMEI SV: 6
FSN: VN730485080103
+GCAP: +CGSM

OK
at!avcfg=5,1,2
OK
AT!AVSETPROFILE=5
OK
AT!AVAUDIO=1,1,/home/root/0-to-9_8k.wav
OK
[ 729.500484] afe_send_custom_topology_block: AFE SVC cal has invalid size: 0!
[ 729.506509] afe_send_custom_topology: No cal sent for cal_index 7! ret -22
[ 729.540317] afe_get_cal_topology_id: [AFE_TOPOLOGY_CAL] not initialized for this port 4096
[ 729.558792] q6asm_callback: cmd = 0x10da1 returned error = 0x3
[ 729.563725] q6asm_send_cal: DSP returned error[3] audio audstrm cal send
[ 729.582035] adm_callback: cmd = 0x10328 returned error = 0x3
[ 729.586698] send_adm_cal_block: DSP returned error[ADSP_EUNSUPPORTED]
[ 735.634827] BUG: sleeping function called from invalid context at /work/build_src/tmp/work-shared/swi-mdm9x28-wp/kernel-source/kernel/locking/mutex.c:97
[ 735.647457] in_atomic(): 0, irqs_disabled(): 128, pid: 2693, name: aplay
at!avaudio=1,0
OK

ATCommands don’t seem to work for me.

image

On a side note, I talked to someone at Sierra Wireless the other day and they said that I shouldn’t develop in Developer Studio because it’s outdated.

Then you can move to VSCode if you want. To me, the tool is the same for compilation.
BTW, you can also enter AT command in modem port in device manager. But I have no idea why it does not work for microcom…

It seems like AT commands weren’t enabled. After following these instructions https://linuxize.com/post/at-command-in-linux/ it can type in AT commands in Ubuntu’s terminal.

It looks like I can enter this:

root@swi-mdm9x28-wp:~# microcom /dev/ttyAT
ati3
OK
at!avcfg=5,1,2
OK
AT!AVSETPROFILE=5
OK

But after entering

AT!AVAUDIO=1,1,/home/mangOH/sample.wav

all it says is ERROR.

Do you know what the problem might be and is there a way to get a more detailed description of the error?

do you really have this file “/home/mangOH/sample.wav” on WP76 module?
It is strange that ati3 is returning nothing…
Why don’t you directly enter AT command on the modem port in Windows device manager?