# EU Ecall - Importing existing MSD

**URL:** <https://forum.legato.io/t/eu-ecall-importing-existing-msd/86>\
**Category:** Legato Application Framework\
**Created:** [November 27, 2014, 3:49pm UTC](https://forum.legato.io/t/eu-ecall-importing-existing-msd/86 "2014-11-27T15:49:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucalevratti](https://avatars.discourse-cdn.com/v4/letter/l/a183cd/32.png) [@lucalevratti](https://forum.legato.io/u/lucalevratti)\
**Post date:** [November 27, 2014, 3:49pm UTC](https://forum.legato.io/t/eu-ecall-importing-existing-msd/86/1 "2014-11-27T15:49:51Z")

</div>

Hi,

We are trying to start a manual EU Ecall by importing a pre-prepared MSD, following the example code contained in Legato sources. The result of “le\_ecall\_ImportMsd” is always negative.  
We have set some Legato config tree parameters:

- modemServices/eCall/psap == “Our test PSAP number”
- modemServices/eCall/pushPull == Push
- modemServices/eCall/maxRedialAttempts == 1

Attached you can find the piece of code we are testing.  
What is wrong with it?

Thank you for help

---

<div class="post-metadata">

**Author:** ![fnoui](https://avatars.discourse-cdn.com/v4/letter/f/c0e974/32.png) [@fnoui](https://forum.legato.io/u/fnoui)\
**Post date:** [December 3, 2014, 10:21am UTC](https://forum.legato.io/t/eu-ecall-importing-existing-msd/86/2 "2014-12-03T10:21:23Z")

</div>

Here is the result of your imported MSD using le\_ecall\_StartTest on live network. (Use PSAP number)  
le\_ecall\_StartManual is only used on network simulator or for real emergency case. It does not use PSAP number but Emergency call.

E-Call from number “PSAP Number”  
Date = 14/12/03-10:36:10  
Info = H118-80+W+T  
Time = 5 sec.  
Test = TD\_MAN\_01\_PULL  
wl=0121 fl=B:/ECALL/0121.txt

MSD Decoding :  
MSD format version = 1  
MSD Identifier = 1  
Automatic Activation = TRUE  
Test Call = TRUE  
Position can be Trusted = TRUE  
Vehicle Type = 1  
WMI = ‘ASD’  
WDS = ‘AJNPR1’  
ModelYear = ‘V’  
SeqPlant = ‘ABCDEFG’  
gasolineTankPresent = TRUE  
compressedNaturalGas = TRUE  
TimeStamp = 1661537341:  
===\> 26/08/22 18:09:01  
Latitude Position = -199680018(mArcSec):  
===\> -55º 71554’47.278000" LAM#1137.579799  
Longitude Position = -271809510(mArcSec):  
===\> -75º 71552’37.786000" LOM#1117.543829  
Direction = 32  
LocationN2 Delta(lati:long) = (0 : 127)  
Passengers = 2  
Add. Data OID Passengers = 2

Here is the used sample code.

```auto
const uint8_t MSD2[] = { 0x01, 0x4C, 0x07, 0x80, 0xA6, 0x4D, 0x29, 0x25, 0x97, 0x60, 0x17, 0x0A, 0x2C, 0xC3, 0x4E, 0x3D, 0x05, 0x1B, 0x18, 0x48, 0x61, 0xEB, 0xA0, 0xC8, 0xFF, 0x73, 0x7E, 0x64, 0x20, 0xD1, 0x04, 0x01, 0x3F, 0x81, 0x00 };

eCallRef = le_ecall_Create();
StateChangeHandlerRef = le_ecall_AddStateChangeHandler(EcallStateChangeHandler, eCallRef);
result = le_ecall_ImportMsd(eCallRef, MSD2, sizeof(MSD2));
result = le_ecall_StartTest(eCallRef);

```

---

<div class="post-metadata">

**Author:** ![lucalevratti](https://avatars.discourse-cdn.com/v4/letter/l/a183cd/32.png) [@lucalevratti](https://forum.legato.io/u/lucalevratti)\
**Post date:** [December 4, 2014, 9:24am UTC](https://forum.legato.io/t/eu-ecall-importing-existing-msd/86/3 "2014-12-04T09:24:58Z")

</div>

Hi fnoui,

Thanks for your reply, but I have some questions:

- please, could you attach the Legato config tree params related to “modemServices/eCall”?
- what do you mean with “E-Call from number “PSAP Number””? The PSAP number should be the destination number of an ECall, not the source one, right?
- I’ve used le\_ecall\_StartManual to simulate a real ECall to a test PSAP (not a real one). Why this is not correct? Otherwise, how can I test le\_ecall\_StartManual/Auto if I don’t have a real emergency case?

Regards.

---

<div class="post-metadata">

**Author:** ![fnoui](https://avatars.discourse-cdn.com/v4/letter/f/c0e974/32.png) [@fnoui](https://forum.legato.io/u/fnoui)\
**Post date:** [December 11, 2014, 4:58pm UTC](https://forum.legato.io/t/eu-ecall-importing-existing-msd/86/4 "2014-12-11T16:58:09Z")

</div>

Dear lucalevratti,

The answers are in red.

- please, could you attach the Legato config tree params related to “modemServices/eCall”?  
[color=#FF0000]  
modemServices/  
sms/  
smsc == +33689004000  
radio/  
preferences/  
rat/  
0 == GSM  
1 == UMTS  
2 == LTE  
eCall/  
psap == “Our test PSAP number”  
pushPull == Push  
maxRedialAttempts == 1  
vehicleType == Commercial-N1  
vin == VF7FC8HZC28708797  
propulsionType/  
0 == Diesel[/color]

- what do you mean with “E-Call from number “PSAP Number””? The PSAP number should be the destination number of an ECall, not the source one, right?  
  
[color=#FF0000]  
No, For an eCall estasblishement following EN 16062 “7.3.6 eCall establishment” you make a call using TS12 emergency call request equivalent to “112” with eCall flag set. To be clearer, it means that the PSAP will be reach through the standard emergency line.

For test purpose, you need to set up a call using Test call. Please see Note in the EN 16062 “7.1.4 IVS configured only for eCall”

NOTE 3 In accordance with ETSI/TS 122 101 —‘It shall be possible for the user equipment upon request from the user to initiate a call to an operator designated non-emergency MSISDN for the purpose of accessing test and terminal reconfiguration services.[/color]

- I’ve used le\_ecall\_StartManual to simulate a real ECall to a test PSAP (not a real one). Why this is not correct? Otherwise, how can I test le\_ecall\_StartManual/Auto if I don’t have a real emergency case?  
[color=#FF0000]  
Because le\_ecall\_StartManual launch a real eCall . It calls the PSAP through emergency call not a normal MSISDN in “modemServices/eCall/psap”.  
please see for more information the Table 10.5.135d/3GPP TS 24.008: Service Category information element  
Emergency Service Category Value (octet 3)  
The meaning of the Emergency Category Value is derived from the following settings (see 3GPP TS 22.101 [8] clause  
10):  
Bit 1 Police  
Bit 2 Ambulance  
Bit 3 Fire Brigade  
Bit 4 Marine Guard  
Bit 5 Mountain Rescue  
[/color][color=#40BF00]Bit 6 manually initiated eCall  
Bit 7 automatically initiated eCall[/color][color=#FF0000]  
Bit 8 is spare and set to “0”

To test your eCall implementation you need to use a network simulator combined with PSAP server. If you don’t have one use le\_ecall\_StartTest to valid your application.

Hereunder are 2 links to eCall system simulation platform: [/color]  
Rohde & Schwarz [url][http://www.rohde-schwarz.com/en/applications/test-your-ecall-in-vehicle-system-modules-reliably-application-card\_56279-4097.html[/url]](http://www.rohde-schwarz.com/en/applications/test-your-ecall-in-vehicle-system-modules-reliably-application-card_56279-4097.html%5B/url%5D)

Anritsu [url][http://downloadfile.anritsu.com/RefFiles/ja-JP/About-Anritsu/R\_D/Technical/E-22/22\_05.pdf[/url]](http://downloadfile.anritsu.com/RefFiles/ja-JP/About-Anritsu/R_D/Technical/E-22/22_05.pdf%5B/url%5D)

---

<div class="post-metadata">

**Author:** ![s1nndev](https://avatars.discourse-cdn.com/v4/letter/s/258eb7/32.png) [@s1nndev](https://forum.legato.io/u/s1nndev)\
**Post date:** [January 9, 2015, 9:32am UTC](https://forum.legato.io/t/eu-ecall-importing-existing-msd/86/5 "2015-01-09T09:32:09Z")

</div>

Hello everyone,

I also want to change the psap number, but I don’t know how I can do it.  
I tried to change it via the le\_cfg API like the following: [attachment=2]setpsap.txt[/attachment]

To test the reaction of the eCall app I commented the lines with the StartTest function:  
// LE\_FATAL\_IF((le\_ecall\_StartTest(eCallRef) == LE\_FAULT),  
// “Unable to start an eCall, restart the app!”);  
And this is the reaction: [attachment=1]logread without StartTest.txt[/attachment]  
So far for me everything looks fine.

When I uncomment the said lines, the app crashes and says that an MSD has been already imported: [attachment=0]logread with StartTest.txt[/attachment]  
Is it possible to change the PSAP number without using the le\_ecall\_ImportMsd function? Because I don’t know how to write the array for the MSD.

Thank you!  
Daniel

---

<div class="post-metadata">

**Author:** ![s1nndev](https://avatars.discourse-cdn.com/v4/letter/s/258eb7/32.png) [@s1nndev](https://forum.legato.io/u/s1nndev)\
**Post date:** [January 9, 2015, 9:42am UTC](https://forum.legato.io/t/eu-ecall-importing-existing-msd/86/6 "2015-01-09T09:42:17Z")

</div>

Additional information: It doesn’t matter if I call the setpsap after or before the le\_ecall\_SetMsdPosition function. I tried both ways, but this function always crashes.
