Problem with Voice call sample app

Hi all,

I imported this sample app from github. My need is just to perform a call and play a .wav file during a hold.

So maybe this app is overdimensioned but I wanted to start by something which has been validated.

I just slightly modified the component INIT section to perform a call (see below)

When buiding I get a warning about the bindings (see image below) and when running the app it seems to stop before the first instructions. I also attached output logs.

Blockquote

COMPONENT_INIT
{
LE_INFO(“voiceCallApp started!”);

char* number = "+33612345678";

LE_INFO("Make sure voiceCallService is running and SIM is registered on Network and is in ready state.");
system("app start voiceCallService");
//! [AddStateHandler]
VoiceCallHandlerRef = le_voicecall_AddStateHandler(MyCallEventHandler, NULL);
//! [AddStateHandler]


	   puts(number);

	   myCallRef = le_voicecall_Start(number);
	   if (!myCallRef)
	   {
		   LE_INFO("Problem with number");
	   }
	   VoiceCallHandlerRef = le_voicecall_AddStateHandler(MyCallEventHandler, NULL);
	    //! [AddStateHandler]

}

Blockquote

Blockquote

Mar 22 14:27:13 | supervisor[645]/supervisor T=main | app.c app_Start() 2926 | Starting app ‘voiceCallApp’
Mar 22 14:27:13 | supervisor[645]/supervisor T=main | app.c CreateFileLink() 1619 | Created file link ‘/legato/systems/current/apps/voiceCallApp/read-only/lib/libComponent_voiceCallComponent.so’ to '/legato/systems/current/appsWriteable/
Mar 22 14:27:13 | supervisor[645]/supervisor T=main | app.c CreateFileLink() 1619 | Created file link ‘/legato/systems/current/apps/voiceCallApp/read-only/lib/libComponent_ctrlComponent.so’ to '/legato/systems/current/appsWriteable/voice
Mar 22 14:27:13 | supervisor[645]/supervisor T=main | app.c CreateFileLink() 1619 | Created file link ‘/legato/systems/current/apps/voiceCallApp/read-only/bin/voiceCallApp’ to '/legato/systems/current/appsWriteable/voiceCallApp/bin/voice
Mar 22 14:27:13 | supervisor[645]/supervisor T=main | app.c CreateFileLink() 1619 | Created file link ‘/legato/systems/current/apps/voiceCallApp/read-only/bin/voice’ to ‘/legato/systems/current/appsWriteable/voiceCallApp/bin/voice’.
Mar 22 14:27:13 | supervisor[645]/supervisor T=main | app.c CreateFileLink() 1619 | Created file link ‘/legato/systems/current/apps/voiceCallApp/read-only/male.wav’ to ‘/legato/systems/current/appsWriteable/voiceCallApp/male.wav’.
Mar 22 14:27:13 | supervisor[645]/supervisor T=main | app.c CreateFileLink() 1619 | Created file link ‘/legato/systems/current/apps/voiceCallApp/read-only/piano.wav’ to ‘/legato/systems/current/appsWriteable/voiceCallApp/piano.wav’.
Mar 22 14:27:13 | supervisor[645]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxCoreDumpFileBytes to value 102400.
Mar 22 14:27:13 | supervisor[645]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxFileBytes to value 102400.
Mar 22 14:27:13 | supervisor[645]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxLockedMemoryBytes to value 8192.
Mar 22 14:27:13 | supervisor[645]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxFileDescriptors to value 256.
Mar 22 14:27:13 | supervisor[645]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxMQueueBytes to value 512.
Mar 22 14:27:13 | supervisor[645]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxThreads to value 20.
Mar 22 14:27:13 | supervisor[645]/supervisor T=main | resourceLimits.c SetRLimitValue() 282 | Setting resource limit maxQueuedSignals to value 100.
Mar 22 14:27:13 | supervisor[645]/supervisor T=main | proc.c proc_Start() 1389 | Starting process ‘voiceCallApp’ with pid 2519
Mar 22 14:27:13 | updateDaemon[684]/updateDaemon T=main | app.c app_InstallIndividual() 788 | App voiceCallApp <9b7d2a67818a2bd944962e4d3dc120d4> installed
Mar 22 14:27:13 | updateDaemon[684]/updateDaemon T=main | updateDaemon.c ApplyAppUpdate() 914 | App ‘voiceCallApp<9b7d2a67818a2bd944962e4d3dc120d4>’ installed properly.
Mar 22 14:27:13 | updateDaemon[684]/updateDaemon T=main | updateDaemon.c StartProbation() 218 | System on probation (timer started).
Mar 22 14:27:13 | supervisor[645]/supervisor T=main | supervisor.c SigChildHandler() 783 | Reaping unconfigured child process 2518.
Mar 22 14:27:13 | supervisor[2519]/supervisor T=main | proc.c proc_Start() 1354 | Execing ‘voiceCallApp’
Mar 22 14:27:13 | avcDaemon[1053]/avcDaemon T=main | avcAppUpdate.c NotifyObj9List() 691 | Found 2 object 9 instances
Mar 22 14:27:13 | avcDaemon[1053]/avcDaemon T=main | avcAppUpdate.c NotifyObj9List() 692 | obj9ListLen; 25 obj9List: </lwm2m/9/0>,</lwm2m/9/1>

Have you tested with AT command first?

Hi jyijyi,

Very useful tip! File playing is indeed working with AT commands.

I now can make Voice call sample app work, but have to manually enter “app start voiceCallService” in the SSH console to do so.

I tried inserting system(“app start voiceCallService”); in the .c file but it seems it’s not starting the voiceCallService. What could be the cause?

Your app needs to be unsandboxed

It is already unsandboxed. :neutral_face:

Each time I perform a system(“app start voiceCallService”); instruction I get this (in red) in the log file:

Blockquote

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] | |

Not sure if you need to use absolute path for app command.
Can you try to find it in console?
find / -name “app”

Dear jyijyi,

Here’s what I get for voiceCallApp (my client app) and voiceCallService:

I mean this command
find / -name “app”

Or you can use this one
https://docs.legato.io/latest/c_appCtrl.html

Hi jyijyi,

The find / -name “app” did not succeed:

But I noticed a warning during connection to the device:

Here is my adef file:

Blockquote

start: auto
sandboxed: false

requires:
{
configTree:
{
[w] voiceCallApp // Write access to config data.
}
}

executables:
{
voiceCallApp = ( voiceCallComponent)
voice = ( ctrlComponent )
}

processes:
{
run:
{
( voiceCallApp )
}
}

bindings:
{
voiceCallApp.voiceCallComponent.le_voicecall -> voiceCallService.le_voicecall
voiceCallApp.voiceCallComponent.le_audio -> audioService.le_audio
voice.ctrlComponent.ctrlVC -> voiceCallApp.voiceCallComponent.ctrlVC
voiceCallApp.voiceCallComponent.le_sms -> modemService.le_sms
}

How about using this?

https://docs.legato.io/latest/c_appCtrl.html

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