le_atServer_interface.h
Go to the documentation of this file.
18 * server is compliant with 3GPP 27.007, paragraphs 4.0, 4.1 and 4.2, and V25 ter, paragraphs 5.3,39 * Lowercase characters are changed to their uppercase equivalents. Only characters between quotes63 * All characters after the "D" are considered part of The D command parameter up to a semicolon or90 * Extended syntax command can be concatenated after basic syntax commands without a separator:<br>95 * le_atServer_Open() must be called to bind the file descriptor of the device with the AT commands109 * A new AT command can be added into the parser using le_atServer_Create(), and it can be deleted127 * - In case of a basic format command, if exists, the parameter can be retrieved at the index 0.137 * Even if these types are specific to the extended format commands according to the standards, they142 * parameter value using le_atServer_GetParameter() API. If a parmeter is not parsed with quotes,160 * le_atServer_SendFinalResultCode() takes as arguments the AT command reference, a pattern (which165 * concatenated commands: if one command is failed, next commands are not executed, the final result170 * @deprecated le_atServer_SendFinalResponse() should not be used anymore and will be removed soon.174 * le_atServer_SendFinalResponse(). The corresponding device will be locked until the final response183 * - continue or stop the parsing of concatenated commands: if one command is failed, next commands194 * If an unsolicited response is sent when an AT command is in progress, the unsolicited response200 * le_atServer_EnableExtendedErrorCodes() allows the user to use extended error codes on a selected202 * le_atServer_EnableVerboseErrorCodes() allows the user to enable verbose error codes on a selected204 * le_atServer_DisableExtendedErrorCodes() allows the user to disable the current error mode namely214 * le_atServer_CreateErrorCode() returns a reference which can be used to attach a custom verbose220 * le_atServer_GetTextAsync() allows the user to register a le_atServer_GetTextCallback_t callback246 * all unknown AT commands to an alternative device (such as the modem). For all devices linked to261 * (e.g.; ATD*99***1#). Sending these commands through the bridge may lock the Legato AT commands272 * @warning Some modem AT commands may conflict with Legato APIs; using both may cause problems that276 * The application can send an unsolicited on all opened device, or only one on a dedicated device.299 //--------------------------------------------------------------------------------------------------303 //--------------------------------------------------------------------------------------------------306 //--------------------------------------------------------------------------------------------------309 * Connect the current client thread to the service providing this API. Block until the service is312 * For each thread that wants to use this API, either ConnectService or TryConnectService must be313 * called before any other functions in this API. Normally, ConnectService is automatically called318 //--------------------------------------------------------------------------------------------------324 //--------------------------------------------------------------------------------------------------327 * Try to connect the current client thread to the service providing this API. Return with an error330 * For each thread that wants to use this API, either ConnectService or TryConnectService must be331 * called before any other functions in this API. Normally, ConnectService is automatically called340 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).343 //--------------------------------------------------------------------------------------------------349 //--------------------------------------------------------------------------------------------------353 * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants356 //--------------------------------------------------------------------------------------------------363 //--------------------------------------------------------------------------------------------------369 * longer a connection to the service, and the functions in this API can't be used. For details, see374 //--------------------------------------------------------------------------------------------------381 //--------------------------------------------------------------------------------------------------385 //--------------------------------------------------------------------------------------------------388 //--------------------------------------------------------------------------------------------------392 //--------------------------------------------------------------------------------------------------395 //--------------------------------------------------------------------------------------------------399 //--------------------------------------------------------------------------------------------------402 //--------------------------------------------------------------------------------------------------406 //--------------------------------------------------------------------------------------------------410 //--------------------------------------------------------------------------------------------------414 //--------------------------------------------------------------------------------------------------418 //--------------------------------------------------------------------------------------------------422 //--------------------------------------------------------------------------------------------------426 //--------------------------------------------------------------------------------------------------430 //--------------------------------------------------------------------------------------------------434 //--------------------------------------------------------------------------------------------------439 //--------------------------------------------------------------------------------------------------454 //--------------------------------------------------------------------------------------------------458 //--------------------------------------------------------------------------------------------------475 //--------------------------------------------------------------------------------------------------479 //--------------------------------------------------------------------------------------------------490 //--------------------------------------------------------------------------------------------------494 //--------------------------------------------------------------------------------------------------498 //--------------------------------------------------------------------------------------------------505 //--------------------------------------------------------------------------------------------------507 (518 //--------------------------------------------------------------------------------------------------528 //--------------------------------------------------------------------------------------------------530 (543 //--------------------------------------------------------------------------------------------------556 //--------------------------------------------------------------------------------------------------563 //--------------------------------------------------------------------------------------------------576 //--------------------------------------------------------------------------------------------------583 //--------------------------------------------------------------------------------------------------595 //--------------------------------------------------------------------------------------------------602 //--------------------------------------------------------------------------------------------------613 //--------------------------------------------------------------------------------------------------620 //--------------------------------------------------------------------------------------------------628 //--------------------------------------------------------------------------------------------------635 //--------------------------------------------------------------------------------------------------645 //--------------------------------------------------------------------------------------------------652 //--------------------------------------------------------------------------------------------------659 //--------------------------------------------------------------------------------------------------670 //--------------------------------------------------------------------------------------------------674 //--------------------------------------------------------------------------------------------------681 //--------------------------------------------------------------------------------------------------694 //--------------------------------------------------------------------------------------------------707 //--------------------------------------------------------------------------------------------------716 //--------------------------------------------------------------------------------------------------727 //--------------------------------------------------------------------------------------------------737 //--------------------------------------------------------------------------------------------------746 //--------------------------------------------------------------------------------------------------755 //--------------------------------------------------------------------------------------------------765 //--------------------------------------------------------------------------------------------------769 * @deprecated le_atServer_SendFinalResponse() should not be used anymore and will be removed soon.777 //--------------------------------------------------------------------------------------------------791 //--------------------------------------------------------------------------------------------------800 //--------------------------------------------------------------------------------------------------813 //--------------------------------------------------------------------------------------------------822 //--------------------------------------------------------------------------------------------------837 //--------------------------------------------------------------------------------------------------845 //--------------------------------------------------------------------------------------------------852 //--------------------------------------------------------------------------------------------------860 //--------------------------------------------------------------------------------------------------867 //--------------------------------------------------------------------------------------------------870 * All unknown AT commands will be sent on this alternative file descriptor thanks to the AT client877 //--------------------------------------------------------------------------------------------------884 //--------------------------------------------------------------------------------------------------893 //--------------------------------------------------------------------------------------------------900 //--------------------------------------------------------------------------------------------------909 //--------------------------------------------------------------------------------------------------918 //--------------------------------------------------------------------------------------------------928 //--------------------------------------------------------------------------------------------------937 //--------------------------------------------------------------------------------------------------941 //--------------------------------------------------------------------------------------------------947 //--------------------------------------------------------------------------------------------------951 //--------------------------------------------------------------------------------------------------957 //--------------------------------------------------------------------------------------------------961 //--------------------------------------------------------------------------------------------------967 //--------------------------------------------------------------------------------------------------978 //--------------------------------------------------------------------------------------------------987 //--------------------------------------------------------------------------------------------------995 //--------------------------------------------------------------------------------------------------1002 //--------------------------------------------------------------------------------------------------1010 //--------------------------------------------------------------------------------------------------1019 //--------------------------------------------------------------------------------------------------1029 //--------------------------------------------------------------------------------------------------le_result_t le_atServer_Close(le_atServer_DeviceRef_t device)void(* le_atServer_DisconnectHandler_t)(void *)Definition: le_atServer_interface.h:304Action AT command (e.g. 'AT+CMD')Definition: le_atServer_interface.h:442le_result_t le_atServer_TryConnectService(void)le_result_t le_atServer_RemoveDeviceFromBridge(le_atServer_DeviceRef_t deviceRef, le_atServer_BridgeRef_t bridgeRef)void le_atServer_EnableExtendedErrorCodes(void)le_result_t le_atServer_GetParameter(le_atServer_CmdRef_t commandRef, uint32_t index, char *parameter, size_t parameterSize)void(* le_atServer_GetTextCallbackFunc_t)(le_atServer_CmdRef_t cmdRef, le_result_t result, const char *LE_NONNULL text, uint32_t len, void *contextPtr)Definition: le_atServer_interface.h:530action will be done on a specified deviceDefinition: le_atServer_interface.h:484le_result_t le_atServer_GetCommandName(le_atServer_CmdRef_t commandRef, char *name, size_t nameSize)struct le_atServer_CommandHandler * le_atServer_CommandHandlerRef_tDefinition: le_atServer_interface.h:495le_result_t le_atServer_GetDevice(le_atServer_CmdRef_t commandRef, le_atServer_DeviceRef_t *deviceRefPtr)le_result_t le_atServer_SetVerboseErrorCode(le_atServer_ErrorCodeRef_t errorCodeRef, const char *LE_NONNULL verboseCode)le_result_t le_atServer_EnableEcho(le_atServer_DeviceRef_t device)le_atServer_CommandHandlerRef_t le_atServer_AddCommandHandler(le_atServer_CmdRef_t commandRef, le_atServer_CommandHandlerFunc_t handlerPtr, void *contextPtr)le_atServer_DeviceRef_t le_atServer_Open(int fd)le_atServer_CmdRef_t le_atServer_Create(const char *LE_NONNULL name)void le_atServer_ConnectService(void)le_result_t le_atServer_AddDeviceToBridge(le_atServer_DeviceRef_t deviceRef, le_atServer_BridgeRef_t bridgeRef)action will be done on all bound devicesDefinition: le_atServer_interface.h:482le_result_t le_atServer_Resume(le_atServer_DeviceRef_t device)le_result_t le_atServer_Delete(le_atServer_CmdRef_t commandRef)void(* le_atServer_CommandHandlerFunc_t)(le_atServer_CmdRef_t commandRef, le_atServer_Type_t type, uint32_t parametersNumber, void *contextPtr)Definition: le_atServer_interface.h:507le_result_t le_atServer_CloseBridge(le_atServer_BridgeRef_t bridgeRef)le_result_t le_atServer_SendFinalResponse(le_atServer_CmdRef_t commandRef, le_atServer_FinalRsp_t finalResponse, bool customStringAvailable, const char *LE_NONNULL finalRsp)void le_atServer_EnableVerboseErrorCodes(void)struct le_atServer_Bridge * le_atServer_BridgeRef_tDefinition: le_atServer_interface.h:423void le_atServer_RemoveCommandHandler(le_atServer_CommandHandlerRef_t handlerRef)le_result_t le_atServer_Suspend(le_atServer_DeviceRef_t device)Test AT command (e.g. 'AT+CMD=?')Definition: le_atServer_interface.h:446le_result_t le_atServer_GetTextAsync(le_atServer_CmdRef_t cmdRef, le_atServer_GetTextCallbackFunc_t callbackPtr, void *contextPtr)void le_atServer_DisableExtendedErrorCodes(void)struct le_atServer_ErrorCode * le_atServer_ErrorCodeRef_tDefinition: le_atServer_interface.h:431struct le_atServer_Device * le_atServer_DeviceRef_tDefinition: le_atServer_interface.h:415void le_atServer_SetServerDisconnectHandler(le_atServer_DisconnectHandler_t disconnectHandler, void *contextPtr)AT command received with parameters (e.g. 'AT+CMD=x,y')Definition: le_atServer_interface.h:444le_result_t le_atServer_SendIntermediateResponse(le_atServer_CmdRef_t commandRef, const char *LE_NONNULL intermediateRsp)le_atServer_ErrorCodeRef_t le_atServer_CreateErrorCode(uint32_t errorCode, const char *LE_NONNULL pattern)void le_atServer_DisconnectService(void)le_result_t le_atServer_SendUnsolicitedResponse(const char *LE_NONNULL unsolRsp, le_atServer_AvailableDevice_t availableDevice, le_atServer_DeviceRef_t device)Read AT command (e.g. 'AT+CMD?')Definition: le_atServer_interface.h:448le_result_t le_atServer_DisableEcho(le_atServer_DeviceRef_t device)le_result_t le_atServer_SendFinalResultCode(le_atServer_CmdRef_t commandRef, le_atServer_FinalRsp_t finalResult, const char *LE_NONNULL pattern, uint32_t errorCode)le_atServer_BridgeRef_t le_atServer_OpenBridge(int fd)le_result_t le_atServer_DeleteErrorCode(le_atServer_ErrorCodeRef_t errorCodeRef)struct le_atServer_Cmd * le_atServer_CmdRef_tDefinition: le_atServer_interface.h:407