# Problem with MDC API

**URL:** <https://forum.legato.io/t/problem-with-mdc-api/5630>\
**Category:** Uncategorized\
**Created:** [February 25, 2021, 6:17am UTC](https://forum.legato.io/t/problem-with-mdc-api/5630 "2021-02-25T06:17:26Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ClaudioBaldo](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@ClaudioBaldo](https://forum.legato.io/u/ClaudioBaldo)\
**Post date:** [February 25, 2021, 6:17am UTC](https://forum.legato.io/t/problem-with-mdc-api/5630/1 "2021-02-25T06:17:26Z")

</div>

I am trying to use the MDC API for the FX30S but I am having some troubles and an error which is difficult to troubleshoot.  
So I have followed these instructions:  
[https://docs.legato.io/15\_08/c\_mdc.html](https://docs.legato.io/15_08/c_mdc.html)  
And also these two:

> <https://github.com/legatoproject/legato-af/blob/e4e7835b5857fce2ebf2644db06ee7bb9b2f1205/apps/test/modemServices/mdc/mdcIntegrationTest_TX/mdcTestComp/mdcTest.c>

The problem I am having is that this works (at times) and at times doesn`t work.  
The problem seems to be with the handler which report a wrong status?  
This is my code  
static void SetNetworkConfiguration()  
{  
char ipAddr[100] = {0};  
char gatewayAddr[100] = {0};  
char dns1Addr[100] = {0};  
char dns2Addr[100] = {0};  
char systemCmd[200] = {0};  
FILE\* resolvFilePtr;  
le\_mdc\_ConState\_t state = LE\_MDC\_DISCONNECTED;  
mode\_t oldMask;

```
// Check the state
LE_ASSERT( le_mdc_GetSessionState(modemProfile, &state) == LE_OK );
LE_ASSERT( state == LE_MDC_CONNECTED );

// Get IP, gateway and DNS addresses for IPv4 or IPv6 connectivity
if ( le_mdc_IsIPv4(modemProfile) )
{
    LE_ASSERT(le_mdc_GetIPv4Address(modemProfile, ipAddr, sizeof(ipAddr)) == LE_OK);
    LE_INFO("%s", ipAddr);

    LE_ASSERT(le_mdc_GetIPv4GatewayAddress(modemProfile, gatewayAddr, sizeof(gatewayAddr))
                                                                                      == LE_OK);
    LE_INFO("%s", gatewayAddr);

    LE_ASSERT(le_mdc_GetIPv4DNSAddresses( modemProfile,
                                          dns1Addr, sizeof(dns1Addr),
                                          dns2Addr, sizeof(dns2Addr)) == LE_OK );
    LE_INFO("%s", dns1Addr);
    LE_INFO("%s", dns2Addr);

    snprintf(systemCmd, sizeof(systemCmd), "/sbin/route add default gw %s", gatewayAddr);
}
else if ( le_mdc_IsIPv6(modemProfile) )
{
    LE_ASSERT(le_mdc_GetIPv6Address(modemProfile, ipAddr, sizeof(ipAddr)) == LE_OK);
    LE_INFO("%s", ipAddr);

    LE_ASSERT(le_mdc_GetIPv6GatewayAddress(modemProfile, gatewayAddr, sizeof(gatewayAddr))
                                                                                      == LE_OK);
    LE_INFO("%s", gatewayAddr);

    LE_ASSERT(le_mdc_GetIPv6DNSAddresses( modemProfile,
                                          dns1Addr, sizeof(dns1Addr),
                                          dns2Addr, sizeof(dns2Addr)) == LE_OK );
    LE_INFO("%s", dns1Addr);
    LE_INFO("%s", dns2Addr);

    snprintf(systemCmd, sizeof(systemCmd), "/sbin/route -A inet6 add default gw %s",
                                            gatewayAddr);
}

sleep(5);

LE_DEBUG("%s", systemCmd);
LE_ASSERT( system(systemCmd) == 0 );

// allow fopen to create file with mode=644
oldMask = umask(022);

// open the resolver configuration
resolvFilePtr = fopen("/etc/resolv.conf", "w+");

if (resolvFilePtr == NULL)
{
    LE_ERROR("Unable to open resolv.conf: %m");
}
LE_ASSERT( resolvFilePtr != NULL );

LE_ASSERT( fprintf(resolvFilePtr, "nameserver %s\n", dns1Addr) > 0 );

if (dns2Addr[0] != '\0')
{
    LE_ASSERT( fprintf(resolvFilePtr, "nameserver %s\n", dns2Addr) > 0 );
}

LE_ASSERT( fclose(resolvFilePtr) == 0 );

// restore old mask
umask(oldMask);

```

}

static le\_result\_t ConnectModem(){  
//create an handler for Data Connection state  
char data[200];  
char APN[11] = “telstra.wap”;  
le\_result\_t rs;  
LE\_FATAL\_IF(modemProfile == NULL, “Profile doesn`t exist"); //set the PDP rs = le_mdc_SetPDP(modemProfile, LE_MDC_PDP_IPV4V6); LE_FATAL_IF(rs != LE_OK, "Couldn`t set PDP.”);  
//readback the PDP  
le\_mdc\_Pdp\_t ProfilePDP = le\_mdc\_GetPDP(modemProfile);  
switch (ProfilePDP)  
{  
case LE\_MDC\_PDP\_UNKNOWN:  
LE\_INFO(“PDP Unknown”);  
break;  
case LE\_MDC\_PDP\_IPV4:  
LE\_INFO(“PDP IPv4”);  
break;  
case LE\_MDC\_PDP\_IPV6:  
LE\_INFO(“IPDP Pv6”);  
break;  
case LE\_MDC\_PDP\_IPV4V6:  
LE\_INFO(“PDP IPv4v6”);  
break;  
default:  
LE\_ERROR(“PDP unsupported %d”, ProfilePDP);  
break;  
}  
//set APN  
rs = le\_mdc\_SetAPN(modemProfile,&APN[0]);  
LE\_FATAL\_IF(rs != LE\_OK, “Couldn`t set APN.”);  
rs = le\_mdc\_GetAPN(modemProfile, &data[0], sizeof(data));  
if(LE\_OK == rs)  
LE\_INFO(“APN: %s, %d”,data, rs);

```
LE_INFO("Try to Start Session.");
if (LE_OK == le_mdc_StartSession (modemProfile))
    LE_INFO("Modem is connecting.");

return LE_OK;

```

}

static void DataConnectionStateHandler(le\_mdc\_ProfileRef\_t profileRef, le\_mdc\_ConState\_t ConnectionState, void _contextPtr)  
{ /_  
LE\_MDC\_DISCONNECTED Data session is disconnected.  
LE\_MDC\_AUTHENTICATING Authenticating data session.  
LE\_MDC\_CONNECTED Data session is connected.  
LE\_MDC\_SUSPENDING Suspending data session.  
LE\_MDC\_INCOMING Incoming data session (MT-PDP context request)  
\*/  
le\_mdc\_ConState\_t state = LE\_MDC\_DISCONNECTED;  
// Check the state  
LE\_ASSERT( le\_mdc\_GetSessionState(modemProfile, &state) == LE\_OK );  
if(ConnectionState != state)  
LE\_INFO(“State for modem doesn`t match”);

```
switch (ConnectionState)
{   
    case LE_MDC_DISCONNECTED:
        LE_INFO("Modem Disconnected.");
        LE_INFO("System will try to reconnect");
        //ConnectModem();
        break;
    case LE_MDC_AUTHENTICATING:
        LE_INFO("Modem Authenticating");
        break;
    case LE_MDC_CONNECTED:
        LE_INFO("Modem Just Connected");
        LE_INFO("Go to sleep for a few seconds..");
        sleep(3);
        LE_INFO("Waking up..");
        LE_INFO("Setup NETWORK configuration.");
        SetNetworkConfiguration(modemProfile);
        break;
    case LE_MDC_SUSPENDING:
        LE_INFO("Modem Suspending");
        break;
    case LE_MDC_INCOMING:
        LE_INFO("Modem Incoming");
        break;

    default:
        LE_ERROR("Unsupported MDC session state %d", ConnectionState);
        break;
}

```

}

COMPONENT\_INIT  
{  
LE\_INFO(“Checking modem configuration.”);  
modemProfile = le\_mdc\_GetProfile(modemProfileIndex);  
le\_mdc\_ConState\_t modemState = LE\_MDC\_DISCONNECTED;

```
char data[200];
//Check if modem is already connected
LE_INFO("Create Handler for Connection State.");
le_mdc_SessionStateHandlerRef_t SessionStateHandler = le_mdc_AddSessionStateHandler(modemProfile, DataConnectionStateHandler, NULL);
LE_FATAL_IF(SessionStateHandler == NULL, "Session state handler not created!!");

//Connect modem
LE_ASSERT( le_mdc_GetSessionState(modemProfile, &modemState) == LE_OK );
if(modemState != LE_MDC_CONNECTED)
{
    LE_INFO("Will start connecting the modem");
    rs = ConnectModem(modemProfileIndex);
}

rs = le_info_GetImei(&data[0], sizeof(data));
LE_INFO("IMEI: %s, %d",data, rs);
//now try to connect the router
return;

```

}

And the program fails at line:  
LE\_ASSERT( state == LE\_MDC\_CONNECTED );  
However, the function only gets called by the handler “DataConnectionStateHandler” once the state of the modem is LE\_MDC\_CONNECTED, so I am a bit confused about why this is happening…  
Anybody able to help about this problem?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [February 25, 2021, 6:45am UTC](https://forum.legato.io/t/problem-with-mdc-api/5630/2 "2021-02-25T06:45:42Z")

</div>

don’t quite understand your problem…  
do you see problem in CM tool?

---

<div class="post-metadata">

**Author:** ![ClaudioBaldo](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@ClaudioBaldo](https://forum.legato.io/u/ClaudioBaldo)\
**Post date:** [February 25, 2021, 6:56am UTC](https://forum.legato.io/t/problem-with-mdc-api/5630/3 "2021-02-25T06:56:49Z")

</div>

I am not talking about the shell commands, trying to configure and start the modem data from a C source file.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [February 25, 2021, 7:07am UTC](https://forum.legato.io/t/problem-with-mdc-api/5630/4 "2021-02-25T07:07:56Z")

</div>

if you don’t see problem in shell command, that means there is problem on your C program.  
Then you can check the source code of CM tool and see what should be port to your application.

---

<div class="post-metadata">

**Author:** ![ClaudioBaldo](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@ClaudioBaldo](https://forum.legato.io/u/ClaudioBaldo)\
**Post date:** [February 25, 2021, 7:17am UTC](https://forum.legato.io/t/problem-with-mdc-api/5630/5 "2021-02-25T07:17:28Z")

</div>

where do I find the source for the shell commands?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [February 25, 2021, 7:23am UTC](https://forum.legato.io/t/problem-with-mdc-api/5630/6 "2021-02-25T07:23:35Z")

</div>

you can see here:

> **[legato-af/apps/tools/cm at master · legatoproject/legato-af](https://github.com/legatoproject/legato-af/tree/master/apps/tools/cm)**
>
> master/apps/tools/cm

---

<div class="post-metadata">

**Author:** ![ClaudioBaldo](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@ClaudioBaldo](https://forum.legato.io/u/ClaudioBaldo)\
**Post date:** [February 25, 2021, 12:25pm UTC](https://forum.legato.io/t/problem-with-mdc-api/5630/7 "2021-02-25T12:25:05Z")

</div>

I have checked the source for the cm data but this is not exactly what I was asking.  
The code I have used and written above is from the example code of Legato docs, my question is why the handler ConnectionState and the state returned from le\_mdc\_GetSessionState(modemProfile, &state) have different values?  
This software systematically fails at LE\_ASSERT( state == LE\_MDC\_CONNECTED ) when this function SetNetworkConfiguration is called by the handler only when the state is LE\_MDC\_CONNECTED.

The modem will run on bootup but it will not run on any new application download.

Is anybody able to provide an answer to this?  
Thanks 🙂

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [February 25, 2021, 1:22pm UTC](https://forum.legato.io/t/problem-with-mdc-api/5630/8 "2021-02-25T13:22:11Z")

</div>

do you mean this line will make the program stopped?  
LE\_ASSERT( state == LE\_MDC\_CONNECTED )

Also you might need to try the latest test application which is quite different from yours:

> <https://github.com/legatoproject/legato-af/blob/master/apps/test/modemServices/mdc/mdcIntegrationTest/mdcTestComp/mdcTest.c>

---

<div class="post-metadata">

**Author:** ![ClaudioBaldo](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@ClaudioBaldo](https://forum.legato.io/u/ClaudioBaldo)\
**Post date:** [February 26, 2021, 6:54am UTC](https://forum.legato.io/t/problem-with-mdc-api/5630/9 "2021-02-26T06:54:47Z")

</div>

I am testing this software on my target and it happens the same thing:

Feb 26 14:48:16 fx30s user.info Legato: INFO | supervisor[1138]/supervisor T=main | app.c app\_Start() 3377 | Starting app ‘mdcTest’  
Feb 26 14:48:16 fx30s user.info Legato: INFO | supervisor[1138]/supervisor T=main | app.c CreateFileLink() 1991 | Skipping file link ‘/legato/systems/current/apps/mdcTest/read-only/lib/libComponent\_mdcTestComp.so’ to '/legato/systems/current/appsWriteable/mdcTest/li  
Feb 26 14:48:16 fx30s user.info Legato: INFO | supervisor[1138]/supervisor T=main | app.c CreateFileLink() 1991 | Skipping file link ‘/legato/systems/current/apps/mdcTest/read-only/bin/mdcTest’ to ‘/legato/systems/current/appsWriteable/mdcTest/bin/mdcTest’: Already  
Feb 26 14:48:16 fx30s user.info Legato: INFO | supervisor[1138]/supervisor T=main | proc.c proc\_Start() 1389 | Starting process ‘mdcTest’ with pid 3659  
Feb 26 14:48:16 fx30s user.info Legato: INFO | supervisor[3659]/supervisor T=main | proc.c proc\_Start() 1354 | Execing ‘mdcTest’  
Feb 26 14:48:16 fx30s user.debug Legato: DBUG | _UNKNOWN_[3659]/ T=main | \_componentMain.c \_mdcTestComp\_Init() 29 | Initializing mdcTestComp component library.  
Feb 26 14:48:16 fx30s user.debug Legato: DBUG | _UNKNOWN_[3659]/framework T=main | le\_mdc\_client.c DoConnectService() 355 | ======= Starting client for ‘mdcTest.mdcTestComp.le\_mdc’ service ========  
mdcTest[3659]/framework T=main | LE\_FILENAME InitPool() 303 | Memory pool name ‘framework.msgs-LogControlProtocol’ is truncated to ‘framework.msgs-LogControlProtoc’  
mdcTest[3659]/framework T=main | LE\_FILENAME le\_mem\_ForceAlloc() 841 | Memory pool ‘framework.SigMonitor’ overflowed. Expanded to 1 blocks.  
mdcTest[3659]/framework T=main | LE\_FILENAME le\_mem\_ForceAlloc() 841 | Memory pool ‘framework.SigHandler’ overflowed. Expanded to 1 blocks.  
mdcTest[3659]/mdcTest\_exe T=main | \_main.c main() 61 | == Starting Event Processing Loop ==  
mdcTest[3659]/mdcTestComp T=main | mdcTest.c \_mdcTestComp\_COMPONENT\_INIT() 612 | ======= MDC TEST STARTED =======  
mdcTest[3659]/mdcTestComp T=main | mdcTest.c SetConfiguration() 352 | cid: 1 pdp: 1 apn: auto auth: 1 username: password:  
mdcTest[3659]/framework T=MDC\_Test | LE\_FILENAME PThreadStartRoutine() 365 | Set nice level to 0.  
mdcTest[3659]/framework T=MDC\_Test | LE\_FILENAME le\_mem\_ForceAlloc() 841 | Memory pool ‘framework.DestructorObjs’ overflowed. Expanded to 2 blocks.  
mdcTest[3659]/framework T=MDC\_Test | LE\_FILENAME le\_mem\_ForceAlloc() 841 | Memory pool ‘.le\_mdc\_ClientThreadData’ overflowed. Expanded to 2 blocks.  
mdcTest[3659]/framework T=MDC\_Test | le\_mdc\_client.c DoConnectService() 355 | ======= Starting client for ‘mdcTest.mdcTestComp.le\_mdc’ service ========  
mdcTest[3659]/framework T=MDC\_Test | LE\_FILENAME le\_mem\_ForceAlloc() 841 | Memory pool ‘.le\_mdc\_ClientData’ overflowed. Expanded to 1 blocks.  
======= MDC TEST\_SYNC STARTED =======  
mdcTest[3659]/mdcTestComp T=MDC\_Test | mdcTest.c StateChangeHandler() 463 | ================================================  
mdcTest[3659]/mdcTestComp T=MDC\_Test | mdcTest.c StateChangeHandler() 464 | (int) le\_mdc\_GetProfileIndex(profileRef)=1  
mdcTest[3659]/mdcTestComp T=MDC\_Test | mdcTest.c StateChangeHandler() 465 | ConnectionStatus=2  
mdcTest[3659]/mdcTestComp T=MDC\_Test | mdcTest.c StateChangeHandler() 486 | ================================================  
mdcTest[3659]/mdcTestComp T=main | mdcTest.c SetNetworkConfiguration() 386 | ipAddr=10.250.218.246  
mdcTest[3659]/mdcTestComp T=main | mdcTest.c SetNetworkConfiguration() 390 | gatewayAddr=10.250.218.245  
mdcTest[3659]/mdcTestComp T=main | mdcTest.c SetNetworkConfiguration() 395 | dns1Addr=10.5.68.232  
mdcTest[3659]/mdcTestComp T=main | mdcTest.c SetNetworkConfiguration() 396 | dns2Addr=10.5.209.36  
mdcTest[3659]/mdcTestComp T=MDC\_Test | mdcTest.c StateChangeHandler() 463 | ================================================  
mdcTest[3659]/mdcTestComp T=MDC\_Test | mdcTest.c StateChangeHandler() 464 | (int) le\_mdc\_GetProfileIndex(profileRef)=1  
mdcTest[3659]/mdcTestComp T=MDC\_Test | mdcTest.c StateChangeHandler() 465 | ConnectionStatus=0  
mdcTest[3659]/mdcTestComp T=MDC\_Test | mdcTest.c StateChangeHandler() 481 | le\_mdc\_GetDisconnectionReasonExt(profileRef, 0)=45  
Feb 26 14:48:16 fx30s user.debug Legato: DBUG | mdcTest[3659]/mdcTestComp T=MDC\_Test | mdcTest.c StateChangeHandler() 482 | le\_mdc\_GetPlatformSpecificDisconnectionCodeExt(profileRef, 0)=1  
Feb 26 14:48:16 fx30s user.debug Legato: DBUG | mdcTest[3659]/mdcTestComp T=MDC\_Test | mdcTest.c StateChangeHandler() 486 | ================================================  
mdcTest[3659]/mdcTestComp T=main | mdcTest.c SetNetworkConfiguration() 421 | /sbin/route add default gw 10.250.218.245  
mdcTest[3659] | route: SIOCADDRT: Network is unreachable  
mdcTest[3659]/mdcTestComp T=main | Assert Failed: ‘system(systemCmd) == 0’  
supervisor[1138]/supervisor T=main | proc.c Process ‘mdcTest’ (PID: 3659) has exited with exit code 1.

---

<div class="post-metadata">

**Author:** ![ClaudioBaldo](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@ClaudioBaldo](https://forum.legato.io/u/ClaudioBaldo)\
**Post date:** [February 26, 2021, 6:58am UTC](https://forum.legato.io/t/problem-with-mdc-api/5630/10 "2021-02-26T06:58:11Z")

</div>

Where it will initially connect, than the handler will return the DISCONNECT for unknown reason?  
I am using this device with a telstra sim card in australia.  
The only thing I did add to this code is a fixed APN name for the network:  
const char \* APN = “telstra.wap”;  
LE\_ASSERT(LE\_OK == le\_mdc\_SetAPN(\*profileRefPtr, APN));

And also removed the le\_thread\_Sleep for which I can`t find the include file in the legato workspace.

The APN I am certain it works correctly, as if I run the command from shell  
cm data connect  
It will connect properly.

Not sure if replacing the le\_thread\_Sleep with sleep is causing the issue, as I see documentation says this could cause bugs, but don`t think this is the problem.  
The modem is disconnecting straight after connecting for no reason (as far as it looks).

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [February 26, 2021, 8:57am UTC](https://forum.legato.io/t/problem-with-mdc-api/5630/12 "2021-02-26T08:57:24Z")

</div>

I have problem in starting the data connection, do you know why?  
[logread.txt](https://forum.legato.io/uploads/short-url/26oa6mBQCU7QWf0tJRZwiUSDEmy.txt) (12.8 KB)

---

<div class="post-metadata">

**Author:** ![ClaudioBaldo](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@ClaudioBaldo](https://forum.legato.io/u/ClaudioBaldo)\
**Post date:** [February 27, 2021, 4:55am UTC](https://forum.legato.io/t/problem-with-mdc-api/5630/13 "2021-02-27T04:55:47Z")

</div>

Is there anybody able to help on clarifying how this mdc API should work?  
As I said, on bootup the modem will start, but if I try to run the app when the device is already up and running, then it will not work with the message I have reported above.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [February 27, 2021, 5:08am UTC](https://forum.legato.io/t/problem-with-mdc-api/5630/14 "2021-02-27T05:08:36Z")

</div>

can you check in your code if le\_mdc\_StopSession() is called?

---

<div class="post-metadata">

**Author:** ![ClaudioBaldo](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@ClaudioBaldo](https://forum.legato.io/u/ClaudioBaldo)\
**Post date:** [February 27, 2021, 6:06am UTC](https://forum.legato.io/t/problem-with-mdc-api/5630/15 "2021-02-27T06:06:07Z")

</div>

I am not running my code but a copy an paste of the link you have sent, all beside the change I have indicated above, reaplcing le\_thread\_sleep with sleep and hardcoding the APN to the APN I am using.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [March 1, 2021, 7:03am UTC](https://forum.legato.io/t/problem-with-mdc-api/5630/16 "2021-03-01T07:03:49Z")

</div>

I tried on another WP76, I don’t see any problem on running the application, you can see my logread.

[logread\_mdeTest.txt](https://forum.legato.io/uploads/short-url/xO2lu5iubgMwRHxpvhSUg1pL5RV.txt) (22.8 KB)

root@swi-mdm9x28-wp:~# cm info  
Device: WP7609  
IMEI: 359782080100373  
IMEISV: 6  
FSN: WA803370311610  
Firmware Version: SWI9X07Y\_02.28[529.721111] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:1 cur:0 tx) bc(rx:0 tx:2) mode:FIFO slv\_addr:0x3a MSTR\_STS:0x001363c8 OPER:0x00000090  
.03.05 000000 jenkins 2019/07/08 11:04:16  
Bootloader Version: [529.740566] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:1 cur:0 tx) bc(rx:0 tx:2) mode:FIFO slv\_addr:0x3a MSTR\_STS:0x001363c8 OPER:0x00000090  
SWI9X07Y\_02.28.03.05 000000 jenkins 2019/07/08 11:04:16  
MCU Version: 002.011  
PRI Part Number (PN): 9908102  
PRI Revision: 001.000  
Carrier PRI Name: GENERIC  
Carrier PRI Revision: 002.073\_000  
SKU: 1103843  
Last Reset Cause: Power Down  
Resets Count: Expected: 10226 Unexpected: 0

---

<div class="post-metadata">

**Author:** ![ClaudioBaldo](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@ClaudioBaldo](https://forum.legato.io/u/ClaudioBaldo)\
**Post date:** [March 4, 2021, 12:39pm UTC](https://forum.legato.io/t/problem-with-mdc-api/5630/17 "2021-03-04T12:39:32Z")

</div>

I can`t get it to work, the only thing I can think of is another app using the same interface and so conditioning the handler in my app. When I have built my system, how can I am my own firmware release so to eliminate apps which I don`t need?  
i.e. the AirVantage is installed and if I remove it will come back after a reboot…

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [March 4, 2021, 12:51pm UTC](https://forum.legato.io/t/problem-with-mdc-api/5630/18 "2021-03-04T12:51:19Z")

</div>

you might try to “app stop” the unwanted application.  
Also you might try with default WP76 FW R13, I don’t see problem with it.

---

<div class="post-metadata">

**Author:** ![ClaudioBaldo](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@ClaudioBaldo](https://forum.legato.io/u/ClaudioBaldo)\
**Post date:** [March 4, 2021, 12:54pm UTC](https://forum.legato.io/t/problem-with-mdc-api/5630/19 "2021-03-04T12:54:58Z")

</div>

Tried with the app stop already, also tried with the app remove.  
Will give it a go with the different firmware to see how it goes.

---

<div class="post-metadata">

**Author:** ![ClaudioBaldo](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@ClaudioBaldo](https://forum.legato.io/u/ClaudioBaldo)\
**Post date:** [March 5, 2021, 2:07am UTC](https://forum.legato.io/t/problem-with-mdc-api/5630/20 "2021-03-05T02:07:55Z")

</div>

mmmhh, I have updated the firmware on the target using the WP77xx\_Release13\_GENERIC\_GCF.exe and that seems to have broken the target.  
No apps installed and I can`t flash back the .cwe file from shell as the fwupdate app is not running anymore. I can`t download my system either as I get:  
sh: /legato/systems/current/bin/update: not found  
cat: write error: Broken pipe  
update failed

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [March 5, 2021, 2:39am UTC](https://forum.legato.io/t/problem-with-mdc-api/5630/21 "2021-03-05T02:39:27Z")

</div>

i tried on mangoh red +WP77 on FW R13 before, no problem is found.

[Next page](https://forum.legato.io/t/problem-with-mdc-api/5630.md?page=2)
