Go to the source code of this file.
Functions | |
CellularError_t | Cellular_Init (CellularHandle_t *pCellularHandle, const CellularCommInterface_t *pCommInterface) |
One time initialization function. | |
CellularError_t | Cellular_Cleanup (CellularHandle_t cellularHandle) |
One time deinitialization function. | |
CellularError_t | Cellular_SetRatPriority (CellularHandle_t cellularHandle, const CellularRat_t *pRatPriorities, uint8_t ratPrioritiesLength) |
Configure the priority order in which the networks are searched. | |
CellularError_t | Cellular_GetRatPriority (CellularHandle_t cellularHandle, CellularRat_t *pRatPriorities, uint8_t ratPrioritiesLength, uint8_t *pOutputRatPrioritiesLength) |
Get the priority order in which the networks are searched. | |
CellularError_t | Cellular_RfOn (CellularHandle_t cellularHandle) |
Turn on RF i.e. turn-off airplane mode. | |
CellularError_t | Cellular_RfOff (CellularHandle_t cellularHandle) |
Turn off RF i.e. turn-on airplane mode. | |
CellularError_t | Cellular_GetSimCardStatus (CellularHandle_t cellularHandle, CellularSimCardStatus_t *pSimCardStatus) |
Get SIM card status (activated/Pin set etc.). | |
CellularError_t | Cellular_GetSimCardInfo (CellularHandle_t cellularHandle, CellularSimCardInfo_t *pSimCardInfo) |
Get SIM card information (IMSI, SIM Card number etc.). | |
CellularError_t | Cellular_GetModemInfo (CellularHandle_t cellularHandle, CellularModemInfo_t *pModemInfo) |
Get the information about the modem (HW version, FW version etc.). | |
CellularError_t | Cellular_GetRegisteredNetwork (CellularHandle_t cellularHandle, CellularPlmnInfo_t *pNetworkInfo) |
Get the network on which SIM is currently registered/camped. | |
CellularError_t | Cellular_GetNetworkTime (CellularHandle_t cellularHandle, CellularTime_t *pNetworkTime) |
Get the network time. | |
CellularError_t | Cellular_GetSignalInfo (CellularHandle_t cellularHandle, CellularSignalInfo_t *pSignalInfo) |
Get signal information. | |
CellularError_t | Cellular_GetServiceStatus (CellularHandle_t cellularHandle, CellularServiceStatus_t *pServiceStatus) |
Get network service status. | |
CellularError_t | Cellular_SetPdnConfig (CellularHandle_t cellularHandle, uint8_t contextId, const CellularPdnConfig_t *pPdnConfig) |
Set PDN config for a PDN context. | |
CellularError_t | Cellular_GetPdnStatus (CellularHandle_t cellularHandle, CellularPdnStatus_t *pPdnStatusBuffers, uint8_t numStatusBuffers, uint8_t *pNumStatus) |
Get status reports for all PDN contexts. | |
CellularError_t | Cellular_ActivatePdn (CellularHandle_t cellularHandle, uint8_t contextId) |
Activate a PDN context. | |
CellularError_t | Cellular_DeactivatePdn (CellularHandle_t cellularHandle, uint8_t contextId) |
Deactivate a PDN context. | |
CellularError_t | Cellular_GetIPAddress (CellularHandle_t cellularHandle, uint8_t contextId, char *pBuffer, uint32_t bufferLength) |
Get the IP Address assigned to the module. | |
CellularError_t | Cellular_SetDns (CellularHandle_t cellularHandle, uint8_t contextId, const char *pDnsServerAddress) |
Set the DNS server to use. | |
CellularError_t | Cellular_RegisterUrcNetworkRegistrationEventCallback (CellularHandle_t cellularHandle, CellularUrcNetworkRegistrationCallback_t networkRegistrationCallback, void *pCallbackContext) |
Register/Remove callback for Network Registration URC events. | |
CellularError_t | Cellular_RegisterUrcPdnEventCallback (CellularHandle_t cellularHandle, CellularUrcPdnEventCallback_t pdnEventCallback, void *pCallbackContext) |
Register/Remove callback for PDN related URC events. | |
CellularError_t | Cellular_RegisterUrcSignalStrengthChangedCallback (CellularHandle_t cellularHandle, CellularUrcSignalStrengthChangedCallback_t signalStrengthChangedCallback, void *pCallbackContext) |
Register callback for Signal Strength changed URC events. | |
CellularError_t | Cellular_RegisterModemEventCallback (CellularHandle_t cellularHandle, CellularModemEventCallback_t modemEventCallback, void *pCallbackContext) |
Register callback for all modem related events. | |
CellularError_t | Cellular_RegisterUrcGenericCallback (CellularHandle_t cellularHandle, CellularUrcGenericCallback_t genericCallback, void *pCallbackContext) |
Register generic callback for all other URC events than covered in above callbacks. | |
CellularError_t | Cellular_GetPsmSettings (CellularHandle_t cellularHandle, CellularPsmSettings_t *pPsmSettings) |
Get current PSM settings. | |
CellularError_t | Cellular_SetPsmSettings (CellularHandle_t cellularHandle, const CellularPsmSettings_t *pPsmSettings) |
Set PSM settings. | |
CellularError_t | Cellular_GetEidrxSettings (CellularHandle_t cellularHandle, CellularEidrxSettingsList_t *pEidrxSettingsList) |
Get current e-I-DRX settings. | |
CellularError_t | Cellular_SetEidrxSettings (CellularHandle_t cellularHandle, const CellularEidrxSettings_t *pEidrxSettings) |
Set e-I-DRX settings. | |
CellularError_t | Cellular_ATCommandRaw (CellularHandle_t cellularHandle, const char *pATCommandPrefix, const char *pATCommandPayload, CellularATCommandType_t atCommandType, CellularATCommandResponseReceivedCallback_t responseReceivedCallback, void *pData, uint16_t dataLen) |
Send the raw AT command to the module. | |
CellularError_t | Cellular_CreateSocket (CellularHandle_t cellularHandle, uint8_t pdnContextId, CellularSocketDomain_t socketDomain, CellularSocketType_t socketType, CellularSocketProtocol_t socketProtocol, CellularSocketHandle_t *pSocketHandle) |
Create a socket. | |
CellularError_t | Cellular_SocketConnect (CellularHandle_t cellularHandle, CellularSocketHandle_t socketHandle, CellularSocketAccessMode_t dataAccessMode, const CellularSocketAddress_t *pRemoteSocketAddress) |
Connect to a remote socket. | |
CellularError_t | Cellular_SocketSend (CellularHandle_t cellularHandle, CellularSocketHandle_t socketHandle, const uint8_t *pData, uint32_t dataLength, uint32_t *pSentDataLength) |
Send data to the connected remote socket. | |
CellularError_t | Cellular_SocketRecv (CellularHandle_t cellularHandle, CellularSocketHandle_t socketHandle, uint8_t *pBuffer, uint32_t bufferLength, uint32_t *pReceivedDataLength) |
Receive data on a connected socket. | |
CellularError_t | Cellular_SocketClose (CellularHandle_t cellularHandle, CellularSocketHandle_t socketHandle) |
Close the socket. | |
CellularError_t | Cellular_GetHostByName (CellularHandle_t cellularHandle, uint8_t contextId, const char *pcHostName, char *pResolvedAddress) |
Resolve a host name using Domain Name Service. | |
CellularError_t | Cellular_SocketSetSockOpt (CellularHandle_t cellularHandle, CellularSocketHandle_t socketHandle, CellularSocketOptionLevel_t optionLevel, CellularSocketOption_t option, const uint8_t *pOptionValue, uint32_t optionValueLength) |
Set options for a socket. | |
CellularError_t | Cellular_SocketRegisterSocketOpenCallback (CellularHandle_t cellularHandle, CellularSocketHandle_t socketHandle, CellularSocketOpenCallback_t socketOpenCallback, void *pCallbackContext) |
Register Socket open callback on the socket. | |
CellularError_t | Cellular_SocketRegisterDataReadyCallback (CellularHandle_t cellularHandle, CellularSocketHandle_t socketHandle, CellularSocketDataReadyCallback_t dataReadyCallback, void *pCallbackContext) |
Register data ready callback on the socket. | |
CellularError_t | Cellular_SocketRegisterClosedCallback (CellularHandle_t cellularHandle, CellularSocketHandle_t socketHandle, CellularSocketClosedCallback_t closedCallback, void *pCallbackContext) |
Register closed callback on the socket. | |
CellularError_t Cellular_Init | ( | CellularHandle_t * | pCellularHandle, |
const CellularCommInterface_t * | pCommInterface | ||
) |
One time initialization function.
This function initializes and returns the supplied context. It must be called once (and only once) before calling any other function of this library.
[in,out] | pCellularHandle | the handle pointer to store the cellular handle. |
[in] | pCommInterface | Comm interface for communicating with the module. |
CellularError_t Cellular_Cleanup | ( | CellularHandle_t | cellularHandle | ) |
One time deinitialization function.
This function frees resources taken in Cellular_Init. After this function returns, Cellular_Init must be called again before calling any other function of this library.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
CellularError_t Cellular_SetRatPriority | ( | CellularHandle_t | cellularHandle, |
const CellularRat_t * | pRatPriorities, | ||
uint8_t | ratPrioritiesLength | ||
) |
Configure the priority order in which the networks are searched.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[in] | pRatPriorities | An array of RATs in priority order. For example, to search NB-IoT first, then Cat-M1 and then LTE, the array should contain: { CELLULAR_RAT_NBIOT, CELLULAR_RAT_CATM1, CELLULAR_RAT_LTE }. |
[in] | ratPrioritiesLength | Length of the pRatPriorities array. |
CellularError_t Cellular_GetRatPriority | ( | CellularHandle_t | cellularHandle, |
CellularRat_t * | pRatPriorities, | ||
uint8_t | ratPrioritiesLength, | ||
uint8_t * | pOutputRatPrioritiesLength | ||
) |
Get the priority order in which the networks are searched.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[out] | pRatPriorities | An array of current RATs in priority order. |
[in] | ratPrioritiesLength | Length of the pRatPriorities array. |
[out] | pOutputRatPrioritiesLength | Actual number of items filled into pRatPriorities by this function when it returns. |
CellularError_t Cellular_RfOn | ( | CellularHandle_t | cellularHandle | ) |
Turn on RF i.e. turn-off airplane mode.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
CellularError_t Cellular_RfOff | ( | CellularHandle_t | cellularHandle | ) |
Turn off RF i.e. turn-on airplane mode.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
CellularError_t Cellular_GetSimCardStatus | ( | CellularHandle_t | cellularHandle, |
CellularSimCardStatus_t * | pSimCardStatus | ||
) |
Get SIM card status (activated/Pin set etc.).
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[out] | pSimCardStatus | Out parameter to provide the SIM card status. |
CellularError_t Cellular_GetSimCardInfo | ( | CellularHandle_t | cellularHandle, |
CellularSimCardInfo_t * | pSimCardInfo | ||
) |
Get SIM card information (IMSI, SIM Card number etc.).
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[out] | pSimCardInfo | Out parameter to provide the SIM card information. |
CellularError_t Cellular_GetModemInfo | ( | CellularHandle_t | cellularHandle, |
CellularModemInfo_t * | pModemInfo | ||
) |
Get the information about the modem (HW version, FW version etc.).
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[out] | pModemInfo | Out parameter to provide the modem information. |
CellularError_t Cellular_GetRegisteredNetwork | ( | CellularHandle_t | cellularHandle, |
CellularPlmnInfo_t * | pNetworkInfo | ||
) |
Get the network on which SIM is currently registered/camped.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[out] | pNetworkInfo | Out parameter to provide the network information. |
CellularError_t Cellular_GetNetworkTime | ( | CellularHandle_t | cellularHandle, |
CellularTime_t * | pNetworkTime | ||
) |
Get the network time.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[out] | pNetworkTime | Out parameter to provide the network time. |
CellularError_t Cellular_GetSignalInfo | ( | CellularHandle_t | cellularHandle, |
CellularSignalInfo_t * | pSignalInfo | ||
) |
Get signal information.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[out] | pSignalInfo | Out parameter to provide the signal information. |
CellularError_t Cellular_GetServiceStatus | ( | CellularHandle_t | cellularHandle, |
CellularServiceStatus_t * | pServiceStatus | ||
) |
Get network service status.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[out] | pServiceStatus | Out parameter to provide the service status. |
CellularError_t Cellular_SetPdnConfig | ( | CellularHandle_t | cellularHandle, |
uint8_t | contextId, | ||
const CellularPdnConfig_t * | pPdnConfig | ||
) |
Set PDN config for a PDN context.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[in] | contextId | Context ID of the PDN to set the config for. Context ID value should be in range between CELLULAR_PDN_CONTEXT_ID_MIN and CELLULAR_PDN_CONTEXT_ID_MAX. The context ID with specified PDN config will be used with other CELLULAR APIs. |
[in] | pPdnConfig | PDN config to set. |
CellularError_t Cellular_GetPdnStatus | ( | CellularHandle_t | cellularHandle, |
CellularPdnStatus_t * | pPdnStatusBuffers, | ||
uint8_t | numStatusBuffers, | ||
uint8_t * | pNumStatus | ||
) |
Get status reports for all PDN contexts.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[out] | pPdnStatusBuffers | Out parameter to provide array of PDN contexts. |
[in] | numStatusBuffers | Number of CellularPdnStatus_t buffers in the provided array pPdnStatusBuffers. |
[out] | pNumStatus | Out parameter to provide the number of PDN statuses returned. |
CellularError_t Cellular_ActivatePdn | ( | CellularHandle_t | cellularHandle, |
uint8_t | contextId | ||
) |
Activate a PDN context.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[in] | contextId | Context ID of the PDN context to activate. The same context ID should be used with Cellular_SetPdnConfig before calling this API. |
CellularError_t Cellular_DeactivatePdn | ( | CellularHandle_t | cellularHandle, |
uint8_t | contextId | ||
) |
Deactivate a PDN context.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[in] | contextId | Context ID of the PDN context to deactivate. |
CellularError_t Cellular_GetIPAddress | ( | CellularHandle_t | cellularHandle, |
uint8_t | contextId, | ||
char * | pBuffer, | ||
uint32_t | bufferLength | ||
) |
Get the IP Address assigned to the module.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[in] | contextId | Context ID of the PDN context for which IP address is requested. |
[out] | pBuffer | the buffer to receive the IP address into. The returned pBuffer is a NULL terminated string. |
[in] | bufferLength | of the buffer pBuffer. |
CellularError_t Cellular_SetDns | ( | CellularHandle_t | cellularHandle, |
uint8_t | contextId, | ||
const char * | pDnsServerAddress | ||
) |
Set the DNS server to use.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[in] | contextId | Context ID of the PDN context for which DNS needs to be set. |
[in] | pDnsServerAddress | The address of the DNS server to set. It should be a NULL terminated string. |
CellularError_t Cellular_RegisterUrcNetworkRegistrationEventCallback | ( | CellularHandle_t | cellularHandle, |
CellularUrcNetworkRegistrationCallback_t | networkRegistrationCallback, | ||
void * | pCallbackContext | ||
) |
Register/Remove callback for Network Registration URC events.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[in] | networkRegistrationCallback | The callback to register. Set to NULL to remove the existing callback. |
[in] | pCallbackContext | The context to be passed to callback function. |
CellularError_t Cellular_RegisterUrcPdnEventCallback | ( | CellularHandle_t | cellularHandle, |
CellularUrcPdnEventCallback_t | pdnEventCallback, | ||
void * | pCallbackContext | ||
) |
Register/Remove callback for PDN related URC events.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[in] | pdnEventCallback | The callback to register. Set to NULL remove the existing callback. |
[in] | pCallbackContext | The context to be passed to callback function. |
CellularError_t Cellular_RegisterUrcSignalStrengthChangedCallback | ( | CellularHandle_t | cellularHandle, |
CellularUrcSignalStrengthChangedCallback_t | signalStrengthChangedCallback, | ||
void * | pCallbackContext | ||
) |
Register callback for Signal Strength changed URC events.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[in] | signalStrengthChangedCallback | The callback to register. Set to NULL to remove the existing callback. |
[in] | pCallbackContext | The context to be passed to callback function. |
CellularError_t Cellular_RegisterModemEventCallback | ( | CellularHandle_t | cellularHandle, |
CellularModemEventCallback_t | modemEventCallback, | ||
void * | pCallbackContext | ||
) |
Register callback for all modem related events.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[in] | modemEventCallback | The callback to register. Set to NULL to remove the existing callback. |
[in] | pCallbackContext | The context to be passed to callback function. |
CellularError_t Cellular_RegisterUrcGenericCallback | ( | CellularHandle_t | cellularHandle, |
CellularUrcGenericCallback_t | genericCallback, | ||
void * | pCallbackContext | ||
) |
Register generic callback for all other URC events than covered in above callbacks.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[in] | genericCallback | The callback to register. Set to NULL to remove the existing callback. |
[in] | pCallbackContext | The context to be passed to callback function. |
CellularError_t Cellular_GetPsmSettings | ( | CellularHandle_t | cellularHandle, |
CellularPsmSettings_t * | pPsmSettings | ||
) |
Get current PSM settings.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[out] | pPsmSettings | Out parameter to provide the PSM settings. |
CellularError_t Cellular_SetPsmSettings | ( | CellularHandle_t | cellularHandle, |
const CellularPsmSettings_t * | pPsmSettings | ||
) |
Set PSM settings.
Enable/disable PSM by using CellularPsmSettings_t structure.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[in] | pPsmSettings | PSM settings to set. |
CellularError_t Cellular_GetEidrxSettings | ( | CellularHandle_t | cellularHandle, |
CellularEidrxSettingsList_t * | pEidrxSettingsList | ||
) |
Get current e-I-DRX settings.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[out] | pEidrxSettingsList | Out parameter to provide the e-I-DRX settings. |
CellularError_t Cellular_SetEidrxSettings | ( | CellularHandle_t | cellularHandle, |
const CellularEidrxSettings_t * | pEidrxSettings | ||
) |
Set e-I-DRX settings.
This API can be used to enable/disable e-I-DRX by using the mode member of CellularEidrxSettings_t.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[in] | pEidrxSettings | e-I-DRX settings to set. |
CellularError_t Cellular_ATCommandRaw | ( | CellularHandle_t | cellularHandle, |
const char * | pATCommandPrefix, | ||
const char * | pATCommandPayload, | ||
CellularATCommandType_t | atCommandType, | ||
CellularATCommandResponseReceivedCallback_t | responseReceivedCallback, | ||
void * | pData, | ||
uint16_t | dataLen | ||
) |
Send the raw AT command to the module.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[in] | pATCommandPrefix | The AT command response prefix. NULL if the response has no prefix. |
[in] | pATCommandPayload | The AT command to send. It should be a NULL terminated string. |
[in] | atCommandType | Type of AT command. |
[in] | responseReceivedCallback | Callback to be invoked when a response for the command is received. |
[in] | pData | The pData pointer will be passed in responseReceivedCallback. |
[in] | dataLen | The dataLen value will be passed in responseReceivedCallback. |
CellularError_t Cellular_CreateSocket | ( | CellularHandle_t | cellularHandle, |
uint8_t | pdnContextId, | ||
CellularSocketDomain_t | socketDomain, | ||
CellularSocketType_t | socketType, | ||
CellularSocketProtocol_t | socketProtocol, | ||
CellularSocketHandle_t * | pSocketHandle | ||
) |
Create a socket.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[in] | pdnContextId | pdn context id on which this socket needs to be created. The pdn context must be previously activated by Cellular_ActivatePdn function. |
[in] | socketDomain | Socket domain. |
[in] | socketType | Socket Type. |
[in] | socketProtocol | Socket Protocol. |
[out] | pSocketHandle | Out parameter to provide the created handle. |
CellularError_t Cellular_SocketConnect | ( | CellularHandle_t | cellularHandle, |
CellularSocketHandle_t | socketHandle, | ||
CellularSocketAccessMode_t | dataAccessMode, | ||
const CellularSocketAddress_t * | pRemoteSocketAddress | ||
) |
Connect to a remote socket.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[in] | socketHandle | Socket handle returned from the Cellular_CreateSocket call. |
[in] | dataAccessMode | Data access mode of the socket. Buffer, Direct Push or Transparent. |
[in] | pRemoteSocketAddress | Address (IP and Port) of the remote socket to connect to. |
CellularError_t Cellular_SocketSend | ( | CellularHandle_t | cellularHandle, |
CellularSocketHandle_t | socketHandle, | ||
const uint8_t * | pData, | ||
uint32_t | dataLength, | ||
uint32_t * | pSentDataLength | ||
) |
Send data to the connected remote socket.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[in] | socketHandle | Socket handle returned from the Cellular_CreateSocket call. |
[in] | pData | The buffer containing that data to be sent. |
[in] | dataLength | Length of the data in the pData buffer. |
[out] | pSentDataLength | Out parameter to provide the length of the actual data sent. Note that it may be less than the dataLength in case complete data could not be sent. |
CellularError_t Cellular_SocketRecv | ( | CellularHandle_t | cellularHandle, |
CellularSocketHandle_t | socketHandle, | ||
uint8_t * | pBuffer, | ||
uint32_t | bufferLength, | ||
uint32_t * | pReceivedDataLength | ||
) |
Receive data on a connected socket.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[in] | socketHandle | Socket handle returned from the Cellular_CreateSocket call. |
[out] | pBuffer | The buffer to receive the data into. |
[in] | bufferLength | Length of the buffer pBuffer. |
[out] | pReceivedDataLength | Out parameter to provide the of the actual data received in the buffer pBuffer. Note that it may be less than bufferLength. |
CellularError_t Cellular_SocketClose | ( | CellularHandle_t | cellularHandle, |
CellularSocketHandle_t | socketHandle | ||
) |
Close the socket.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[in] | socketHandle | Socket handle returned from the Cellular_CreateSocket call. |
CellularError_t Cellular_GetHostByName | ( | CellularHandle_t | cellularHandle, |
uint8_t | contextId, | ||
const char * | pcHostName, | ||
char * | pResolvedAddress | ||
) |
Resolve a host name using Domain Name Service.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[in] | contextId | Context ID of the PDN context for which DNS is set. |
[in] | pcHostName | The host name to resolve. It should be a NULL terminated string. The length of the string should not exceed RFC1035 defined. |
[out] | pResolvedAddress | The output parameter to return the resolved address. The length of this buffer should be at least CELLULAR_IP_ADDRESS_MAX_SIZE. The returned buffer is a NULL terminated string. |
CellularError_t Cellular_SocketSetSockOpt | ( | CellularHandle_t | cellularHandle, |
CellularSocketHandle_t | socketHandle, | ||
CellularSocketOptionLevel_t | optionLevel, | ||
CellularSocketOption_t | option, | ||
const uint8_t * | pOptionValue, | ||
uint32_t | optionValueLength | ||
) |
Set options for a socket.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[in] | socketHandle | Socket handle returned from the Cellular_CreateSocket call. |
[in] | optionLevel | Socket option level (IP or TCP/UDP). |
[in] | option | Socket option to set. |
[in] | pOptionValue | Buffer containing the socket option value. |
[in] | optionValueLength | Length of the value pointed to by pOptionValue. |
CellularError_t Cellular_SocketRegisterSocketOpenCallback | ( | CellularHandle_t | cellularHandle, |
CellularSocketHandle_t | socketHandle, | ||
CellularSocketOpenCallback_t | socketOpenCallback, | ||
void * | pCallbackContext | ||
) |
Register Socket open callback on the socket.
This callback is invoked when modem confirms that a socket is opened.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[in] | socketHandle | Socket handle returned from the Cellular_CreateSocket call. |
[in] | socketOpenCallback | The callback to register. |
[in] | pCallbackContext | The context to be passed to callback function. |
CellularError_t Cellular_SocketRegisterDataReadyCallback | ( | CellularHandle_t | cellularHandle, |
CellularSocketHandle_t | socketHandle, | ||
CellularSocketDataReadyCallback_t | dataReadyCallback, | ||
void * | pCallbackContext | ||
) |
Register data ready callback on the socket.
This callback is invoked whenever data is ready to be read from the socket.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[in] | socketHandle | Socket handle returned from the Cellular_CreateSocket call. |
[in] | dataReadyCallback | The callback to register. |
[in] | pCallbackContext | The context to be passed to callback function. |
CellularError_t Cellular_SocketRegisterClosedCallback | ( | CellularHandle_t | cellularHandle, |
CellularSocketHandle_t | socketHandle, | ||
CellularSocketClosedCallback_t | closedCallback, | ||
void * | pCallbackContext | ||
) |
Register closed callback on the socket.
This callback is invoked whenever remote end closes the connection on a connected socket.
[in] | cellularHandle | The opaque cellular context pointer created by Cellular_Init. |
[in] | socketHandle | Socket handle returned from the Cellular_CreateSocket call. |
[in] | closedCallback | The callback to register. |
[in] | pCallbackContext | The context to be passed to callback function. |