32#ifndef __CELLULAR_API_H__
33#define __CELLULAR_API_H__
90 uint8_t ratPrioritiesLength );
106 uint8_t ratPrioritiesLength,
107 uint8_t * pOutputRatPrioritiesLength );
244 uint8_t numStatusBuffers,
245 uint8_t * pNumStatus );
287 uint32_t bufferLength );
302 const char * pDnsServerAddress );
317 void * pCallbackContext );
332 void * pCallbackContext );
347 void * pCallbackContext );
362 void * pCallbackContext );
378 void * pCallbackContext );
451 const char * pATCommandPrefix,
452 const char * pATCommandPayload,
473 uint8_t pdnContextId,
511 const uint8_t * pData,
513 uint32_t * pSentDataLength );
532 uint32_t bufferLength,
533 uint32_t * pReceivedDataLength );
564 const char * pcHostName,
565 char * pResolvedAddress );
584 const uint8_t * pOptionValue,
585 uint32_t optionValueLength );
603 void * pCallbackContext );
621 void * pCallbackContext );
640 void * pCallbackContext );
CellularError_t Cellular_RegisterUrcPdnEventCallback(CellularHandle_t cellularHandle, CellularUrcPdnEventCallback_t pdnEventCallback, void *pCallbackContext)
Register/Remove callback for PDN related URC events.
CellularError_t Cellular_GetSimCardInfo(CellularHandle_t cellularHandle, CellularSimCardInfo_t *pSimCardInfo)
Get SIM card information (IMSI, SIM Card number etc.).
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_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_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_DeactivatePdn(CellularHandle_t cellularHandle, uint8_t contextId)
Deactivate a PDN context.
CellularError_t Cellular_RegisterUrcNetworkRegistrationEventCallback(CellularHandle_t cellularHandle, CellularUrcNetworkRegistrationCallback_t networkRegistrationCallback, void *pCallbackContext)
Register/Remove callback for Network Registration URC events.
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_Cleanup(CellularHandle_t cellularHandle)
One time deinitialization function.
CellularError_t Cellular_RegisterUrcSignalStrengthChangedCallback(CellularHandle_t cellularHandle, CellularUrcSignalStrengthChangedCallback_t signalStrengthChangedCallback, void *pCallbackContext)
Register callback for Signal Strength changed URC 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_RfOn(CellularHandle_t cellularHandle)
Turn on RF i.e. turn-off airplane mode.
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_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_Init(CellularHandle_t *pCellularHandle, const CellularCommInterface_t *pCommInterface)
One time initialization function.
CellularError_t Cellular_ActivatePdn(CellularHandle_t cellularHandle, uint8_t contextId)
Activate 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_GetPdnStatus(CellularHandle_t cellularHandle, CellularPdnStatus_t *pPdnStatusBuffers, uint8_t numStatusBuffers, uint8_t *pNumStatus)
Get status reports for all PDN contexts.
CellularError_t Cellular_GetNetworkTime(CellularHandle_t cellularHandle, CellularTime_t *pNetworkTime)
Get the network time.
CellularError_t Cellular_SetDns(CellularHandle_t cellularHandle, uint8_t contextId, const char *pDnsServerAddress)
Set the DNS server to use.
CellularError_t Cellular_GetEidrxSettings(CellularHandle_t cellularHandle, CellularEidrxSettingsList_t *pEidrxSettingsList)
Get current e-I-DRX settings.
CellularError_t Cellular_RegisterModemEventCallback(CellularHandle_t cellularHandle, CellularModemEventCallback_t modemEventCallback, void *pCallbackContext)
Register callback for all modem related events.
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_GetHostByName(CellularHandle_t cellularHandle, uint8_t contextId, const char *pcHostName, char *pResolvedAddress)
Resolve a host name using Domain Name Service.
CellularError_t Cellular_SetEidrxSettings(CellularHandle_t cellularHandle, const CellularEidrxSettings_t *pEidrxSettings)
Set e-I-DRX settings.
CellularError_t Cellular_GetServiceStatus(CellularHandle_t cellularHandle, CellularServiceStatus_t *pServiceStatus)
Get network service status.
CellularError_t Cellular_GetSimCardStatus(CellularHandle_t cellularHandle, CellularSimCardStatus_t *pSimCardStatus)
Get SIM card status (activated/Pin set etc.).
CellularError_t Cellular_GetRegisteredNetwork(CellularHandle_t cellularHandle, CellularPlmnInfo_t *pNetworkInfo)
Get the network on which SIM is currently registered/camped.
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_RfOff(CellularHandle_t cellularHandle)
Turn off RF i.e. turn-on airplane mode.
CellularError_t Cellular_SocketClose(CellularHandle_t cellularHandle, CellularSocketHandle_t socketHandle)
Close the socket.
CellularError_t Cellular_GetSignalInfo(CellularHandle_t cellularHandle, CellularSignalInfo_t *pSignalInfo)
Get signal information.
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_SetRatPriority(CellularHandle_t cellularHandle, const CellularRat_t *pRatPriorities, uint8_t ratPrioritiesLength)
Configure the priority order in which the networks are searched.
CellularError_t Cellular_GetModemInfo(CellularHandle_t cellularHandle, CellularModemInfo_t *pModemInfo)
Get the information about the modem (HW version, FW version etc.).
CellularError_t Cellular_SetPsmSettings(CellularHandle_t cellularHandle, const CellularPsmSettings_t *pPsmSettings)
Set PSM settings.
CellularError_t Cellular_SocketRegisterClosedCallback(CellularHandle_t cellularHandle, CellularSocketHandle_t socketHandle, CellularSocketClosedCallback_t closedCallback, void *pCallbackContext)
Register closed callback on the socket.
CellularError_t Cellular_SetPdnConfig(CellularHandle_t cellularHandle, uint8_t contextId, const CellularPdnConfig_t *pPdnConfig)
Set PDN config for a PDN context.
CellularATCommandType_t
Represents AT Command type.
Definition: cellular_types.h:360
CellularSocketType_t
Represents socket type.
Definition: cellular_types.h:273
CellularSocketOption_t
Socket option names.
Definition: cellular_types.h:325
CellularSocketAccessMode_t
Represents data access modes.
Definition: cellular_types.h:293
CellularRat_t
Enums representing Radio Access Technologies (RATs). Reference 3GPP TS 27.007 PLMN selection +COPS.
Definition: cellular_types.h:111
CellularSocketOptionLevel_t
Represents socket option level.
Definition: cellular_types.h:315
CellularError_t
Status code returns from APIs.
Definition: cellular_types.h:88
CellularSocketDomain_t
Represents socket domain.
Definition: cellular_types.h:263
CellularSocketProtocol_t
Represents socket protocol.
Definition: cellular_types.h:283
void(* CellularModemEventCallback_t)(CellularModemEvent_t modemEvent, void *pCallbackContext)
Callback used to inform about modem events.
Definition: cellular_types.h:789
void(* CellularUrcSignalStrengthChangedCallback_t)(CellularUrcEvent_t urcEvent, const CellularSignalInfo_t *pSignalInfo, void *pCallbackContext)
Callback used to inform about signal strength changed URC event.
Definition: cellular_types.h:766
void(* CellularSocketClosedCallback_t)(CellularSocketHandle_t socketHandle, void *pCallbackContext)
Callback used to inform that remote end closed the connection for a connected socket.
Definition: cellular_types.h:826
void(* CellularUrcPdnEventCallback_t)(CellularUrcEvent_t urcEvent, uint8_t contextId, void *pCallbackContext)
Callback used to inform about PDN URC events.
Definition: cellular_types.h:753
void(* CellularUrcNetworkRegistrationCallback_t)(CellularUrcEvent_t urcEvent, const CellularServiceStatus_t *pServiceStatus, void *pCallbackContext)
Callback used to inform about a Network Registration URC event.
Definition: cellular_types.h:740
void(* CellularSocketDataReadyCallback_t)(CellularSocketHandle_t socketHandle, void *pCallbackContext)
Callback used to inform that data is ready for reading on a socket.
Definition: cellular_types.h:813
void(* CellularSocketOpenCallback_t)(CellularUrcEvent_t urcEvent, CellularSocketHandle_t socketHandle, void *pCallbackContext)
Callback used to inform about the status of socket open.
Definition: cellular_types.h:801
CellularPktStatus_t(* CellularATCommandResponseReceivedCallback_t)(CellularHandle_t cellularHandle, const CellularATCommandResponse_t *pAtResp, void *pData, uint16_t dataLen)
Callback used to inform about the response of an AT command sent using Cellular_ATCommandRaw API.
Definition: cellular_types.h:726
void(* CellularUrcGenericCallback_t)(const char *pRawData, void *pCallbackContext)
Generic callback used to inform all other URC events.
Definition: cellular_types.h:778
struct CellularSocketContext * CellularSocketHandle_t
Opaque socket handle.
Definition: cellular_types.h:81
Represents the functions of a comm interface.
Definition: cellular_comm_interface.h:160
Represents e-I-DRX settings.
Definition: cellular_types.h:572
Cellular Represents e-I-DRX settings Lists.
Definition: cellular_types.h:663
Modem information.
Definition: cellular_types.h:408
Represents a PDN config.
Definition: cellular_types.h:683
Represents status of a PDN context.
Definition: cellular_types.h:696
Public Land Mobile Network (PLMN) information.
Definition: cellular_types.h:387
Represents PSM settings.
Definition: cellular_types.h:493
Represents network service status.
Definition: cellular_types.h:454
Represents signal information.
Definition: cellular_types.h:440
SIM Card information.
Definition: cellular_types.h:397
SIM Card status.
Definition: cellular_types.h:377
Represents socket address.
Definition: cellular_types.h:708
Represents time.
Definition: cellular_types.h:422