MultiApp: start an application from my own code


#1

I use MultiApp for my project. Now I like to start or stop an application from inside an other application. I know there isn’t an API for this, so I use at-command for this:
adl_atCmdCreate ( “at+startapp=1”, FALSE, ( adl_atRspHandler_t ) NULL, NULL );
but this doesn’t work.
Has anybody an idea how I can do this?


#2

Fix it so that is does work! :unamused:

If you want help with that, you are going to have to give a lot more detail about what you’ve tried, and in what way exactly it “doesn’t work”

See: catb.org/~esr/faqs/smart-questions.html


#3

ok, again:
I’ve some applications that use MultiApp-Library on OpenAT v4.21. With a terminal on UART1 I can start an application with “at+test=1” (that’s a MultiApp-Feature). This works.
Now I like to start one application from inside another running application. MultiApp don’t have any API-function for this. So I tried to start the application with:
s8 res = adl_atCmdCreate ( “at+test=1\r”,
FALSE,
atResp,
“*”,
NULL);
‘res’ is 0 (OK) after this call, but the callback-function ‘atResp’ receives an error-message. I think this is because the at-command sent with adl_atCmdCreate is not filtered by an adl_atCmdSubscribe mechanism (Note 2 from adl_atCmdCreate description in the ADL User Guide).
So I search an other way to start (and stop) an application.
Is there a way to send an at-command that is filtered? Or is there a better way to control multiple applications than MultiApp? …


#4

Why do you say you just “think” this?
This is precisely what the User Guide says - you cannot do it!

It is behaving precisely as documented!

You will have to call the start & stop functions directly - not via AT command.

No - that is exactly what Note 2 from adl_atCmdCreate description in the ADL User Guide is telling you!


#5

Ok, this will work. But if I start an application this way, it is not registered as running in MultiApp. So I can’t see if an application is running or not (and can’t stop it with at-commands).
I think there are two solutions:

  • call the start & stop functions directly (and don’t use MultiApp, because it don’t work proper then)
  • extend the MultiApp-Library myself. Is this allowed by copyright? I couldn’t find a clear information.

thanks for your answers


#6

The copyright notice is at the top of every source file:

/********************************************************************************************/
/*  multi_app.c   -  Copyright Wavecom S.A. (c) 2003                                        */
/*                                                                                          */
/*                                                                                          */
/* DISCLAIMER OF WARRANTY                                                                   */
/* ======================                                                                   */
/* This Software is provided free of charge on an 'as is' basis. No warranty is given       */
/* by Wavecom S.A. in relation to the Software of the uses to which it may be put by you,   */
/* the user, or its merchantability, fitness or suitability for any particular purpose      */
/* or conditions; and/or that the use of the Software and all documentation relating        */
/* thereto by the Licensee will not infringe any third party copyright or other             */
/* intellectual property rights. Wavecom S.A. shall furthermore be under no obligation      */
/* to provide support of any nature for the Software and the Documentation.                 */
/*                                                                                          */
/* LIMIT OF LIABILITY                                                                       */
/* ==================                                                                       */
/* In no event shall Wavecom S.A. be liable for any loss or damages whatsoever or howsoever */
/* caused arising directly or indirectly in connection with this licence, the Software,     */
/* its use or otherwise except to the extent that such liability may not be lawfully        */
/* excluded. Notwithstanding the generality of the foregoing, Wavecom S.A. expressly        */
/* excludes liability for indirect, special, incidental or consequential loss or damage     */
/* which may arise in respect of the Software or its use, or in respect of other equipment  */
/* or property, or for loss of profit, business, revenue, goodwill or anticipated savings.  */
/*                                                                                          */
/********************************************************************************************/

#7

Sorry, I’ve seen this copyright notice, but I don’t understand it 100%.
But I’ve a third solution:
I can call the ma_StopApplication / ma_StartApplication of MultiApp directly. (Did you mean this? Then I’m sorry.) Then I’ve only to extend the headerfile (or write my own) with the declarations of this functions.

Thanks


#8

Hmm, third solution is no solution. ma_StopApplication and ma_StartApplication are static and so not callable. :confused:


#9

You have the source code - you can make them callable!


#10

Yes, I know. But then it’s equal to solution two. I just posted this for completness.
Thanks and goodbye