qgsm/cellular_qgsm.c
CellularError_t Cellular_ModuleEnableUE( CellularContext_t * pContext )
{
    CellularError_t cellularStatus = CELLULAR_SUCCESS;
    CellularAtReq_t atReqGetNoResult =
    {
        NULL,
        CELLULAR_AT_NO_RESULT,
        NULL,
        NULL,
        NULL,
        0
    };
    CellularAtReq_t atReqGetWithResult =
    {
        NULL,
        CELLULAR_AT_MULTI_WO_PREFIX,
        NULL,
        NULL,
        NULL,
        0
    };

    if( pContext != NULL )
    {
        /* Disable echo. */
        atReqGetWithResult.pAtCmd = "ATE0";
        cellularStatus = sendAtCommandWithRetryTimeout( pContext, &atReqGetWithResult );

        if( cellularStatus == CELLULAR_SUCCESS )
        {
            /* Disable DTR function. */
            atReqGetNoResult.pAtCmd = "AT&D0";
            cellularStatus = sendAtCommandWithRetryTimeout( pContext, &atReqGetNoResult );
        }

        if( cellularStatus == CELLULAR_SUCCESS )
        {
            /* Enable RTS/CTS hardware flow control. */
            atReqGetNoResult.pAtCmd = "AT+IFC=2,2";
            cellularStatus = sendAtCommandWithRetryTimeout( pContext, &atReqGetNoResult );
        }

        if( cellularStatus == CELLULAR_SUCCESS )
        {
            /* Report verbose mobile termination error. */
            atReqGetNoResult.pAtCmd = "AT+CMEE=2";
            cellularStatus = sendAtCommandWithRetryTimeout( pContext, &atReqGetNoResult );
        }

        if( cellularStatus == CELLULAR_SUCCESS )
        {
            /* Configure Band configuration to all bands. */
            /* Use ATV1 to set the response format */
            atReqGetNoResult.pAtCmd = "ATV1";
            cellularStatus = sendAtCommandWithRetryTimeout( pContext, &atReqGetNoResult );
        }

        if( cellularStatus == CELLULAR_SUCCESS )
        {
            atReqGetNoResult.pAtCmd = "AT+CFUN=1";
            cellularStatus = sendAtCommandWithRetryTimeout( pContext, &atReqGetNoResult );
        }
    }

    return cellularStatus;
}
/* FreeRTOS Cellular Common Library porting interface. */
/* coverity[misra_c_2012_rule_8_7_violation] */
FreeRTOS Cellular Common Library porting interface.
FreeRTOS Cellular Common Library porting interface .
CellularError_t Cellular_ModuleEnableUE( CellularContext_t * pContext )
{
    CellularError_t cellularStatus = CELLULAR_SUCCESS;
    CellularAtReq_t atReqGetNoResult =
    {
        NULL,
        CELLULAR_AT_NO_RESULT,
        NULL,
        NULL,
        NULL,
        0
    };
    CellularAtReq_t atReqGetWithResult =
    {
        NULL,
        CELLULAR_AT_MULTI_WO_PREFIX,
        NULL,
        NULL,
        NULL,
        0
    };
    if( pContext != NULL )
    {
        atReqGetWithResult.pAtCmd = "ATE0";
        cellularStatus = sendAtCommandWithRetryTimeout( pContext, &atReqGetWithResult );
        if( cellularStatus == CELLULAR_SUCCESS )
        {
            atReqGetNoResult.pAtCmd = "AT&D0";
            cellularStatus = sendAtCommandWithRetryTimeout( pContext, &atReqGetNoResult );
        }
        if( cellularStatus == CELLULAR_SUCCESS )
        {
            atReqGetNoResult.pAtCmd = "AT+IFC=2,2";
            cellularStatus = sendAtCommandWithRetryTimeout( pContext, &atReqGetNoResult );
        }
        if( cellularStatus == CELLULAR_SUCCESS )
        {
            atReqGetNoResult.pAtCmd = "AT+CMEE=2";
            cellularStatus = sendAtCommandWithRetryTimeout( pContext, &atReqGetNoResult );
        }
        if( cellularStatus == CELLULAR_SUCCESS )
        {
            atReqGetNoResult.pAtCmd = "ATV1";
            cellularStatus = sendAtCommandWithRetryTimeout( pContext, &atReqGetNoResult );
        }
        if( cellularStatus == CELLULAR_SUCCESS )
        {
            atReqGetNoResult.pAtCmd = "AT+CFUN=1";
            cellularStatus = sendAtCommandWithRetryTimeout( pContext, &atReqGetNoResult );
        }
    }
    return cellularStatus;
}
CellularError_t Cellular_ModuleEnableUE ( CellularContext_t * pContext ) { CellularError_t cellularStatus = CELLULAR_SUCCESS ; CellularAtReq_t atReqGetNoResult = { NULL , CELLULAR_AT_NO_RESULT , NULL , NULL , NULL , 0 } ; CellularAtReq_t atReqGetWithResult = { NULL , CELLULAR_AT_MULTI_WO_PREFIX , NULL , NULL , NULL , 0 } ; if ( pContext != NULL ) { atReqGetWithResult . pAtCmd = " " ; cellularStatus = sendAtCommandWithRetryTimeout ( pContext , & atReqGetWithResult ) ; if ( cellularStatus == CELLULAR_SUCCESS ) { atReqGetNoResult . pAtCmd = " " ; cellularStatus = sendAtCommandWithRetryTimeout ( pContext , & atReqGetNoResult ) ; } if ( cellularStatus == CELLULAR_SUCCESS ) { atReqGetNoResult . pAtCmd = " " ; cellularStatus = sendAtCommandWithRetryTimeout ( pContext , & atReqGetNoResult ) ; } if ( cellularStatus == CELLULAR_SUCCESS ) { atReqGetNoResult . pAtCmd = " " ; cellularStatus = sendAtCommandWithRetryTimeout ( pContext , & atReqGetNoResult ) ; } if ( cellularStatus == CELLULAR_SUCCESS ) { atReqGetNoResult . pAtCmd = " " ; cellularStatus = sendAtCommandWithRetryTimeout ( pContext , & atReqGetNoResult ) ; } if ( cellularStatus == CELLULAR_SUCCESS ) { atReqGetNoResult . pAtCmd = " " ; cellularStatus = sendAtCommandWithRetryTimeout ( pContext , & atReqGetNoResult ) ; } } return cellularStatus ; }
FreeRTOS Cellular Common Library porting interface.
FreeRTOS Cellular Common Library porting interface .
/* Disable echo. */ /* Disable DTR function. */ /* Enable RTS/CTS hardware flow control. */ /* Report verbose mobile termination error. */ /* Configure Band configuration to all bands. */ /* Use ATV1 to set the response format */