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_Start() 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 deleted117 * le_atServer_AddCommandHandler(). It can be removed with le_atServer_RemoveCommandHandler().<br>120 * The device used to execute the AT command can be retrieve thanks to le_atServer_GetDevice().<br>124 * - In case of a basic format command, if exists, the parameter can be retrieved at the index 0.<br>133 * Even if these types are specific to the extended format commands according to the standards, they147 * le_atServer_SendFinalResponse(). The corresponding device will be locked until the final response156 * - continue or stop the parsing of concatenated commands: if one command is failed, next commands165 * response is sent between the latest final response and the next reception of an AT command).<br>166 * If an unsolicited response is sent when an AT command is in progress, the unsolicited response173 * all unknown AT commands to an altervative device (such as the modem). For all devices linked to174 * that bridge using le_atServer_AddDeviceToBridge(), unknown commands will be sent through that file185 * @warning Some modem AT commands may conflict with Legato APIs; using both may cause problems that189 * The application can send an unsolicited on all opened device, or only one on a dedicated deivce.213 //--------------------------------------------------------------------------------------------------217 //--------------------------------------------------------------------------------------------------220 //--------------------------------------------------------------------------------------------------223 * Connect the current client thread to the service providing this API. Block until the service is226 * For each thread that wants to use this API, either ConnectService or TryConnectService must be227 * called before any other functions in this API. Normally, ConnectService is automatically called232 //--------------------------------------------------------------------------------------------------238 //--------------------------------------------------------------------------------------------------241 * Try to connect the current client thread to the service providing this API. Return with an error244 * For each thread that wants to use this API, either ConnectService or TryConnectService must be245 * called before any other functions in this API. Normally, ConnectService is automatically called254 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).257 //--------------------------------------------------------------------------------------------------263 //--------------------------------------------------------------------------------------------------267 * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants270 //--------------------------------------------------------------------------------------------------277 //--------------------------------------------------------------------------------------------------283 * longer a connection to the service, and the functions in this API can't be used. For details, see288 //--------------------------------------------------------------------------------------------------295 //--------------------------------------------------------------------------------------------------299 //--------------------------------------------------------------------------------------------------303 //--------------------------------------------------------------------------------------------------307 //--------------------------------------------------------------------------------------------------311 //--------------------------------------------------------------------------------------------------315 //--------------------------------------------------------------------------------------------------319 //--------------------------------------------------------------------------------------------------324 //--------------------------------------------------------------------------------------------------339 //--------------------------------------------------------------------------------------------------343 //--------------------------------------------------------------------------------------------------356 //--------------------------------------------------------------------------------------------------360 //--------------------------------------------------------------------------------------------------371 //--------------------------------------------------------------------------------------------------375 //--------------------------------------------------------------------------------------------------379 //--------------------------------------------------------------------------------------------------386 //--------------------------------------------------------------------------------------------------388 (399 //--------------------------------------------------------------------------------------------------412 //--------------------------------------------------------------------------------------------------419 //--------------------------------------------------------------------------------------------------432 //--------------------------------------------------------------------------------------------------439 //--------------------------------------------------------------------------------------------------451 //--------------------------------------------------------------------------------------------------458 //--------------------------------------------------------------------------------------------------469 //--------------------------------------------------------------------------------------------------476 //--------------------------------------------------------------------------------------------------484 //--------------------------------------------------------------------------------------------------492 //--------------------------------------------------------------------------------------------------502 //--------------------------------------------------------------------------------------------------509 //--------------------------------------------------------------------------------------------------516 //--------------------------------------------------------------------------------------------------527 //--------------------------------------------------------------------------------------------------531 //--------------------------------------------------------------------------------------------------538 //--------------------------------------------------------------------------------------------------547 //--------------------------------------------------------------------------------------------------560 //--------------------------------------------------------------------------------------------------569 //--------------------------------------------------------------------------------------------------580 //--------------------------------------------------------------------------------------------------590 //--------------------------------------------------------------------------------------------------599 //--------------------------------------------------------------------------------------------------608 //--------------------------------------------------------------------------------------------------619 //--------------------------------------------------------------------------------------------------628 //--------------------------------------------------------------------------------------------------643 //--------------------------------------------------------------------------------------------------652 //--------------------------------------------------------------------------------------------------668 //--------------------------------------------------------------------------------------------------676 //--------------------------------------------------------------------------------------------------683 //--------------------------------------------------------------------------------------------------691 //--------------------------------------------------------------------------------------------------698 //--------------------------------------------------------------------------------------------------701 * All unknown AT commands will be sent on this alternative file descriptor thanks to the AT client708 //--------------------------------------------------------------------------------------------------715 //--------------------------------------------------------------------------------------------------724 //--------------------------------------------------------------------------------------------------731 //--------------------------------------------------------------------------------------------------740 //--------------------------------------------------------------------------------------------------749 //--------------------------------------------------------------------------------------------------759 //--------------------------------------------------------------------------------------------------void le_atServer_SetServerDisconnectHandler(le_atServer_DisconnectHandler_t disconnectHandler, void *contextPtr)le_result_t le_atServer_AddDeviceToBridge(le_atServer_DeviceRef_t deviceRef, le_atServer_BridgeRef_t bridgeRef)Definition: le_atServer_interface.h:346le_result_t le_atServer_SendIntermediateResponse(le_atServer_CmdRef_t commandRef, const char *intermediateRsp)action will be done on all bound devicesDefinition: le_atServer_interface.h:363Action AT command (e.g. 'AT+CMD')Definition: le_atServer_interface.h:327le_atServer_BridgeRef_t le_atServer_OpenBridge(int fd)le_result_t le_atServer_CloseBridge(le_atServer_BridgeRef_t bridgeRef)struct le_atServer_Device * le_atServer_DeviceRef_tDefinition: le_atServer_interface.h:308action will be done on a specified deviceDefinition: le_atServer_interface.h:365le_atServer_DeviceRef_t le_atServer_Open(int fd)le_result_t le_atServer_GetCommandName(le_atServer_CmdRef_t commandRef, char *name, size_t nameSize)void(* le_atServer_DisconnectHandler_t)(void *)Definition: le_atServer_interface.h:218le_result_t le_atServer_Close(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:388le_atServer_CommandHandlerRef_t le_atServer_AddCommandHandler(le_atServer_CmdRef_t commandRef, le_atServer_CommandHandlerFunc_t handlerPtr, void *contextPtr)void le_atServer_DisconnectService(void)le_result_t le_atServer_RemoveDeviceFromBridge(le_atServer_DeviceRef_t deviceRef, le_atServer_BridgeRef_t bridgeRef)le_result_t le_atServer_DisableEcho(le_atServer_DeviceRef_t device)AT command received with parameters (e.g. 'AT+CMD=x,y')Definition: le_atServer_interface.h:329le_result_t le_atServer_EnableEcho(le_atServer_DeviceRef_t device)le_result_t le_atServer_SendUnsolicitedResponse(const char *unsolRsp, le_atServer_AvailableDevice_t availableDevice, le_atServer_DeviceRef_t device)void le_atServer_ConnectService(void)Test AT command (e.g. 'AT+CMD=?')Definition: le_atServer_interface.h:331le_result_t le_atServer_GetParameter(le_atServer_CmdRef_t commandRef, uint32_t index, char *parameter, size_t parameterSize)struct le_atServer_CommandHandler * le_atServer_CommandHandlerRef_tDefinition: le_atServer_interface.h:376Definition: le_atServer_interface.h:349le_atServer_CmdRef_t le_atServer_Create(const char *name)le_result_t le_atServer_TryConnectService(void)void le_atServer_RemoveCommandHandler(le_atServer_CommandHandlerRef_t handlerRef)le_result_t le_atServer_GetDevice(le_atServer_CmdRef_t commandRef, le_atServer_DeviceRef_t *deviceRefPtr)le_result_t le_atServer_Suspend(le_atServer_DeviceRef_t device)struct le_atServer_Cmd * le_atServer_CmdRef_tDefinition: le_atServer_interface.h:300le_result_t le_atServer_SendFinalResponse(le_atServer_CmdRef_t commandRef, le_atServer_FinalRsp_t finalResponse, bool customStringAvailable, const char *finalRsp)le_result_t le_atServer_Resume(le_atServer_DeviceRef_t device)struct le_atServer_Bridge * le_atServer_BridgeRef_tDefinition: le_atServer_interface.h:316Read AT command (e.g. 'AT+CMD?')Definition: le_atServer_interface.h:333