StdPJ/Core/Src/APP/BSP/ug96/ug96.c
/**
  * @brief  Attach the MT to the packet domain service
  * @param  Obj: pointer to module handle
  * @retval Operation status.
  */
@brief  Attach the MT to the packet domain service
@param  Obj: pointer to module handle
@retval Operation status.
@brief Attach the MT to the packet domain service @param Obj : pointer to module handle @retval Operation status .
UG96_Return_t  UG96_PSAttach(Ug96Object_t *Obj)
{
  UG96_Return_t ret = UG96_RETURN_ERROR;
  if (Obj->SimInfo.SimStatus == UG96_SIM_READY)
  {
    if (RET_OK != AT_ExecuteCommand(Obj, UG96_TOUT_75000, (uint8_t *)"AT+CGATT=1\r\n", RET_OK | RET_ERROR | RET_CME_ERROR) )
    {
      AT_RetrieveData(Obj, Obj->CmdResp, 0, RET_CRLF, UG96_TOUT_SHORT);
      ret = UG96_RETURN_ERROR;
    }
    else
    {
      ret = UG96_RETURN_OK;
    }
  }
  return ret;
}
UG96_Return_t UG96_PSAttach ( Ug96Object_t * Obj ) { UG96_Return_t ret = UG96_RETURN_ERROR ; if ( Obj -> SimInfo . SimStatus == UG96_SIM_READY ) { if ( RET_OK != AT_ExecuteCommand ( Obj , UG96_TOUT_75000 , ( uint8_t * ) " \r \n " , RET_OK | RET_ERROR | RET_CME_ERROR ) ) { AT_RetrieveData ( Obj , Obj -> CmdResp , 0 , RET_CRLF , UG96_TOUT_SHORT ) ; ret = UG96_RETURN_ERROR ; } else { ret = UG96_RETURN_OK ; } } return ret ; }
@brief  Attach the MT to the packet domain service
 @param  Obj: pointer to module handle
 @retval Operation status.
@brief Attach the MT to the packet domain service @param Obj : pointer to module handle @retval Operation status .