Home
ADL User Guide for Open AT® OS v3.13
Contents
1. M WW OW CQO AN scontidential Page 123 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 16 10 The adl adDelete function This function deletes the A amp D provided cell The used space and the ID will be available on the next re compaction process e Prototype s32 adl adDelete s32 CellHandle e Parameters CellHandle A amp D cell handle returned by the adl adSubscribe function e Returned values o OKon success o ADL RET ERR UNKNOWN HDL if the handle was not subscribed Note calling adl adDelete will unsubscribe the allocated handle 3 16 11 The adl adinstall function This function installs the content of the requested cell if it is a DWL file This file should be an Open AT application an EEPROM configuration file an XModem downloader binary file or a Wavecom OS binary file WARNING This API resets the product on success e Prototype s32 adl adInstall u32 Handle e Parameters Handle A amp D cell handle returned by the adl adSubscribe function e Returned values o Product resets on success The parameter of the adl main function is then set to ADL INIT DOWNLOAD SUCCESS Or ADL INIT DOWNLOAD ERROR according to DWL file update success or not Before the product
2. e Parameters BusAddress Type and address of the bus to subscribe to using the following defined values by performing a logical OR between type and address e 666 W vVvecCoOM scontidential Page 70 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API Possible type values Possible address values SPI bus ADL BUS TYPE SPI ADL BUS SPI ADDR CS SPI EN use SPI EN pin as Chip Select for Q24X6 Q2400 Q24 Classic Q24 Plus Q24 Extended and Q24 Auto products this setting is automatically mapped on GPO 3 used as Chip Select for P32X6 product this setting is automatically mapped on GPIO 8 used as Chip Select Not available for P5186 product ADL BUS SPI ADDR CS SPI AUX use SPI AUX pin as Chip Select for Q24X6 Q2400 P32X6 Q24 Classic Q24 Plus Q24 Extended and Q24 Auto products this setting is automatically mapped on GPO O used as Chip Select Not available for P5186 product Not available for Q31X8 product ADL BUS SPI ADDR CS GPIO a GPIO or GPO is used as Chip Select The used GPIO index is given by a logical OR with the index defined in IO service This IO must not be allocated by any application ADL BUS SPI ADDR CS NONE The Chip Select signal is not handled by the ADL BUS servi
3. o WW OW CO ANN scontidential Page 102 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM_ASW_OAT_UGD_00006 011 May 3 2007 wavecom m Make it wireless ADL User Guide for Open AT OS v3 13 API 3 13 6 The adl gprsActExt function This function activates a specific PDP context identified by its Cid e Prototype s8 adl gprsActExt u8 Cid adl port e Port e Parameters Cid The Cid of the PDP context to activate integer value between 1 and 4 Port Port on which to run the PDP context activation command When activation return events are received in the GPRS event handler if the application requires ADL to forward these events they will be forwarded to this Port parameter value e Returned values This function returns OK on success or a negative error value Possible error values are Error value Description ADL_RET_ERR_PARAM in case of parameters error bad Cid value or unavailable port ADL_RET_ERR_PIN_KO If the PIN is not entered or if the WIND 4 indication has not occurred yet ADL_GPRS_CID_NOT_DEFINED in case of problem to set up the Cid the CID is already activated ADL NO GPRS SERVICE f the GPHS service is not supported by the product ADL RET ERR BAD STATE The service is still processing another GPRS API application should wait for the cor
4. ERROR ADL STR CME ERROR CME ERROR ADL STR CMS ERROR CMS ERROR ADL STR CPIN X CPIN ADL STR LAST TERMINAL Terminal resp are before this line ADL STR RING ADL STR LAST TERMINAL RING ADL STR WIND WIND ADL STR CRING CRING ADL STR CPINC CPINC ADL STR WSTR 4H WSTR ADL STR CMEE CMEE ADL STR CREG CREG ADL STR CGREG CGREG ADL STR CRC t CRC ADL STR CGEREP CGEREP Last string ID ADL STR LAST adl strID e T WW OW CQO ANN scontidential Page 114 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 15 3 The adl strGetlID function This function returns the ID of the response string provided e Prototype adl strID e adl strGetID ascii rsp e Parameters rsp String to parse to get the ID e Returned values o ADL_STR_NO STRING if the string is unknown o Id of the string otherwise 3 15 4 The adl strGetIDExt function This function returns the ID of the response string provided with an optional argument and its type e Prototype adl_strID_e adl_strGetIDExt ascii rsp void arg u8 argtype e Parameters rsp String to parse to get the ID arg Parsed first argument not used if set to NULL argtype Type
5. 3 13 1 Required Header File The header file for the GPRS related functions is adl gprs h 3 13 2 The adl gprsSubscribe function This function subscribes to the GPRS service in order to receive GPRS related events e Prototype s8 adl gprsSubscribe adl gprsHdlr f GprsHandler e Parameters GprsHandler GPRS handler defined using the following type typedef s8 adl gprsHdlr f u16 Event u8 Cid The pairs events Cid received by this handler are defined below Event Call ID Description ADL GPRS EVENT RING GPRS If incoming PDP context activation is requested by the network ADL GPRS EVENT NV CONTEXT DEACT X If the network has forced the deactivation of the Cid X ADL GPRS EVENT ME CONTEXT DEACT X f the ME has forced the deactivation of the Cid X ADL GPRS EVENT NV DETACH If the network has forced the detachment of the ME ADL GPRS EVENT ME DETACH If the ME has forced a network detachment or lost the network ADL GPRS EVENT NW CLASS B f the network has forced the ME on class B ADL GPRS EVENT NV CLASS CG If the network has forced the ME on class CG ADL GPRS EVENT NVW CLASS CC If the network has forced the ME on class CC ADL GPRS EVENT ME CLASS B If the ME has changed his class to class B I WW OW CQO ANN scontidential Page 98 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM
6. Only one analysis may be running at a time The adl errStartBacktraceAnalysis function will return the ADL RET ERR ALREADY SUBSCRIBED error code if it is called while an analysis is currently running 3 9 7 The adl errGetAnalysisState function This function may be used in order to know the current backtrace analysis process state e Prototype adl errAnalysisState e adl errGetAnalysisState void e Returned values Current backtrace analysis state which uses the type below typedef enum ADL ERR ANALYSIS STATE IDLE No running analysis ADL ERR ANALYSIS STATE RUNNING An analysis is running adl errAnalysisState e 3 9 8 The adl errRetrieveNextBacktrace function This function allows the application to retrieve the next backtrace buffer stored in the product memory The backtrace analysis may have been first started with the adl errStartBacktraceAnalysis function M WW OW CQO ANN scontidential Page 84 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API e Prototype s32 adl errRetrieveNextBacktrace u8 Handle u8 BacktraceBuffer ul6 Size e Parameters Handle Backtrace analysis handle returned by the adl errStartBacktraceAnalysis function BacktraceBuffer Buffer i
7. 1664 Kbytes of RAM 128 Kbytes of Flash Object Data 768 Kbytes of Application amp Data Storage Volume configurable see AT WOPEN command The total available flash space for both Open AT application place and A amp D storage place is 1536 Kbytes This space is shared between the two places The maximum A amp D storage place size is 1280 Kbytes 1 2 Mbytes usable for Wavecom Core Software upgrade capability the Open AT application maximum size in this case will be 256 Kbytes The minimum A amp D storage place size is O Kbytes usable for applications with huge hard coded data the Open AT application maximum size will in this case be 1 5 Mbytes Warning Any A amp D size change will lead to this area format process some seconds on start up all A amp D cells data will be erased 2 9 Defined compilation flags The Open AT R IDE defines some compilation flags related to the chosen generation environment Please refer to the Tools Manual for more information a Er T W vVvecCoOM scontidential Page 17 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM_ASW_OAT_UGD_00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 Description 2 10Inner AT commands configuration For its internal processes the ADL library needs to set up some AT command configurations that differ from th
8. WoaVvecon Make it wireless Operating Systems Integrated Development Environments Plug Ins Wireless CPUs Services wavecom Make it wireless s ADL User Guide for Open AT OS v3 13 Reference WM ASW OAT UGD OOO06 Date May 3 2007 Revision O11 o M WoaVvVeCOM Confidential Page 1 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 Document History Index Date Versions 001 06 01 03 Created 002 04 06 03 Updates for Open AT 2 10 003 29 01 04 Updates for Open AT 2 10a Q2400 module integration 004 21 10 04 Updates for Open AT 3 0 O05 11 01 05 Updates for Open AT 3 01 006 30 May2005 Updates for Open AT 3 02 007 13 06 05 Updates for Open AT 3 10 008 October 2006 Updates for Open AT 3 12 009g November 6 2006 Update 010 February 23 2007 Update 011 May 3 2007 Small Updates wWovecoac Confidential Page 2 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 Trademarks WAVECOM Wireless CPU Wireless Microprocess
9. e Note2 Commands sent through the adl atCmadCreate function are directly submitted to the Wavecom Core Software AT interface they cannot be filtered by an adl atCmdSubscribe mechanism The adl atCmdSubscribe function filters only the commands coming from external module ports e Note 3 This function can be used to send Text Mode commands such as AT CMGW etc in order to provide the text related to this command the adl_atCmdSendText function has then to be used as soon as the prompt gt response is received in the response handler Any further calls to adl atCmdCreate on this port will just store the required command in order to send these as soon as the running Text Mode command has ended o WW OW CQO ANN scontidential Page 32 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API e Example In the following example we spy the ATD command by sending the AT CLCC command every time a subscribed intermediate response or response is received by the ADL parser atd responses callback function s16 ATD Response Handler adl atResponse t paras None of the response of the attclcc command is subscribed but because the 2 argument is set to TRUE all will b
10. e Returned values o OK on success o ADL_RET_ERR_PARAM on parameter error o ADL AD RET REACHED END no more elements to enumerate WoaVeCOM econfidential Page 129 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 16 18 Example This example demonstrates how to use the A amp D service in a nominal case error cases not handled Complete examples using the A amp D service are also available on the SDK DTL Application Download sample generic Download library sample Global variables amp constants Cell amp event handles s32 MyADCellHandle s32 MyADEventHandle Info amp state structure adl adInfo t Info adl adState t State A amp D event handler void MyADEventHandler adl adEvent e Event u32 Progress Check event switch Event case ADL AD EVENT RECOMPACT DONE case ADL AD EVENT FORMAT DONE The process is over TRACE 1 Format Recompact process over break Somewhere in the application code used as an event handler void MyFunction void fi ocal variables u8 DataBuffer 10 Get state adl adGetState amp State Subscribe to the A amp D event service MyADEventHandle adl adEventSubscrib
11. ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API e Reminder The Open AT RAM is divided in three areas Call stack Heap memory amp Global variables This function allows to know the several area sizes StackSize Call stack Heap i Beef TotalSize HeapSize GlobalSize Global variables Figure 2 Open AT RAM mapping with adl_memInfo_t structure fields names e Returned values o OK on success the Info parameter is also updated with the Open AT RAM information o ADL_RET_ERR_PARAM on parameter error 3 3 4 The adl memGet function This function allocates the memory for the requested size into the client application RAM memory e Prototype void adl memGet ul16 size e Parameters size The memory buffer requested size in bytes e Returned values A pointer to the allocated memory buffer on success If the memory allocation fails this function will lead to a ADL_ERR_MEM GET error which can be handled by the Management Service If this error is filtered and refused by the error handler the function will return NULL Please refer to the 3 9 Management service for more information VW OW CO ANN scontidential Page 41 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 20
12. OS v3 13 API Position Current GPS position data please refer to GPS service data structures in 8 3 17 2 Speed Current GPS speed data please refer to GPS service data structures in 8 3 17 2 SatView Current GPS satellite vievv data please refer to GPS service data structures in 8 3 17 2 PollingTime Time interval in seconds betvveen each GPS data polling event ADL GPS EVENT POLLING DATA reception by the GPS handler e Returned values o This function returns a positive or null handle on success o ADL_RET_ERR_PARAM on parameter error o ADL RET ERR NO MORE HANDLES if there are no more free handles o ADL GPS RET ERR NO Q25 PRODUCT if the current product is not a Q2501 product 3 17 4 The adl gpsUnsubscribe function This function un subscribes from the GPS service The corresponding GPS handler will no longer receive any GPS events e Prototype s8 adl gpsUnsubscribe u8 Handle e Parameters Handle The handle returned by the adl gpsSubscribe function e Returned values o This function returns O on success ADL_RET_ERR_NOT_SUBSCRIBED if the GPS service was not subscribed ADL_RET_ERR_UNKNOWN_HDL if the handle provided is not a valid one ADL RET ERR BAD STATE if the service is in INIT state OOo 0 WW OW CQO ANN scontidential Page 135 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior
13. The callback function is defined as follow typedef bool adl atUnSoHandler t adl atUnsolicited t The argument of the callback function will be a adl atUnsolicited t structure holding the unsolicited response we subscribed to The adl atUnsolicited t structure defined as follow it is declared in the adl at h header file typedef struct adl_strID_e RspID Standard response ID adl_atPort_e Dest Unsolicited response destination port ul6 StrLength the length of the string name of the unsolicited response ascii StrData 1 a pointer to the string name of the unsolicited response adi atUnsolicited t The RspID field is the parsed standard response ID if the received response is a standard response Refer to 83 15 for more information The Dest field is the unsolicited response original destination port If it is set to ADL PORT NONE unsolicited response is required to be broadcasted on all ports The return value of the callback function will have to be TRUE if the unsolicited string is to be sent to the external application on the port indicated by the Dest field if not set to ADL PORT NONE otherwise on all ports and FALSE otherwise Note that in the case of several handlers associated to the same unsolicited response all of them have to return TRUE for the unsolicited response to be sent to the external application e Returned values OK on success ERROR if an error occurred
14. WLDB command or a CSD GPRS data session is already running 3 6 3 The adl fcmSubscribe function This function subscribes to the FCM service opening the requested port and setting the control and data handlers The subscription will be effective only when the control event handler has received the ADL FCM EVENT FLOW OPENNED event Each port may be subscribed only one time Additional subscriptions may be performed using the ADL FCM FLOW SLAVE flag see below Slave subscribed handles will be able to send amp receive data on from the flow but will knovv some limitations e For serial line flows UART physical amp logical based ports only the main handle will be able to switch the Serial Link state betvveen AT amp Data mode e f the main handle unsubscribes from the flow all slave handles will also be unsubscribed Important note For serial link related flows UART physical amp logical based ports the corresponding port has to be opened first with the AT WMFM command for physical ports or with the 27 010 protocol driver on the external application side for logical ports otherwise the subscription will fail See the AT Commands Interface guide for more information By default only the UART1 physical port is opened WW oOWV eCQO ANN scontidential Page 54 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged withou
15. e Returned values o OKon success o ADL RET ERR UNKNOVWN HDL if the provided handle is unknown o For other negative errors please refer to the BUS API chapter of the Open AT Basic Development Guide e WW OW CQO ANN scontidential Page 76 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wevecom p Make it wireless ADL User Guide for Open AT OS v3 13 API 3 8 4 The adl busRead function This function reads data from a previously subscribed bus type e Prototype s8 adl busRead u8 Handle adl busAccess t pAccessMode u32 DataLen void Data e Parameters Handle Handle previously returned by adl busSubscribe function pAccessMode Bus access mode defined according to the following type typedef struct u32 Address u32 Opcode u8 OpcodeLength u8 AddressLength u8 AccessSize reserved for future products adl_busAccess t This parameter is processed differently according to bus type e For SPI bus For Q24X3 and P32X3 products one byte can be sent through the Opcode parameter only the LSByte is used if OpcodeLength is less than 8 bits only the MSBits of the LSByte are used two bytes can be sent through the Address parameter only the two LSBytes are used if OpcodeLength is less than 24 bits only the MSBits
16. has failed no S M card inserted ADL CALL EVENT SETUP ERROR PIN A ca setup from embedded or MO NOT READY O external application has failed the PIN code is not entered ADL CALL EVENT SETUP ERROR A call setup from embedded or MO Error external application has failed the Error field is the returned CME ERROR value cf AT Commands interface guide for more information The events returned by this handler are defined below Event Description ADL CALL FORWARD the call event shall be sent to the external application On unsolicited events these will be forwarded to all opened ports On responses events these will be forwarded only on the port on which the request was executed ADL CALL NO FORWARD the call event shall not be sent to the external application M WW OW CON scontidential Page 94 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API Event Description ADL CALL NO FORWARD ATH the call event shall not be sent to the external application and the application shall terminate the call by sending an ATH command ADL CALL NO FORWARD ATA the call event shall not be sent to the external application and the application shall answer the call by sending an AT
17. paras gt Port buffer adl_atSendResponsePort ADL AT RSP paras Port r nOK r n main function void adl main adl InitType e adlInitType Subscribe to the attabc command in all modes and accepting 1 parameter adl atCmdSubscribe attabc adl atCmdHandler t atabc Handler ADL CMD TYPE TEST ADL CMD TYPE READ ADL CMD TYPE ACT ADL CMD TYPE PARA 0x0011 3 1 5 Run AT commands 3 1 5 1 The adl atCmdCreate function This function sends a command on the required port and allows the subscription to several responses and intermediate responses with one associated callback function so that when any of the responses or intermediates responses we subscribe to is received by the ADL parser the callback function will be executed e VVoOWVOCOAMA sccontidential Page 29 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API e Prototype s8 adl atCmdCreate ascii Cmdstr ul6 Rspflag adl atRspHandler t Rsphdl NULL e Parameters Cmdstr The string name of the command we want to send If the string does not end with the CR character r in C language it will be added by ADL In case of text mode commands as CMGW for example the text end character has to be th
18. to read the Open AT Basic Development Guide and specifically the Introduction chapter 1 and the Description chapter 2 to have a better overview of what Open AT is about The ADL library and the standard embedded Open AT API layer must not be used in the same application code As ADL APIs will encapsulate commands and trap responses applications may enter error mode if synchronization is no longer guaranteed 1 2 References l Open AT Basic Development Guide for Open AT OS v3 13 ref WM_ASW_OAT_UGD 0OO2 revision 15 1 3 Glossary Application Mandatory API Mandatory software interfaces to be used by the Embedded Application AT commands Set of standard modem commands AT function Software that processes the AT commands and AT subscriptions Embedded API layer Software developed by Wavecom containing the Open AT APIs Application Mandatory API AT Command Embedded API OS API Standard API FCM API IO API and BUS API Embedded Application User application sources to be compiled and run on a Wavecom product Embedded Core software Software that includes the Embedded Application and the Wavecom library Embedded software User application binary set of Embedded Application sources Wavecom library External Application Application external to the Wavecom product that sends AT commands through the serial link IDE Integrated Development Environment Target Open AT compatible product supporting an Embedded A
19. ADL PORT OPEN AT VIRTUAL BASE port cf adl gprsSetupExt description for more information Please note that events generated by the adl gprsSetup will not be able to be forvvarded to any external port since the setup command was running on the Open AT port 3 13 4 The adl gprsSetupExt function This function sets up a PDP context identified by its CID vvith some specific parameters e Prototype s8 adl gprsSetupExt u8 Cid adl gprsSetupParams t Params adl port e Port e Parameters Cid The Cid of the PDP context to set up integer value between 1 and 4 Params Structure containing the parameters to set up using the following type typedef struct ascii APN ascii Login ascii Password ascii FixedIP bool HeaderCompression bool DataCompression adl gprsSetupParams t o APN Address of the Provider GPRS Gateway GGSN maximum 100 bytes string o Login GPRS account login maximum 50 bytes string t WW OW CO ANN scontidential Page 101 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API o Password GPRS account password maximum 50 bytes string o Fixed IP Optional fixed IP address of the MS used only if not set to NULL maximum 15 bytes
20. ADL User Guide for Open AT OS v3 13 API 3 6 4 The adl fcmUnsubscribe function This function unsubscribes from a previously subscribed FCM service closing the previously opened flows The unsubscription will be effective only when the control event handler has received the ADL FCM EVENT FLOVV CLOSED event If slave handles were subscribed as soon as the master unsubscribes from the flow all the slaves will also be unsubscribed e Prototype s8 adl fcmUnsubscribe u8 Handle e Parameters Handle Handle returned by the adl fcmSubscribe function e Returned values o OKon success The Control handler will also receive a ADL FCM EVENT FLOVV CLOSED event when flow is ready to process o ADL RET ERR UNKNOWN HDL if the handle is incorrect ADL RET ERR NOT SUBSCRIBED if the flow is already unsubscribed o ADL RET ERR BAD STATE if the serial link is not in AT mode O 3 6 5 The adl_fcmReleaseCredits function This function releases some credits for requested flow handle The slave subscribers should not use this API e Prototype s8 adl fcmReleaseCredits u8 Handle u8 NbCredits e Parameters Handle Handle returned by the adl fcmSubscribe function NbCredits Number of credits to release for this flow If this number is greater than the number of previously received data blocks all credits are released If an application wants to release all received credits at any time it should call the adl fcmReleaseCredit
21. ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API Event Call ID Description ADL GPRS EVENT ME CLASS CG If the ME has changed his class to class CG ADL GPRS EVENT ME CLASS CC If the ME has changed his class to class CC ADL GPRS EVENT NO CARRIER If the activation of the external application with ATD 99 PPP dialing did hang up ADL GPRS EVENT DEACTIVATE OK X f the deactivation requested with ad gprsDeact function did succeed on the Cid X ADL GPRS EVENT DEACTIVATE OK FROM EXT X If the deactivation requested by the external application succeed on the Cid X ADL GPRS EVENT ANSWER OK If the acceptance of the incoming PDP activation with adl gprsAct did succeed ADL GPRS EVENT ANSWER OK FROM EXT If the acceptance of the incoming PDP activation by the external application did succeed ADL GPRS EVENT ACTIVATE OK X f the activation requested with ad gprsAct on the Cid X did succeed ADL GPRS EVENT GPRS DIAL OK FROM EXT x f the activation requested by the external application with ATD 99 PPP dialing did succeed on the Cid X ADL GPRS EVENT ACTIVATE OK FROM EXT x f the activation requested by the external application on the Cid X did succeed ADL GPRS EVENT HANGUP OK FROM EXT If the rejection of the incoming PDP activation by the external application did succee
22. Cmdhdl ul6 Options e Parameters Cmdstr The string name of the command we want to subscribe to Since this service only handles AT commands this string has to begin with the AT characters Cmdhdadl The handler of the callback function associated to the command M WW OW CQO ANN Confidential Page 25 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API The callback function is defined as follows typedef void adl atCmdHandler t adl atCmdPreParser t The argument of the callback function will be an adl atCmdPreParser t structure holding the command we subscribed to The adl atCmdPreParser t structure is defined as follow it is declared in the adl at h header file typedef struct ul6 Type Incoming Command Type u8 NbPara Parameters number adl atPort e Port Source port wm lst t ParaList Parameters list ul6 StrLength Command string length ascii StrData 1 Command string adi atCmdPreParser t This structure members are defined below o Type Incoming command type will be one of the required ones at subscription time detected by the ADL pre processing o NbPara Non NULL parameters number if Type is ADL CMD TYPE PARA or O with other type values o Port
23. GPIO 5 For Wismo Quik Q24 CLASSIC products ADL IO Q24CLASSIC GPI ADL IO Q24CLASSIC GPO O ADL IO O24CLASSIC GPO 1 ADL IO O24CLASSIC GPO 2 ADL IO QO24CLASSIC GPO 3 ADL IO QO24CLASSIC GPIO O ADL IO QO24CLASSIC GPIO 4 ADL IO QO24CLASSIC GPIO 5 For Wismo Quik Q24 PLUS products ADL IO Q24PLUS GPI ADL IO Q24PLUS GPO O ADL IO Q24PLUS GPO 1 ADL IO Q24PLUS GPO 2 ADL IO Q24PLUS GPO 3 ADL IO Q24PLUS GPIO O ADL IO Q24PLUS GPIO 4 ADL IO Q24PLUS GPIO 5 For Wismo Quik Q24 AUTO products ADL IO Q24AUTO GPI ADL IO Q24AUTO GPO O ADL IO Q24AUTO GPO 1 ADL IO Q24AUTO GPO 2 ADL IO Q24AUTO GPO 3 ADL IO Q24AUTO GPIO O ADL IO Q24AUTO GPIO 4 ADL IO Q24AUTO GPIO 5 c J W veCoOM scontidential Page 65 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM_ASW_OAT_UGD_00006 011 May 3 2007 wavecom a Make it wireless ADL User Guide for Open AT OS v3 13 API For Wismo Quik Q24 EXTENDED products ADL IO Q24EXTENDED GPI ADL IO O24bEXTENDED GPO O ADL IO QO24bEXTENDED GPO 1 ADL IO O24EXTENDED GPO 2 ADL IO QO24EXTENDED GPO 3 ADL IO O24EXTENDED GPIO O ADL IO O24EXTENDED GPIO 4 ADL IO O24bEXTENDED GPIO 5 GpioDir Mask of GPIO directions to subscribe For each allocated GPIO the corresponding bit in the mask should be set to one of the following values o 1 input o O output The GpioMask consta
24. HCNF command documentation the GPIO 3 is locked on start up and is not available for Open AT applications 2 7 SIM Level Shifter and GPO shared resources If any other feature than SIM3VONLY is enabled please refer to the AT WFM command documentation a GPO according to the table below depending on the module is locked for the SIM level shifter and cannot be subscribed by the Open AT application Wavecom Wireless CPU series Unavailable GPO Q24X6 GPOO Q24X0 GPOO Q25X1 GPO1 Q24 CLASSIC GPOO Q24 PLUS GPOO Q24 AUTO GPOO Q24 EXTENDED GPOO 2 8 Open AT Memory resources The available memory resources for the Open AT applications depends on the product memory size For products with 32 Mbit flash size and 4Mbit RAM size 768 Kbytes of ROM application code configurable see AT VW OPEN command 128 Kbytes of RAM 128 Kbytes of Flash Object Data 768 Kbytes of Application amp Data Storage Volume configurable see AT4 VVOPEN command WW OW CO ANN scontidential Page 16 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 Description For products with 32 Mbit flash size and 16Mbit RAM size 768 Kbytes of ROM application code configurable see AT VW OPEN command
25. LEER FE REE seers 19 2 11 2 AT WOPEN Command ssssssssssssssssse ese essem seme she sse res nnne nns 19 3 Dig ee E 20 3 1 Commands ssssssesssesseessseee senses e esses ases ss asse A annes 20 3 1 1 nequired Header File iscexu e eet Ri RR RE RERARERAREMEMBRRRENiRREARENUN EREREDUMEEEP EMEN RUNE 20 3 1 2 Unsolicited Responses erobrec rk Ree EEUU e RUPEE T FERAM RERUM DEDERE 20 3 1 3 HOSpOFISOS soe RR VARRRRERRMARRENR RAERRNSARA ARES ERRAERR ARRA RRSSARRAYREWRRRRERRRR RERRRERRRG Ka ened 22 3 1 4 Incoming AT commands csssssssssssssssssssssss sss sess e nhe heme heme hne 25 3 1 5 Run AT command Soss pesn meadi Ix ex eR EC E XA RR RI M ERROR UX E Ra Kuga e pa RM EX Ra Rad n d 29 3 2 TibrerS sicui i ER XU RRREXERNRRORRNRRENGRERFURENSRRNRRERGRRKAGRRARRNAEKRGSENARERERER ROKRSREFRERADRKRRNNARERSEENAR 36 3 2 1 Required Header Files 2 ccc cece cece ee eee eee eee ene she essem ehem she nnne 36 3 2 2 The adl tmrSubscribe fUNCtION cece cece na ee ee ee meme meme 36 3 2 3 The adl tmrUnSubscribe function cee Inm 37 3 2 4 EXAM OS evict oe hire ccna T A A du E AU NE EE M RENE E mE Ee RR TAT 38 3 3 Memory Service ode r ca eo ese ee Dia Eod ed e E St Een ee AR ARS AA 39 3 3 1 Required Header File ccc cece cece eee eee sse esee ensem hne 39 M NI WW OW CQO ANN scontidential Page 5 154 This document is the sole and exclusive pro
26. Parameters Handler Handler used with adl safeSubscribe function e Returned values o OKon success ADL RET ERR PARAMI if the parameter has an incorrect value ADL RET ERR UNKNOWN HDL if the provided handler is unknown ADL RET ERR NOT SUBSCRIBED if the service is not subscribed O O 0 N W vVvecCoOM scontidential Page 112 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM_ASW_OAT_UGD_00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 14 4 The adl safeHunCommand function This function allows to run VVDWL or WOPEN command with any standard syntax and to get its answers e Prototype s8 adl safeRunCommand adi safeCmdType e CmdType adl atRspHandler t RspHandler e Parameters CmdType Command type to run please refer to adl safeSubscribe description ADL SAFE CMD VWDWL OTHER and ADL SAFE CMD WOPEN OTHER values are not allowed The ADL SAFE CMD VVOPEN SUSPEND APP may be used to suspend the Open AT application task The execution may be resumed using the AT WOPENRES command or by sending a signal on the hardware Interrupt product pin The INTERRUPT feature has to be enabled on the product please refer to the AT WFM command Open AT application running in Remote Task Environment cannot be suspended the function has no effect Please note that the current Open AT
27. STATE INSERTED SIM inserted PIN state not known yet ADL SIM STATE FULL INIT SIM Full Init done ADL SIM STATE PIN ERROR SIM error state ADL SIM STATE PIN OK PIN code OK waiting for full init ADL SIM STATE PIN WAIT SIM inserted PIN code not entered yet Always last State ADL SIM STATE LAST adi simState e WW OW CQO ANN scontidential Page 87 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wevecom pue Make it wireless ADL User Guide for Open AT OS v3 13 API 3 11 SMS Service ADL provides this service to handle SMS events and to send SMS to the network 3 11 1 Required Header File The header file for the SMS related functions is adl sms h 3 11 2 The adl smsSubscribe function This function subscribes to the SMS service in order to receive SMSs from the network e Prototype s8 adl smsSubscribe adl smsHdlr f SmsHandler adl smsCtrlHdlr f SmsCtrlHandler u8 Mode e Parameters SmsHandler SMS handler defined using the following type typedef bool adl_smsHdlr_f ascii SmsTel ascii SmsTimeLength ascii SmsText This handler is called each time a SMS is received from the network SmsTel contains the originating telephone number of the SMS in text mode or NULL in PDU mode SmsTimeLength contains the SMS time stamp in
28. UGD 00006 011 May 3 2007 wevecom pou Make it wireless ADL User Guide for Open AT OS v3 13 API 3 5 4 The adl flhExist function This function checks if a flash object exists from the given Handle at the given ID in the flash memory allocated to the ADL developer e Prototype s32 adl flhExist ascii Handle ul6 ID e Parameters Handle The Handle of the subscribed set of objects ID The ID of the flash object to investigate in the range allocated to the Handle provided e Returned values o the requested Flash object length on success o O ifthe object does not exist o ADL RET ERR UNKNOWN HDL if handle is not subscribed o ADL FLH RET ERR ID OUT OF RANGE if ID is out of handle range 3 5 5 The adl flhErase function This function erases the flash object from the given Handle at the given ID e Prototype s8 adl flhErase ascii Handle ul16 ID e Parameters Handle The Handle of the subscribed set of objects ID The ID of the flash object to be erased Important note If ID is set to ADL FLH ALL IDS all flash objects related to the handle provided will be erased e Returned values o OK on success o ADL RET ERR UNKNOWN HDL if handle is not subscribed o ADL FLH RET ERR ID OUT OF RANGE if ID is out of handle range o ADL FLH RET ERR OBJ NOT EXIST if the object does not exist o ADL RET ERR FATAL if a fatal error occurred ADL ERR FLH DELETE error event will then be generated wavecon Confide
29. activation OK CID Un subscribe from GPRS event handler adl gprsUnsubscribe MyGprsEventHandler break Forward event return ADL GPRS FORWARD e R VVoOWVOCOAMA eccontidential Page 108 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API MM oO WoaVeCOM cconfidential Page 109 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM_ASW_OAT_UGD_00006 011 May 3 2007 wavecom a Make it wireless ADL User Guide for Open AT OS v3 13 API 3 14 Application Safe Mode Service By default the VVOPEN and WDWL commands cannot be filtered by any embedded application This service allows one application to get these command events in order to prevent any external application stopping or erasing the current embedded one 3 14 1 Required Header File The header file for the Application safe mode service is adl_safe h 3 14 2 The adl safeSubscribe function This function subscribes to the Application safe mode service in order to receive WOPEN and WDWL command events e Prototype s8 adl safeSubscribe ul6 WDWLopt ul6 WOPENopt adl safeHdlr f SafeHandler e Parameters WDWLopt Additionnal options fo
30. adl errUnsubscribe e Parameters Handler adl errHdlr f Handler Handler returned by adl errSubscribe function MM M Wave COMP Confidential Page 82 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom a Make it wireless ADL User Guide for Open AT OS v3 13 API e Returned values OK on success ADL_RET_ERR_PARAM if the parameter has an incorrect value ADL_RET_ERR_UNKNOWN_HDL if the handler provided is unknown ADL_RET_ERR_NOT_SUBSCRIBED if the service is not subscribed O O O 3 9 4 The adl errHalt function This function causes an error defined by its ID and string If an error handler is defined it will be called otherwise a product reset will occur e Prototype e void adl errHalt ul6 ErrorID const ascii ErrorString Parameters ErrorlID Error ID ErrorString Error string to be provided to the error handler and to be stored in the resulting backtrace if a fatal error is required Please note that only the string address is stored in the backtrace so this parameter must not be a pointer on a RAM buffer but a constant string pointer Moreover the string will only be correctly displayed if the current application is still present in the module s flash memory If the application is erased or modified
31. amp D API functions calls o A negative error value e ADL RET ERR ALREADY SUBSCRIBED if the cell is already subscribed e ADL AD RET ERR OVERFLOW if there is not enough allocated space e ADL AD RET ERR NOT AVAILABLE if there is no A amp D space available on the product e ADL RET ERR PARAM if the Cellld parameter is OxFFFFFFFF this value should not be used as an A amp D Cell ID e ADL RET ERR BAD STATE when subscribing an undefined size cell if another undefined size cell is already subscribed and not finalized 3 16 3 The adl adUnsubscribe function This function unsubscribes from the given A amp D cell handle e Prototype s32 adl_adUnsubscribe s32 CellHandle e Parameters CellHandle A amp D cell handle returned by adi adSubscribe function e Returned values o OKon success o ADL RET ERR UNKNOWN HDL if the handle was not subscribed WW OW CQO ANN scontidential Page 119 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wevecom p Make it wireless ADL User Guide for Open AT OS v3 13 API 3 16 4 The adl adEventSubscribe function This function allows the application to provide ADL with an event handler to be notified with A amp D service related events e Prototype s32 adl adEventSubscribe adl adEventHdlr f Handler e Parameters Handler Call back function provid
32. architecture WoaVvVeCOM econfidential Page 13 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 Description 2 2 Minimum Embedded Application Code The minimum embedded application code requested for ADL is the following u32 wm apmCustomStack 256 The value 256 is an example const ul6 wm apmCustomStackSize sizeof wm apmCustomStack And the entry point to the ADL code is the main function adl main main function void adl main adl apmInitType e InitType The adl InitType e is described below typedef enum ADL INIT POWER ON Normal power on ADL INIT REBOOT FROM EXCEPTION Reboot after an embedded application exception ADL INIT DOWNLOAD SUCCESS Reboot after a successful install process cf adl adInstall API ADL INIT DOWNLOAD ERROR Reboot after an error in install process cf adl adInstall API adl InitType e wm apmCustomStack and wm apmCustomStackSize are tvvo mandatory variables used to define the application call stack size see 5 Minimum Embedded Application Code and 8 Mandatory Functions of Open AT Basic Development Guide For more information about AT command size downloading memory limitation or security plea
33. events and to setup calls 3 12 1 Required Header File The header file for the call related functions is adl call h 3 12 2 The adl callSubscribe function This function subscribes to the call service in order to receive call related events e Prototype s8 adl callSubscribe adl callHdlr f CallHandler e Parameters CallHandler Call handler defined using the following type typedef s8 adl callHdlr f u16 Event u32 Call ID The pairs events call Id received by this handler are defined below each event is received according to an event type which can be o MO Mobile Originated call related event o MT Mobile Terminated call related event o CMD Incoming AT command related event Event Call ID Description Type ADL CALL EVENT RING VOICE O if voice phone call MT ADL CALL EVENT RING DATA 0O if data phone call MT ADL CALL EVENT NEW ID X If wind 5 X MO ADL CALL EVENT RELEASE ID X if wind 6 X on data call release X is MO a logical OR between the Call ID and MT the ADL CALL DATA FLAG constant ADL CALL EVENT ALERTING O if wind 2 MO ADL CALL EVENT NO CARRIER O phone call failure NO CARRIER MO MT ADL CALL EVENT NO ANSWER O phone call failure no answer MO ADL CALL EVENT BUSY O phone call failure busy MO i _ WW OW CQO ANN Confidential Page 92 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011
34. flhRead ascii Handle u16 ID u16 Len u8 ReadData e Parameters Handle The Handle of the subscribed set of objects ID The ID of the flash object to read WW OW CO ANN scontidential Page 49 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wevecom pe Make it wireless ADL User Guide for Open AT OS v3 13 API Len The length of the flash object to read ReadData The string allocated to store the read flash object e Returned values o OK on success ADL_RET_ERR_PARAM if one at least of the parameters has a bad value ADL RET ERR UNKNOVN HDL if handle is not subscribed ADL FLH RET ERR ID OUT OF RANGE if ID is out of handle range ADL FLH RET ERR OBJ NOT EXIST if the object does not exist ADL RET ERR FATAL if a fatal error occurred ADL ERR FLH READ error event will then occur 0000 0 3 5 8 The adl flhGetFreelViem function This function gets the current remaining flash memory size e Prototype u32 adl flhGetFreeMem void e Returned values Current free flash memory size in bytes 3 5 9 The adl flhGetiDCount function This function returns the ID count for the handle provided or the total remaining ID count e Prototype s32 adl flhGetIDCount ascii Handle e Parameters Handle The Handle of the subscribed set of objects If set to NULL the total
35. flow has no more credit to use On ADL FCM RET XXX WAIT RESUME returned value the subscriber has to wait for a ADL_ FCM_ EVENT_ RESUME event on Control Handler to continue sending data e 66666 WW OW CQO ANN 6confidential Page 60 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 6 8 The adl fcmSendDataExt function This function sends a data block on the requested flow This API do not perform any processing on the data block provided which is sent directly on the flow e Prototype s8 adl fcmSendDataExt u8 Handle adl_fcmDataBlock_t DataBlock e Parameters Handle Handle returned by the adl fcmSubscribe function DataBlock Data block buffer to write using the following type typedef struct ul6 Reserved1 4 u32 Reserved3 ul6 DataLength Data length ul6 Reserved2 5 u8 Data 1 Data to send adi fcmDataBlock t The block must be dynamically allocated and filled by the application before sending it to the function The allocation size has to be sizeof adl fcmDataBlock t DataLength where DataLength is the value to be set in the DataLength field of the structure Maximum data packet size depends on the subscribed flow o On serial link based flows 2000 bytes On GSM data
36. heus 95 3 12 4 The adl callSetupExt function sssssssssssssess m I mme emen 95 3 12 5 The adl callHangup function ssssssssssssssssssseesee eee menses sinn 96 3 12 6 The adl callHangupExt function ccc eee eee eee hehehe sns 96 3 12 7 The adl callAnswer f nction ice oe rk Re EE UR REX KE VE VER eeu RENE IE Rad 96 3 12 8 The adl callAnswerExt function eee reenter nme memet 96 3 12 9 The adl callUnsubscribe function esssssssse Imm 97 3 19 GPRS ServiCe iiis eite Re pex Re ERE RRe Ep a RR ER eb R e ex Ru Eye expe e Eae CH he dE X FR ERR CR Ra kyon 98 3 13 1 Required Header File sssssssssssssssssssssssssse sse ese s e emnes heme rene 98 3 13 2 The adl gprsSubscribe function cece eee eee eee 98 3 13 3 The adl gprsSetup function ccc eee eese seems 101 3 13 4 The adl gprsSetupExt function sessssssssssssssssssssssss senes 101 3 13 5 The adl gprsAct function sssssssssssssesssesseeesee ene mensem 102 3 13 6 The adl gprsActExt function cece eee ene esses nsns 103 3 13 7 The adl gprsDeact function sssssssssssssssssssesessee e sese senses nnns 104 3 13 8 The adl gprsDeactExt function ssssssssssssssessesee mene 104 3 13 9 The adl gprsGetCidlnformations function eese 105 3 13 10 The adl gprsUnsubscribe function cece eee eee eee eee teeta eae 106 3 13 11 The adl_gprslsAnIP
37. of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API e Parameters Port Port on which to run the call hang up command When hang up return events are received in the Call event handler if the application requires ADL to forward these events they will be forwarded to this Port parameter value e Returned values o OK on success o ADL_RET_ERR_PARAM on parameter error unavailable port 3 12 9 The adl callUnsubscribe function This function unsubscribes from the Call service The handler provided will no longer receive Call events e Prototype s8 adl callUnsubscribe adl callHdlr f Handler e Parameters Handler Handler used with adl callSubscribe function e Returned values o OKon success ADL RET ERR PARAM on parameter error ADL RET ERR UNKNOVWN HDL if the handler provided is unknown ADL RET ERR NOT SUBSCRIBED if the service is not subscribed O O 0 E E W vVvecCoOM scontidential Page 97 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM_ASW_OAT_UGD_00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 13 GPRS Service ADL provides this service to handle GPRS related events and to set up activate and deactivate PDP contexts
38. only the two LSBytes are used if OpcodeLength is less than 24 bits only the MSBits of the two LSBytes are used the OpcodeLength is the sum of Opcode and Address lengths in bits if OpcodeLength is O nothing is sent if OpcodeLength lt 9 just Opcode is sent if 8 lt OpcodeLength lt 25 Opcode then Address are sent the AddressLength parameter is not used For Q24X6 Q2400 P32X6 Q24 Classic Q24 Plus Q24 Extended and Q24 Auto products Up to 32 bits can be sent via the Opcode parameter according to the OpcodeLength parameter in bits if OpcodeLength is less than 32 bits only MSBits are used Up to 32 bits can be sent via the Address parameter according to the AddressLength parameter in bits if AddressLength is less than 32 bits only MSBits are used S WW OW CQO ANN scontidential Page 79 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless O gt amp 2 amp ADL User Guide for Open AT OS v3 13 API e For I2C Soft bus Not used this parameter should be NULL e For I2C hard bus Not used this parameter should be NULL e For Parallel bus Only the Address parameter is used This parameter is used to set the A2 pin value it can be set to following values WM BUS PARA ADDRESS A2 SET to set
39. remaining ID count will be returned e Returned values o ID count on success allocated on the handle provided if any or the total remaining ID count if the handle is set to NULL o ADL RET ERR UNKNOWN HDL if handle is not subscribed WW OW CO ANN scontidential Page 50 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 5 10 The adl flhGetUsedSize function This function returns the used size by the provided ID range from the handle provided The handle should also be set to NULL to get the whole used size Prototype s32 adl flhGetUsedSize ascii Handle ul16 StartID ul16 EndID Parameters Handle The Handle of the subscribed set of objects If set to NULL the whole flash memory used size will be returned StartlD First ID of the range from which to get the used size has to be lower than EndlD EndlD Last ID of the range from which to get the used size has to be greater than StartlD To get the used size by all a handle s IDs the O ADL_FLH_ALL_IDS range may be used Returned values o Used size on success from the Handle provided if any otherwise the whole flash memory used size o ADL_RET_ERR_PARAM on parameter error ADL RET ERR U
40. reset all subscribed event handlers if any will receive the ADL AD EVENT INSTALL event in order to let them perform the last operations o ADL INIT DOWNLOAD ERROR according to the DWL file update success or not o ADL RET ERR BAD STATE if the cell is not finalized o ADL RET ERR UNKNOWN HDL if the handle was not subscribed WW OW CQO ANN scontidential Page 124 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 16 12 The adi adHecompact function This function starts the re compaction process which will release the deleted cells spaces and IDs Warning if some A amp D cells are deleted if this recompaction process is not performed regularly these deleted cells used space will not be freed e Prototype s32 adl adRecompact s32 EventHandle e Parameters EventHandle Event handle previously returned by the adl_adEventSubscribe function The associated handler will receive the re compaction process events sequence e Returned values o OK on success Event handlers will receive the following event sequence e ADL AD EVENT RECOMPACT INIT just after the process is launched e ADL AD EVENT RECOMPACT PROGRESS several times indicating process progression e ADL AD EVENT RECOMPACT
41. sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API e Returned values o A positive or null GPIO handle on success o ADL RET ERR PARAMI if a parameter has an incorrect value o ADL RET ERR ALREADY SUBSCRIBED if a requested GPIO was not free o ADL RET ERR FATAL if a fatal error occurred a ADL ERR IO ALLOCATE error event will also be sent e Note Some product hardware related features UART2 external battery charging mechanism on Q2501 may lock some GPIOs which will not be available for allocation by the application please refer to the corresponding section for more information 3 7 3 The adl ioUnsubscribe function This function unsubscribes from a previously allocated GPIO handle e Prototype s8 adl_ioUnsubscribe u8 Handle e Parameters Handle Handle previously returned by a call to adl ioSubscribe function e Returned values o OKon success o ADL RET ERR UNKNOWN HDL if the provided handle is unknown o ADL RET ERR FATAL if a fatal error occurred a ADL ERR IO RELEASE error event will also be sent STS WW OW CQO ANN scontidential Page 67 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW O
42. that the deprecated ADL SIM EVENT ERRORH event has been removed since ADL version 3 This code was mentioned in the version 2 documentation but was never generated by the SIM service WW OW CQO ANN scontidential Page 86 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wevecom pu Make it wireless ADL User Guide for Open AT OS v3 13 API PinCode This is a string containing the PIN code text to enter If it is set to NULL or if the code provided is incorrect the PIN code will have to be entered by the external application This argument is used only the first time the service is subscribed It is ignored on all further subscriptions 3 10 3 The adl simUnsubscribe function This function unsubscribes from SIM service The handler provided will no longer receive SIM events e Prototype void adl simUnsubscribe adl simHdlr f Handler e Parameters Handler Handler used with adl SimSubscribe function 3 10 4 The adl simGetState function This function gets the current SIM service state e Prototype void adl simState e adl simGetState void e Returned values The returned value is the SIM service state based on following type typedef enum ADL SIM STATE INIT Service init state PIN state not known yet ADL SIM STATE REMOVED SIM removed ADL SIM
43. the embedded application but not from external applications while ADL is running If subscribed commands are concatenated command handlers will not be notified e Since ADL uses its own internal process of the WIND indications the current value of the AT WIND command may not be the same when the AT WOPEN command state is O or 1 2 5 UART 2 and GPIOs shared resources When the product s second UART is used started with the AT WMFM command or reserved for the GPS component in internal mode on a Q25X1 based product some of the GPIOs are no longer available for the embedded application The impacted GPIOs depend on product type as described below WAVECOM Wireless CPU series Unavailable GPIOs e GPIO O and GPIO 5 Q24X6 e GPO2 e GPI e GPIO O and GPIO 5 Q24X0 e GPO2 e GPI e GPIO O and GPIO 5 Q25X1 e GPO2 e GPI P32X6 e GPIO2 e GPI e GPIO 4 and GPIO 5 Q31X6 e GPO2 e GPI P51X6 e GPIO 5 e GPO O and GPO 1 RE N E T F W veCoOM oConfidential Page 15 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM_ASW_OAT_UGD_00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 Description 2 6 Q2501 product external battery charging mechanism GPIO shared resource On the Q2501 product if the external battery charging mechanism is implemented please refer to the AT VW
44. the string will not be correctly displayed when retrieving the backtraces 3 9 5 The adl errEraseAllBacktraces function Backtraces caused by the adl errHalt function ADL or the Wavecom Core Software are stored in the product s non volatile memory A limited number of backtraces may be stored in memory depending on each backtrace size and other internal parameters stored in the same storage place The adl errEraseAllBacktraces function allows this storage place to be freed and re initialized e Prototype void adl errEraseAllBacktraces void WW OW CQO ANN scontidential Page 83 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 9 6 The adl errStartBacktraceAnalysis function In order to retrieve backtraces from product memory a backtrace analysis process has to be started with the adi errStartBacktraceAnalysis function e Prototype s8 adl errStartBacktraceAnalysis void e Returned values o A positive or null handle on success This handle must be used in the next adl errRetrieveNextBacktrace function call It will be valid until this function returns a ADL RET ERR DONE code o ADL RET ERR ALREADY SUBSCRIBED if a backtrace analysis is already running o ERROR if an unexpected internal error occurred e Note
45. timestamp structure and timestamp structure to RTC time structure e Prototype s32 adl rtcConvertTime adl rtcTime t TimeStructure adl rtcTimeStamp t TimeStamp adl rtcConvert e Conversion e Parameters TimeStructure Input output RTC time structure TimeStamp Input output timestamp structure Conversion Conversion mode using the type below typedef enum t ADL RTC CONVERT TO TIMESTAMP ADL RTC CONVERT FROM TIMESTAMP adl rtcConvert e ADL RTC CONVERT TO TIMESTAMP This mode allovvs the TimeStructure parameter to be converted to a TimeStamp parameter Since RTC structure years are only available on two digits real years will be considered from 1970 to 2069 WW OW CQO ANN scontidential Page 148 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API ADL_RTC_CONVERT_FROM_TIMESTAMP This mode allows the TimeStamp parameter to be converted to a TimeStructure parameter Since RTC structure years are only available on two digits timestamps greater or equal to 2070 year will lead to a conversion error e Returned values oOo O 3 19 5 OK on success ERROR if conversion failed internal error ADL_RET_ERR_PARAM if one parameter value is incorrect ADL_RET_ERR_OVERFLOW if a From Timestamp c
46. valid one ADL_RET_ERR_BAD_STATE if the GPS service is out of IDLE state oo o H WW OW CQO ANN scontidential Page 137 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom a Make it wireless ADL User Guide for Open AT OS v3 13 API 3 18 AT FCM IO Ports Service ADL applications may use this service to be informed about the product AT FCM IO ports states 3 18 1 Required Header File The header file for the AT FCM IO Ports service is adl port h 3 18 2 AT FCM IO Ports AT Commands and FCM services can be used to send and receive AT Commands or data blocks to or from one of the product ports These ports are linked either to product physical serial ports as UART1 UART2 USB ports or virtual ports as Open AT virtual AT port GSM CSD call data port GPRS session data port or Bluetooth virtual ports AT FCM IO Ports are identified by the type below typedef enum t ADL PORT NONE ADL PORT UARTI1 ADL PORT UART2 ADL PORT USB ADL PORT UART1 VIRTUAL BASE 0x10 ADL_PORT_UART2_VIRTUAL_BASE 0x20 ADL_PORT_USB_VIRTUAL_BASE 0x30 ADL_PORT_BLUETOOTH_VIRTUAL_BASE 0x40 ADL_PORT_GSM_BASE 0x50 ADL_PORT_GPRS_BASE 0x60 ADL PORT OPEN AT VIRTUAL BASE 0x80 adl port e The available ports are described b
47. written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 17 5 The adl gpsGetState function This function returns the current GPS service state e Prototype adl gpsState e adl gpsGetState void e Returned values The current GPS service state based on following type typedef enum ADL GPS STATE INIT Service initialization state ADL GPS STATE NO Q25 Not a Q25 product ADL GPS STATE RESETING HARDWARE Trying to reset product after have set the GPS internal mode ADL GPS STATE EXT MODE Reset refused will be on internal mode on next product start up ADL GPS STATE IDLE GPS driver in IDLE mode ready to read data adl gpsState e 3 17 6 The adl gpsGetPosition function This function gets the current position read from the GPS device e Prototype s8 adl gpsGetPosition u8 Handle adl gpsPosition t Position e Parameters Handle The handle returned by the adl gpsSubscribe function Position Position data read from the GPS device Please refer to GPS service data structures in 8 3 17 2 e Returned values o This function returns OK on success o ADL RET ERR NOT SUBSCRIBED if the GPS service was not subscribed o ADL RET ERR UNKNOWN HDL if the handle provided is not a valid one o ADL RET ERR BAD STATE if the GPS service is out of IDLE state WW OW CQO ANN sc
48. 07 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 3 5 The adl memHelease function This function releases the allocated memory buffer designed by the supplied pointer e Prototype bool adl_memRelease void ptr e Parameters ptr A pointer on the allocated memory buffer e Returned values TRUE if the memory was correctly released In this case the pointer provided is set to NULL If the memory release fails this function will lead to a ADL_ERR_MEM RELEASE error which can be handled by the Management Service If this error is filtered and refused by the error handler the function will return FALSE Please refer to the 8 3 9 Management service for more information 3 3 1 Example Somewhere in the application code used as an event handler void MyFunction void Local variables adl memInfo t MemInfo u8 MyByteBuffer Gets Open AT RAM information adl memGetInfo amp MemInfo Allocates a 10 bytes memory buffer MyByteBuffer u8 adl memGet 10 Releases the previously allocated memory buffer adl memRelease MyByteBuffer WW OW CQO ANN scontidential Page 42 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 4 Deb
49. 1 January 1970 Second fractional part step is the ADL RTC SECOND FRACPART STEP constant This field s most significant bit is not used values are in the O Ox7FFF range WW OW CON scontidential Page 146 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wevecom pe Make it wireless ADL User Guide for Open AT OS v3 13 API 3 19 2 3 Constants RTC service constants are defined below Constant Value Use ADL pac ee 30 5 Second fractional part step vale TIUS in us The real value is 1 2 ADL RTC DAY SECONDS 24x60x60 Seconds count in a day ADL RTC HOUR SECONDS 60x60 Seconds count in an hour ADL RTC MINUTE SECONDS 60 Seconds count in a minute ADL RTC MS US 1000 useconds count in a millisecond 3 19 2 4 Macros RTC service macros are defined below Macro Parameter Use adl_rtcTimeStamp t Timestamp seconds part ADL RTC GET TIMESTAMP SECONDS t es ais structure 0 59 adl_rtcTimeStamp t Timestamp minutes part ADL RTC GET TIMESTAMP MINUTES t a E E structure 0 59 adl rtcTimeStamp t Timestamp hours part O ADL RTC GET TIMESTAMP HOURS t Cet eT m structure 23 adl rtcTimeStamp t ADL RTC GET TIMESTAMP DAYS t x E T structure Timestamp days part adl_rtcTimeStamp_t Timestamp milliseconds ADL
50. 2 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 weaevecom Make it wireless ADL User Guide for Open AT OS v3 13 Description 2 Description 2 1 Software Architecture The Application Development Layer software library based on the standard embedded Open AT API layer is included in the Wavecom library since Open AT release 2 00 as defined in section 2 1 1 Software Organization of the Basic Development Guide The aim of the ADL is to provide a high level interface to the Open AT software developer The ADL supplies the mandatory softvvare skeleton for an embedded application for instance the message parser see 2 2 Minimum Embedded Application Code of Open AT Basic Development Guide and some messages states machines for given complex services SIM service SIVIS service Thus the Open AT software developer can concentrate on the contents of his application He or she simply has to write the callback functions associated to each service he or she wants to use Therefore the software supplied by Wavecom contains the items listed below e ADL software library wmadl lib e A set of header files h defining the ADL API functions e Source code samples It relies on the follovving software architecture Embedded Application ADL Library Wavecom Library Figure 1 Software
51. 3 1 2 2 The adl atUnSoUnSubscribe function This function unsubscribes from an unsolicited response and its handler e Prototype s16 adl_atUnSoUnSubscribe ascii UnSostr adl atUnSoHandler t UnSohdl S WW OW CO ANN scontidential Page 21 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API e Parameters UnSostr The string of the unsolicited response we want to unsubscribe to UnSohdl The callback function associated to the unsolicited response e Returned values OK if the unsolicited response was found ERROR otherwise 3 1 2 3 Example callback function bool Wind4 Handler adl atUnsolicited t paras Unsubscribe to the 4WIND 4 unsolicited response adl atUnSoUnSubscribe 4WIND 4 adl atUnSoHandler t Wind4 Handler adl atSendResponse ADL AT RSP r nWe have received a Wind 4 r n We want this response to be sent to the external application so we return TRUE return TRUE main function void adl main adl InitType e adlInitType Subscribe to the 4WIND 4 unsolicited response adl atUnSoSubscribe 4WIND 4 adl atUnSoHandler t Wind4 Handler 3 1 3 Responses 3 1 3 1 The adl_atSendResponse function This function sends the provi
52. 4 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM_ASW_OAT_UGD_00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 3 Memory Service 3 3 1 Required Header File The header file for the memory functions is adl_memory h 3 3 2 The adl memGetType function DEPRECATED This function returns the current Wireless CPU memory type Note This function is deprecated and will always return the ADL MEM TYPE B value whatever is the Wireless CPU memory type e Prototype adl memType e adl memGetType void e Parameters None e Returned values The current Wireless CPU memory type defined by one of the adl_memType_e values below typedef enum ADL MEM TYPE A ADL MEM TYPE B adl memType e ADL MEM TYPE A A memory type Wireless CPU Please refer to the Open AT Memory Resources chapter for more information about this memory type available resource ADL MEM TYPE B B memory type Wireless CPU Please refer to the Open AT Memory Resources chapter for more information about this memory type available resource HJ WW OW CQO ANN scontidential Page 39 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Mak
53. 4810 Eastgate Mall Second Floor San Diego CA 92121 USA Tel 1 858 362 0101 Fax 1 858 558 5485 WAVECOM Asia Pacific Ltd Unit 201 207 2nd Floor Bio Informatics Centre No 2 Science Park West Avenue Hong Kong Science Park Shatin New Territories Hong Kong www wavecom com
54. 5 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wevecom pe Make it wireless ADL User Guide for Open AT OS v3 13 API 3 5 Flash 3 5 1 Required Header File The header file for the flash functions is adl flash h 3 5 2 Flash Objects IVlanagement An ADL application may subscribe to a set of objects identified by a handle used by all ADL flash functions This handle is chosen and given by the application at subscription time To access to a particular object the application gives the handle and the ID of the object to access At first subscription the Handle and the associated set of IDs are saved in flash The number of flash object IDs associated to a given handle may be only changed after have erased the flash objects with the AT WOPEN 3 command For a particular handle the flash objects ID take any value from O to the ID range upper limit provided on subscription Important note due to the internal storage implementation only up to 2000 object identifiers can exist at the same time 3 5 2 1 Flash objects write erase inner process overvievv Written flash objects are queued in the flash object storage place Each time the adl flh Write function is called the process below is performed e f the object already exists it is now considered as erased ie adl fln Write X lt g
55. A command e Returned values o OKon success o ADL RET ERR PARAM on parameter error 3 12 3 The adl callSetup function This function just runs the adl callSetupExt one on the ADL PORT OPEN AT VIRTUAL BASE port cf adl callSetupExt description for more information Please note that events generated by the ad1 callSetup will not be able to be forwarded to any external port since the setup command was running on the Open AT port 3 12 4 The adl callSetupExt function This function sets up a call to a specified phone number e Prototype s8 adl callSetupExt ascii PhoneNb u8 Mode adl port e Port e Parameters PhoneNb Phone number to use to set up the call Mode Mode used to set up the call ADL CALL MODE VOICE ADL CALL MODE DATA Port Port on which to run the call setup command When setup return events are received in the Call event handler if the application requires ADL to forward these events they will be forwarded to this Port parameter value S WW OW CQO ANN scontidential Page 95 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API e Returned values o OKon success o ADL RET ERR PARAM on parameter error bad value or unavailable port 3 12 5 The a
56. AM on parameter error o ADL RET ERR BAD STATE if the required port is not opened 3 18 8 The adl portStartSignalPolling function This function starts a polling process on a required port signal for the provided subscribed handle Only one polling process can run at a time A polling process is defined on one port for one or several of this port s signals It means that this function may be called several times on the same port in order to monitor several signals the polling time interval is set up by the first function call polling tme parameters are ignored or further calls If the function is called several times on the same port amp signal additional calls will be ignored Once a polling process is started on a port s signal this is monitored each time this signal state changes a ADL PORT EVENT XXX STATE CHANGE event is sent to all the handlers which have required a polling process on it Whatever the number of requested signals and subscribers to this port polling process a single cyclic timer will be internally used for this one e Prototype s8 adl portStartSignalPolling u8 Handle adl_port_e Port adl_portSignal_e Signal u8 PollingTimerType u32 PollingTimerValue e S pC WW OW CQO ANN 6confidential Page 143 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 we
57. AT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 7 4 The adl ioRead function This function reads all GPIOs from a previously allocated handle e Prototype s32 adl_ioRead u8 Handle e Parameters Handle Handle previously returned by a call to adl ioSubscribe function e Returned values The function returns the Gpio read values mask on success ADL RET ERR UNKNOWN HDL if the handle is unknown ADL RET ERR FATAL if a fatal error has occurred ADL RET ERR BAD STATE if there is nothing to read corresponding to the handle 3 7 5 The adl ioWrite function This function writes on one or more GPIOs from a previously allocated handle e Prototype s8 adl ioWrite u8 Handle u32 GpioMask u32 GpioValues e Parameters Handle Handle previously returned by a call to adl ioSubscribe function GpioMask Mask of GPIO to write GpioValues Mask of GPIO values to write e Returned values o OK on success o ADL RET ERR UNKNOWN HDL if the handle provided is unknown o ADL RET ERR PARAMI if one parameter has an incorrect value o ADL RET ERR FATAL if a fatal error occurred a ADL ERR IO WRITE error event will also be sent T WW OW CQO ANN scontidential Page 68 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL Use
58. Address fUNCtION cece cece eee eee eee eee e teeta eats 107 3 13 12 Example ariari sara a E ETRE ARX RARRRARKRANRMEERRARRIASRRRSNRARX PREX ERSERARERARERSEEA 108 3 14 Application Safe Mode Service sssssssssssssssesssesseeee mee enses sess 110 3 14 1 Required Header File 2 0 cc cece cece eee eee eee sse eese e semen enne 110 3 14 2 The adl safeSubscribe fuUNCtiONn cece eee m mme meme 110 3 14 3 The adl safeUnsubscribe function ssssssssssse Imm 112 3 14 4 The adl safeRunCommand fUNCTtION cence eee mme 113 3 15 AT Strings ServiCe iiio x vex Yoda ye EX sods vous sands KoUXEOEXNUEX eds NEEXEOEKNOEEFAENKAREEOEEEONEE 114 3 15 1 Required Header File sss ss eme she ensem emnes 114 3 15 2 The adl strlD e type tipi i AA ads 114 3 15 3 The adl strGetlD function eitis oe ete re e En ED E es dented NiNa e eO 115 3 15 4 The adl strGetlDExt function csssssssssessssse I Ime meme 115 wavecon Confidential Page 7 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 3 15 5 The adl strlsTerminalResponse function sesssssssssesssssseere 116 3 15 6 The adl strGetResponse function esesssssssssssssssssses seems nennen 116 3 15 7 The adl
59. CTION p 11 1 1 Important remarks cece ee eee eee hn ehh ne nnn hm ee ht n ren nsn 11 1 2 PRETEEN GCS eM P DELL 11 1 3 GIO SS AN MA PET 11 1 4 AAbbreviatiOns icu eit ecu oscuros ene er ae eee ee eee MOI en ae eee 12 2 DESCRIPTION teeth td inte a EE ven avs a Soda Ea Sa x CR E WExeR RARE PREX RIEXTUA 13 2 1 Software ArchiteCture ccccccc cece cece se ese ese ese ess es es ee es sensns 13 2 2 Minimum Embedded Application Code sssssssssssssssssssses sees nnns 14 2 3 Imported APIs from Open AT library lsssssssssssesesssese nsn sene sese nsns ee 15 2 4 ADL JIMIMAt ONS said eret eea sete e ru eoe ER eue dels buck rk anaE alise nes Nae ue DRE 15 2 5 UART 2 and GPIOs shared reSOUICES ce cece cece cence eee cnet cnet cnet eene nnns 15 2 6 Q2501 product external battery charging mechanism GPIO shared resource 16 2 7 SIM Level Shifter and GPO shared resources cece eee eee eee eee e eee eae eeeeenaeenaees 16 2 8 Open Al Memory resources i eee iD Iu eb eer vao GI Ioa pU DP fO EA p p VA DR RU d PXRIAE PNE E as 16 2 9 Defined compilation flags cece ec eee eee esee sh shes rese nnns 17 2 10 Inner AT commands CONFIQUIATION ccc eee eee eee eens eee eese sns nns 18 2 11 Open AT specific AT Command isin cccccsescaceccanieccsten cused ea ceasestcndaseedsadececdandenesedes 19 211 1 ATEWDWEL Command L5 rte EE RERO RED ENKON KAPEN AK RE LESE
60. DONE when the process is complete o ADL RET ERR BAD STATE if a re compaction or format process is currently running o ADL RET ERR UNKNOWN HDL if the handle is unknown ADL RET ERR NOT SUBSCRIBED if no A amp D event handler has been subscribed o ADL AD RET ERR NOT AVAILABLE if there is no A amp D space available on the O product e M WW OW CQO ANN scontidential Page 125 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 16 13 The adl adGetState function This function provides an information structure on the current A amp D volume state e Prototype s32 adl adGetState adl adState t State e Parameters State A amp D volume information structure based on following type typedef struct u32 freemem Space free memory size u32 deletedmem Deleted memory size u32 totalmem Total memory ul6 numobjects Number of allocated objects ul6 numdeleted Number of deleted objects u8 pad not used adi adState t e Returned values o OK on success o ADL_AD RET ERR NOT AVAILABLE if there is no A amp D space available on the product o ADL AD RET ERR NEED RECOMPACT if a power down or a reset occurred when a re compaction process was run
61. E CMD WOPEN AD GET SIZE AT WOPEN 6 command ADL SAFE CMD WOPEN AD SET SIZE AT WOPEN 6 lt size gt command ADL SAFE CMD WOPEN READ AT WOPEN command ADL SAFE CMD WOPEN TEST AT WOPEN command ADL SAFE CMD WOPEN OTHER WOPEN other syntax adl safeCmdType e The paras received structure contains the same parameters as if the commands were subscribed with adl atCmdSubscribe API If the Handler returns FALSE the command will not be forvvarded to the Wavecom core software If the Handler returns TRUE the command will be processed by the Wavecom core software which will send responses to the external application e Returned values o OKon success o ADL RET ERR PARAM if the parameters have an incorrect value o ADL RET ERR ALREADY SUBSCRIBED if the service is already subscribed e SSIs WW OW CQO ANN 6confidential Page 111 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless O gt amp 2 amp ADL User Guide for Open AT OS v3 13 API 3 14 3 The adl safeUnsubscribe function This function unsubscribes from Application safe mode service The VWDWL and WOPEN commands are no longer filtered and always processed by the Wavecom core software e Prototype s8 adl safeUnsubscribe adl safeHdlr f Handler e
62. ER ACKNOWLEDGES THAT THE SDK Open AT IS PROVIDED AS IS BY WAVECOM WITHOUT ANY WARRANTY OR GUARANTEE OF ANY KIND 3 16 1 Required Header File The header file for the Application amp Data storage service is adl ad h 3 16 2 The adl adSubscribe function This function subscribes to the required A amp D space cell identifier e Prototype s32 adl_adSubscribe u32 CellID u32 Size e Parameters CelllD A amp D space cell identifier to subscribe to this cell may already exist or not If the cell does not exist the given size is allocated WW OW CQO ANN scontidential Page 118 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wevecom pe Make it wireless ADL User Guide for Open AT OS v3 13 API Size New cell size in bytes this parameter is ignored if the cell already exists It may be set to ADL AD SIZE UNDEF for a variable size In this case new cells subscription will fail until the undefined size cell is finalised Total used size in flash will be data size header size header size is variable with an average value of 16 bytes When subscribing the size is rounded to the next multiple of 4 e Returned values o A positive or null value on success e The A amp D cell handle on success to be used on further A
63. FCM service all the module s ports are processed by the Wavecom Core Software The default behaviors are e When a GSM CSD call is set up the GSM CSD data port is directly connected to the UART port where the ATD command was sent e When a GPRS session is set up the GPRS data port is directly connected to the UART port where the ATD or AT CGDATA command was sent e When a Bluetooth peripheral is detected amp connected through an SPP based profile a local data bridge may be set up between a Bluetooth virtual data port and the required UART port using the AT VW LDB command Once subscribed by an Open AT application with the FCM service a port is no longer available to be used with the AT commands by an external application The available ports are the ones listed in the ADL AT FCM Ports service e ADL PORT UART X ADL PORT UART X VIRTUAL BASE identifiers may be used to access the module s physicals UARTS or logical 27 010 protocol ports e ADL PORT GSM BASE identifier may be used to access a remote modem connected through a GSM CSD call data flow e ADL PORT GPRS BASE identifier may be used to exchange IP packets with the operator network and the Internet e ADL PORT BLUETOOTH VIRTUAL BASE may be used to access a connected Bluetooth device data stream with the Serial Port Profile SPP The 1 switches on the figure above means that UART based ports may be used with AT commands or FCM services as well These switches are processed by
64. For P32X6 product 1 2 X 41 19 ns Warning for the P32X6 product the O value in considered as 32 SS E r W veCoOM scontidential Page 75 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM_ASW_OAT_UGD_00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API o CS USER number of wait states only for CS_USER chip select This is the time interval during which the data is valid on the bus using the defined values ADL BUS PARA CSUSR O WAIT STATE 62 ns ADL BUS PARA CSUSR 1 WAIT STATE 700 ns ADL BUS PARA CSUSR 2 WAIT STATE 738 ns ADL BUS PARA CSUSR 3 WAIT STATE 776 ns e Returned values A positive or null bus handle on success ADL_RET_ERR_PARAM if one parameter has an incorrect value ADL_RET_ERR_ALREADY_SUBSCRIBED if requested bus and address is already subscribed For other negative errors please refer to the BUS API chapter of the Open AT Basic Development Guide e Remark If one or more lOs are required to open a bus these lOs must not be subscribed by any application On the bus unsubscribe operation the lOs can be subscribed again 3 8 3 The adl busUnsubscribe function This function unsubscribes from a previously subscribed bus type e Prototype s8 adl busUnsubscribe u8 Handle e Parameters Handle Handle previously returned by adl busSubscribe function
65. HANDLES if there are no more free handles the service is able to process up 127 subscriptions 3 18 5 The adl portUnsubscribe function This function unsubscribes from the AT FCM IO Ports service The related handler will no longer receive port related events If a signal polling process was started only for this handle it will be automaticaly stopped e Prototype s8 adl portUnsubscribe u8 Handle e Parameters Handle Handle previously returned by the adl portSubscribe function e Returned values o OKon success o ADL RET ERR UNKNOWN HDL if the provided handle is unknown o ADL RET ERR NOT SUBSCRIBED if the service is not subscribed p M WW OW CQO ANN scontidential Page 141 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wevecom p Make it wireless ADL User Guide for Open AT OS v3 13 API 3 18 6 The adl portlisAvailable function This function checks if the required port is currently opened or not e Prototype bool adl portIsAvailable adl port e Port e Parameters Port Port from which to require the current state e Returned values o TRUE if the port is currently opened o FALSE if the port is closed or if it does not exists e Notes o The function will always return TRUE on the ADL PORT GSM BASE port o The funct
66. Halt function If the error is processed and filtered the handler should return FALSE The return value TRUE will cause the product to execute a fatal error reset with a backtrace A backtrace is composed of the message provided and a call stack footprint taken at the function call time It is readable by the Target Monitoring Tool Please refer to the Tools Manual for more information Note that ErrorIDs below OxO100 are for internal purposes so the application should only use ErrorIDs above OxO100 ADL may generates errors which will be handled by an error handler ErrorID ADL function Cause ADL ERR MEM GET adl memGet The product ran out of heap memory or the heap memory is composed of free blocks smaller than the required size ADL ERR MEM RELEASE adl memRelease The pointer provided was not provided by the adl memGet function or it was already released WW OW CO ANN scontidential Page 81 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API ErrorID ADL function Cause ADL ERR IO ALLOCATE adl ioSubscribe Abnormal error on Gpio subscription should be reported to Wavecom support ADL ERR IO RELEASE adl ioUnsubscribe Abnormal error on Gpio unsubscription should be reported to
67. IO O ADL_ IO Q24X3 GPIO 4 ADL IO Q24X3 _GPIO 5 For Wismo Quik Q24X6 products ADL IO Q24X6 GPI ADL lO O24X6 GPO_O ADL IO Q24X6 GPO 1 ADL IO Q24X6 GPO 2 ADL_ IO O24X6 GPO_ 3 ADL_ IO Q24X6 GPIO O ADL IO Q24X6 GPIO 4 ADL IO Q24X6 GPIO 5 For Wismo Quik Q2400 products ADL IO Q24X0 GPI ADL IO Q24X0 GPO O ADL IO Q24X0 GPO 1 ADL IO Q24X0 GPO 2 ADL IO Q24X0 GPO 3 ADL IO Q24X0 GPIO O ADL_ IO Q24X0 GPIO 4 ADL IO Q24XO0 GPIO 5 For Wismo Quik Q31X6 product ADL IO Q31X6 GPI ADL_ lO QO31X6 GPO 1 AD L O O3 1 Xe G PO 2 ADL IO Q31X6 GPIO 3 ADL IO Q31X6 GPIO 4 ADL IO Q31X6 GPIO 5 ADL IO Q31X6 GPIO 6 ADL IO Q31X6 GPIO 7 For Wismo Pac P5186 product ADL IO P51X6 GPO O ADL lo P51X6 GPO 1 ADL_ lo P51X6 GPIO O ADL IO P51X6 GPIO 4 ADL IO P51X6 GPIO 5 ADL IO P51X6 GPIO 8 ADL IO P51X6 GPIO 9 ADL IO P51X6 GPIO 10 ADL IO P51X6 GPIO 11 ADL IO P51X6 GPIO 12 C W vecCoOM scontidential Page 64 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM_ASW_OAT_UGD_00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API For Wismo Quik Q25X1 product ADL IO Q25X1 GPI ADL IO Q25X1 GPO O ADL IO Q25X1 GPO 1 ADL IO Q25X1 GPO 2 ADL IO Q25X1 GPO 3 ADL IO Q25X1 GPIO O ADL IO Q25X1 GPIO 1 ADL IO Q25X1 GPIO 2 ADL IO Q25X1 GPIO 3 ADL IO Q25X1 GPIO 4 ADL IO Q25X1
68. MAT PROGRESS The format process is on going Several progress events should be received until the process is completed ADL AD EVENT FORMAT DONE The format process is over The A amp D storage area is now usable again All cells have been erased and the whole storage place is available ADL AD EVENT RECOMPACT INIT The adl adRecompact function has been called by an application a re compaction process has been requested ADL AD EVENT RECOMPACT PROGRESS The re compaction process is on going Several progress events should be received until the process is complete ADL AD EVENT RECOMPACT DONE The re compaction process is over the A amp D storage area is now usable again The space previously used by deleted cells is now free ADL AD EVENT INSTALL The adl adInstall function has been called by an application an install process has just been required and the wireless CPU is going to reset Progress API On ADL AD EVENT FORMAT PROGRESS amp ADL AD EVENT RECOMPACT PROGRESS events reception this parameter is the process progress ratio considered as a percentage On ADL AD EVENT FORMAT DONE amp ADL AD EVENT RECOMPACT DONE events reception this parameter is set to 100 Otherwise this parameter is set to O M WW OW CQO ANN scontidential Page 121 154 This document is the sole and exclusive property of Wavecom Not to be distr
69. May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API Event Call ID Description Type ADL CALL EVENT SETUP OK Speed ok response after a call setup performed by the adl callSetup function in data call setup case the connection Speed in bits second is also provided MO ADL CALL EVENT ANSWER OK Speed ok response after an ADL CALL NO FORWARD ATA request from a call handler in data call answer case the connection Speed in bps is also provided ADL CALL EVENT HANGUP OK Data ok response after a ADL CALL NO FORWARD ATH request or a call hangup performed by the adl callHangup function on data call release Data is the ADL CALL DATA FLAG constant O on voice call release MO MT ADL CALL EVENT SETUP OK FROM _ EXT Speed ok response after an ATD command from the external application in data call setup case the connection lt Speed gt in bits second is also provided MO ADL CALL EVENT ANSVWER OK FRO M EXT Speed ok response after an ata command from the external application in data call answer case the connection lt Speed gt in bps is also provided ADL_CALL_EVENT_HANGUP_OK_FRO M_EXT Data ok response after an ATH command from the external application on data call release Data is the ADL_CALL_DATA_FLAG constant O on voice call release MO MT ADL CALL EVENT AUDIO OPENNED o
70. NKNOWN HDL if handle is not subscribed o ADL FLH RET ERR ID OUT OF RANGE if ID is out of handle range O S E E Tr W vVveCoOM scontidential Page 51 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM_ASW_OAT_UGD_00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 6 FCM Service ADL provides a FCM service to handle all FCM events and to access to the data ports provided on the product An ADL application may subscribe to a specific flow UART 1 UART 2 or USB physical virtual ports GSM CSD call data port GPRS session data port or Bluetooth virtual data ports to exchange data on it Wavecom Module Embedded Application IADL AT PEN yeommands r POLEN TCP IP Stack I I I I v I I I I GPRS I session AT GSM CSD commands call Ii Bluetooth V24 virtual ports Serial Link Uart 1 amp 2 physical amp logical ports Figure 3 Flow Control Manager representation WW OW CQO ANN scontidential Page 52 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API By default ie without any Open AT application or if the application does not use the
71. Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 16 8 The adl adinfo function This function provides information on the requested A amp D cell e Prototype s32 adl adInfo s32 CellHandle adl_adInfo_t Info e Parameters CellHandle A amp D cell handle returned by the adl adSubscribe function Info Information structure on requested cell based on following type typedef struct u32 identifier identifier u32 size entry size void data pointer to stored data u32 remaining remaining writable space unless finalized bool finalised TRUE if entry is finalized adl_adInfo t e Returned values o OK on success o ADL_RET_ERR_PARAM on parameter error o ADL RET ERR UNKNOWN HDL if the handle was not subscribed o ADL RET ERR BAD STATE if the required cell is a not finalized undefined size cell 3 16 9 The adl adFinalise function This function sets the provided A amp D cell in read only finalized mode The cell content can no longer be modified e Prototype s32 adl adFinalise s32 CellHandle e Parameters CellHandle A amp D cell handle returned by the adl adSubscribe function e Returned values o OKon success o ADL RET ERR UNKNOVWN HDL if the handle was not subscribed o ADL RET ERR BAD STATE if the cell was already finalized
72. OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API E g if used on a 27 010 virtual port identifier based on the UART 2 this macro will return ADL PORT UART2 e ADL PORT IS A PHYSICAL PORT port Returns TRUE if the port provided is a physical output based one E g UART1 UART2 or 27 010 logical ports FALSE otherwise e ADL PORT IS A PHYSICAL OR BT PORT port Returns TRUE is the port provided is a physical output or a bluetooth based one FALSE otherwise e ADL PORT IS AN FCM PORT port Returns TRUE if the port provided is able to handle the FCM service i e all ports except the Open AT virtual base ones FALSE otherwise e ADL PORT IS AN AT PORT port Returns TRUE if the port provided is able to handle AT commands services i e all ports except the GSM amp r GPRS virtual base ones FALSE otherwise 3 18 4 The adl portSubscribe function This function subscribes to the AT FCM IO Ports service in order to receive specific port related events e Prototype s8 adl portSubscribe adl portHdlr f PortHandler e Parameters PortHandler Port related events handler defined using the following type typedef void adl portHdlr f adl portEvent e Event adl port e Port u8 State The events received by this handler are defined below ADL PORT EVENT OPENED Informs the ADL application that the specified Port is now opened Accord
73. PIO functions is adl gpio h 3 7 2 The adl ioSubscribe function This function subscribes to some GPIOs and sets up a polling system if required Note using the product s second UART locks some GPIOs which will not be available for allocation by the application please refer to the corresponding section for more information e Prototype s8 adl ioSubscribe u32 GpioMask u32 GpioDir u32 GpioDefValues u32 PollingTime adl ioHdlr f GpioHandler e Parameters GpioMask Mask of GPIOs to subscribe using the following defined values One or several GPIOs may be subscribed by performing a logical OR between the requested identifiers For Wismo Pac P31X3 and P32X3 products ADL IO P32X3 GPI ADL IO P32X3 GPIO O ADL IO P32X3 GPIO 2 ADL IO P32X3 GPIO 3 ADL IO P32X3 GPIO 4 ADL IO P32X3 GPIO 5 For Wismo Pac P32X6 product ADL IO P32X6 GPI ADL IO P32X6 GPO O ADL IO P32X6 GPIO 0O ADL IO P32X6 GPIO 2 ADL IO P32X6 GPIO 3 ADL IO P32X6 GPIO 4 ADL IO P32X6 GPIO 5 ADL IO P32X6 GPIO 8 HH WW OW CQO ANN scontidential Page 63 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API For Wismo Quik Q23X3 and Q24X3 products ADL IO Q24X3 GPI ADL fon Q24X3 GPO 1 AD LIO Q24x3 G PO 2 ADL IO Q24X3 GP
74. Port on which the command was sent by the external application o ParaList Parameters list if Type is ADL CMD TYPE PARA Each parameter may be accessed by the ADL GET PARAM p i macro where p is the command handler parameter adl atCmdPreParser t pointer and iis the parameter index from O to NbPara 1 NbPara is the number of arguments received and it is a number between the minimum arguments number a and the maximum arguments number b eg a 1 b 5 and AT MYCMD zO 1 2 i can be between O and 3 1 2 If a string parameter is provided eg AT MYCMD string the quotes will be removed from the returned string eg ADL GET PARAM para O will return string without quotes in this case If a parameter is not provided eg AT MYCMD 1 the matching list element will be set to NULL eg ADL GET PARAM para O will return NULL in this case StrLength StrData Incoming command string length and value WW OW CO ANN scontidential Page 26 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API Options This flag combines with an arithmetic OR information Minimum arguments number a stored in the least significant byte as in Ox000a only if the ADL CMD TYPE PARA type is required Maximum arguments numbe
75. RR_UNKNOWN_HDL if the handle provided is unknown ADL RET ERR BAD STATE if the product is not ready to send a SMS initialization not yet performed or SMS sending already in progress O O 0 e 5559595959556 WW OW CQO ANN scontidential Page 90 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless O gt amp ADL User Guide for Open AT OS v3 13 API 3 11 4 The adi_smsUnsubscribe function This function unsubscribes from the SMS service The associated handler with the handle provided will no longer receive SMS events e Prototype s8 adl smsUnsubscribe u8 Handle e Parameters Handle Handle returned by adl smsSubscribe function e Returned values o OKon success ADL RET ERR UNKNOVWN HDL if the handler provided is unknown ADL RET ERR NOT SUBSCRIBED if the service is not subscribed ADL RET ERR BAD STATE if the service is processing a SMS O O O E S WW OW CQO ANN scontidential Page 91 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 12 Call Service ADL provides this service to handle call related
76. RTC GET TIMESTAMP MS t E MS Ct structure part O 999 adl rtcTimeStamp t Timestamp microseconds ADL RTC GET TIMESTAMP US t IM DL U8 Ct structure part O 999 These macros may be used in order to extract duration parts from a given timestamp the logical equations below are always true t TimeStamp ADL RTC GET TIMESTAMP SECONDS t ADL RTC GET TIMESTAMP MINUTES t ADL RTC MINUTE SECONDS ADL RTC GET TIMESTAMP HOURS t ADL RTC HOUR SECONDS ADL RTC GET TIMESTAMP DAYS t ADL RTC DAY SECONDS _t SecondFracPart ADL RTC SECOND FRACPART STEP ADL RTC GET TIMESTAMP MS t ADL RTC MS US ADL RTC GET TIMESTAMP US t Y WW OW CQO ANN scontidential Page 147 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 19 3 The adl rtcGetTime function This function retrieves the current RTC time structure e Prototype s32 adl rtcGetTime adl rtcTime t TimeStructure e Parameters TimeStructure Retrieved current time structure e Returned values o OKon success o ADL RET ERR PARAMI if the parameter is incorrect 3 19 4 The adl rtcConvertTime function This function is able to convert RTC time structure to
77. T 146 3 19 1 Required Header File 0 0 cc ccc cece cece eee eee ss e ese se ense enses 146 3 19 2 RTC service types coe ky x Fre neris nese NRAKA EX Nee KRe XR aVREe cv een ness vend ARAKEA KA 146 3 19 3 The adl rtcGetTime function 0 eee IH eme mener 148 3 19 4 The adl rtcConvertTime function essssssssss m mme mene 148 3 19 5 The adl rtcDiffTime function ssssssssssssssee IH eme mener 149 320 DAC III REPE 150 3 20 1 Required Header File c cc cece ccc eee eee eee eee es emen enses 150 3 20 2 The adl dacSubscribe function cece cece eee eee eee eee sees 150 wavecon Confidential Page 8 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 3 20 3 The adl dacUnsubscribe function sssssssssssses mmn 151 3 20 4 The adl dacWrite function ssssssssssssssssssssslss sess ee enses 151 9 20 5 Examuple iex RRRIRR ARE SEXE NRRERRRRARMURRRRARFARANRANMUSKRRAE FERAREDA ARN CRARRRSEREEENAUERAREE 152 4 ERROR CODES 153 4 1 General error codG8s sisse sees see eva exta a aada a a HEAR E aa M IRA CREE FA a RE E RI RACER 153 4 2 Specific FCM service error codes ccccc cece cece eee eee cnet cnet esses sese nsns 153 4 3 Specific fl
78. T TAT MI MET 132 3 17 1 Required Header File apia nni eee aaa a a esse aaia a nnn 132 S 17 2 GPS Data Str ctULres ucsonnevos nen ioi AAEN vec vod aoe Dee viol AEAEE WT o 132 3 17 3 The adl gpsSubscribe function ccc esee nnns 134 3 17 4 The adl gpsUnsubscribe function cece eee eee s een 135 3 17 5 The adl gpsGetState function ccc cece eect ee eee eee e eee teeta 136 3 17 6 The adl gpsGetPosition function lessen 136 3 17 7 The adl gpsGetSpeed function 0c eee eese 137 3 17 8 The adl gpsGetSatView function sesssssssssssssssssesee s essen 137 3 18 AT FCM JO Ports Servi orco pe esos rp poe ete ata era Ea ma ea val pow evan Chad x al Ro ig 138 3 18 1 Required Header File cc cece cece eee eee ee eee esse eese eese essen 138 3 18 2 AT FCMI IO Ports cc cece cece ene esee ese ese esr e hne nnn nns 138 3 19 29 Ports test racroS tuta auton ui es atten RETENIR VIUA EEUU PEE UREAP EI EN ERE 139 3 18 4 The adl portSubscribe fUNCtION cect Im emen 140 3 18 5 The adl portUnsubscribe fUNCtION cece eee m mmm 141 3 18 6 The adl portlsAvailable function 0 2 0 eter Im 142 3 18 7 The adl portGetSignalState function cece eee eee eee eee ena 142 3 18 8 The adl portStartSignalPolling function cece eee eee eee teen nre 143 3 18 9 The adl portStopSignalPolling fUNCtION cece eee nre 145 219 LupS3 Ilau o A EE
79. This function has to be used as soon as the prompt response gt comes in the response handler provided on adl atCmdCreate function call Prototype s8 adl atCmdSendText adl port e Port ascii Text Parameters Port Port on which the Text Mode command is currently running and waiting for some text input Text Text to be provided to the running Text Mode command on the required port If the text does not end with a Ctrl Z character Ox1A code the function will add it automatically Returned values o OK on success the text has been provided to the running Text Mode command the response handler provided on adl atCmaCreate call will be notified vvith the command responses o ADL RET ERR PARAMI on parameter error NULL text o ADL RET ERR UNKNOWN HDL if the required port is not available o ADL RET ERR BAD STATE if there is no Text Mode command currently running on the required port Note It is not possible to send the text in several steps As soon as the adl atCmdSendText function is used the text provided will immediately be sent and the command will be executed further calls to adl atCmdSendText will return ADL RET ERR BAD STATE until a new Text Mode command is sent on this port It is possible to insert new lines Vr chracters in the text body a WW OW CO ANN scontidential Page 34 154 This document is the sole and exclusive property of Wavecom Not to be distributed or
80. Wavecom support ADL ERR IO READ adl ioRead Abnormal error on Gpio read should be reported to Wavecom support ADL ERR IO WRITE adl ioWrite Abnormal error on Gpio write should be reported to Wavecom support ADL ERR FLH READ adl flhRead Abnormal error on Flash object read should be reported to Wavecom support ADL ERR FLH DELETE e Returned values adl flhErase o OKon success O Abnormal error on Flash object erasure should be reported to Wavecom support ADL_RET_ERR_PARAM if the parameter has an incorrect value o ADL RET ERR ALREADY SUBSCRIBED if the service is already subscribed e Returned values The reboot is performed once the handler has returned TRUE In order to ensure the downloading of a new binary file after a fatal error has been detected the Open AT application software startup is performed after a 20 second delay Therefore in order not to miss any event any application has to handle the case of a startup delay of 20 seconds Moreover if the product reset is due to a fatal error from Open AT application or from Wavecom Core Software the adl main function s adlInitType parameter will be set to the ADL INIT REBOOT FROM EXCEPTION value 3 9 3 The adl errUnsubscribe function This function unsubscribes from Management service Errors generated by ADL or by the adl errHalt function will no longer be handled by the error handler e Prototype s8
81. _PARAM 2 parameter error ADL_RET_ERR_UNKNOWN_HDL 3 unknown handler handle error ADL_RET_ERR_ALREADY_SUBSCRIBED 4 service already subscribed ADL RET ERR NOT SUBSCRIBED 5 service not subscribed ADL_RET_ERR_FATAL 6 fatal error ADL_RET_ERR_BAD_HDL 7 Bad handle ADL_RET_ERR_BAD_STATE 8 Bad state ADL_RET_ERR_PIN_KO 9 Bad PIN state ADL_RET_ERR_NO_MORE_HANDLES 10 The service subscription maximum capacity is reached ADL_RET_ERR_DONE 11 The required iterative process is now terminated ADL_RET_ERR_OVERFLOW 12 The required operation has exceeded the function capabilities ADL_RET_ERR_NOT_SUPPORTED 13 An option required by the function is not enabled on the Wireless CPU the function is not supported in this configuration ADL_RET_ERR_SPECIFIC_BASE 20 Beginning of specific errors range 4 2 Specific FCM service error codes Error code Error value ADL FCM RET ERROR GSM GPRS ALREADY OPENNED ADL_RET_ERR_SPECIFIC_BASE ADL FCM RET ERR WAIT RESUME ADL RET ERR SPECIFIC BASE 1 ADL FCM RET OK WAIT RESUME OK 1 ADL_FCM_RET_BUFFER_EMPTY OK 2 ADL FCM RET BUFFER NOT EMPTY OK 3 i ____ VVoOWVOCOAMA sccontidential Page 153 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 4 3 Specific flash
82. al response has to end an incoming AT command A destination port has to be specified Sending such a response will flush all previously buffered unsolicited responses on the required port e ADL AT INT Intermediate response text to display while an incoming AT command is running A destination port has to be specified Sending such a response will just display the required text without flushing all previously buffered unsolicited responses on the required port e ADL AT UNS Unsolicited response text to be displayed out of a currently running command process For the required port if any or for each currently opened port if the ADL AT PORT TYPE macro is not used if an AT command is currently running ie the command was sent by the external application but this command answer has not been sent back yet any unsolicited response will automatically be buffered until a terminal response is sent on this port WW OW CO ANN scontidential Page 23 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless O gt amp ADL User Guide for Open AT OS v3 13 API String The text to be sent Please note that this is exactly the text string to be displayed on the required port i e all carriage return amp line feed characters r n in C la
83. and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API for SPI bus o Clock speed Supported Q24 Classic Supported Q24 Plus Supported on Q2XX3 Q24 Speed constant on P5186 and P3XX3 Extended rod ct products Q24 Auto p and products ADL BUS SPI SCL SPEED 13Mhz Yes ADL BUS SPI SCL SPEED 6 5Mhz Yes Yes ADL BUS SPI SCL SPEED 4 33Mhz Yes Yes ADL BUS SPI SCL SPEED 3 25Mhz Yes Yes Yes ADL BUS SPI SCL SPEED 2 6Mhz Yes ADL BUS SPI SCL SPEED 2 167Mhz Yes Yes ADL BUS SPI SCL SPEED 1 857Mlhz Yes ADL BUS SPI SCL SPEED 1 625Mlhz Yes Yes ADL BUS SPI SCL SPEED 1 44Mhz Yes ADL BUS SPI SCL SPEED 1 3Mhz Yes ADL BUS SPI SCL SPEED 1 181Mhz Yes ADL BUS SPI SCL SPEED 1 O83Mhz Yes ADL BUS SPI SCL SPEED 1Mhz Yes ADL BUS SPI SCL SPEED 926Khz Yes ADL BUS SPI SCL SPEED 867Khz Yes ADL BUS SPI SCL SPEED 812Khz Yes Yes ADL BUS SPI SCL SPEED 101Khz Yes o Clock mode ADL BUS SPI CLK MODE O the rest state is O data valid on rising edge ADL BUS SPI CLK MODE 1 the rest state is O data valid on falling edge ADL BUS SPI CLK MODE 2 the rest state is 1 data valid on rising edge ADL BUS SPI CLK MODE 3 the rest state is 1 data valid on falling edge VV oOWVOCOAMA Confidential This document is the sole and e
84. annel has already been subscribed ADL RET ERR NO MORE HANDLES if there are no more free DAC handles ADL RET ERR NOT SUPPORTED if the current module does not support the DAC service ADL RET ERR PARAMI on parameter error e Notes The DAC service is only available on the Q2501 product 3 20 3 The adi dacUnsubscribe function This function un subscribes from a previously subscribed DAC block e Prototype s32 adl dacUnsubscribe s32 Handle e Parameters Handle DAC service handle previously returned by the adl dacSubscribe function e Returned values OK on success ADL RET ERR UNKNOWN HDL if the handle provided is unknown 3 20 4 The adl dacWrite function This function allows the output value of a subscribed DAC block to be set e Prototype s32 adl dacWrite s32 Handle u32 Value e Parameters Handle DAC service handle previously returned by the adl dacSubscribe function SS Y WW OW CQO ANN scontidential Page 151 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API Value Value to be written on the DAC output Significant bits and output voltage depend on module type please refer to the module Product Technical Specification document for more information Module type Significant
85. application process is suspended immediately on the adl safeRunCommand process if there is any code after this function call it will be executed only once the process is resumed RspHandler Response handler to get ran commands results All responses are subscribed the command will be executed on the Open AT virtual port Instead of providing a response handler a port identifier may be specified using adl port e type the command will be executed on this port and the resulting responses sent back on this port too e Returned values o OKon success o ADL RET ERR PARAM if the parameter has an incorrect value p WW OW CQO ANN scontidential Page 113 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 15AT Strings Service This service provides APIs to process AT standard response strings 3 15 1 Required Header File The header file for the AT strings service is adl_str h 3 15 2 The adl striD e type This type defines all pre defined AT strings by this service defined below typedef enum ADL_STR_NO_STRING Unknown string ADL_STR_OK OK ADL STR BUSY BUSY ADL STR NO ANSWER NO ANSWER ADL STR NO CARRIER NO CARRIER ADL STR CONNECT CONNECT ADL STR ERROR
86. ash service error codes c cece cece cece cent eee cnet cnet cnet ee neeenet eae ens 154 4 4 Specific GPRS service error COdES cc cece eee eect tenet eens esee nnns 154 4 5 Specific GPS service error COCES ccc ccc cece cece ence eee eee ene eee e ene shes nnns 154 4 6 Specific A amp D storage service error codes 2 0 cc cece cece cece eee ee cece eee seats ess sean 154 W VeCO N econtidentia 0000000000000 Page 9 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 List of Figures Figure 1 Software architecture ccccc cece eee ann WENA EAREN ese ese ess nennen 13 Figure 2 Open AT RAM mapping with adl memInfo t structure fields names 41 Figure 3 Flow Control Manager representation sess sese 52 Figure 4 LCD EN Address Setup chronogram ssssssssssssssssssssss ss sehen 75 I WoaVvVeCOM Confidential Page 10 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 Introduction 1 Introduction 1 1 Important remarks Itis strongly recommended before reading this document
87. be released In this case all credits will be released next time the handler returns TRUE On all flows all data handlers master and slaves subscribed are notified with a data event and the credit will be released only if all handlers return TRUE each handler should return TRUE as default value If a credit is not released on the data block reception it will be released the next time the data handler returns TRUE The adl fcmReleaseCredits should also be used to release credits outside of the data handler Maximum size of each data packet to be received by the data handlers depends on the flow type o On serial link flows UART physical amp logical based ports 120 bytes On GSM CSD data port 270 bytes On GPRS port 1500 bytes On Bluetooth virtual ports 120 bytes O00 If data size to be received by the Open AT application exceeds this maximum packet size data will be segmented by the Flow Control Manager which will call the Data Handlers several times with the segmented packets Please note that on GPRS flow whole IP packets will alvvays be received by the Open AT application e Returned values o A positive or null handle on success which will have to be used in all further FCM operations The Control handler will also receive a ADL FCM EVENT FLOVV OPENNED event when flow is ready to process o ADL RET ERR PARAMI if one parameter has an incorrect value o ADL RET ERR ALREADY SUBSCRIBED if the flow is alread
88. bits Max output voltage Q2501 8 less significant bits 2 64 V for OxFF value e Returned values OK on success ADL RET ERR PARAM on parameter error 3 20 5 Example This example just demonstrates how to use the DAC service in a nominal case error cases not handled A full example using the DAC service is also available on the SDK ADL generic DAC sample Global variable s32 MyDACHandle Somewhere in the application code used as an event handler void MyFunction void ff Imieializarion Siewuciewics Zell Clavel eucein i IiniicSieicuce 4 0 P Subscribe to the DAC service MyDACHandle adl dacSubscribe ADL DAC CHANNEL 1 amp InitStruct ff Wiexuee s value om the DAC block adl dacWrite MyDACHandle 80 fj Wes ain echerc values om tche DAC block adl dacWrite MyDACHandle 190 Unsubscribe from the DAC service adl dacUnsubscribe MyDACHandle e c VVoOWVOCOAMA sccontidential Page 152 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 Error codes 4 Error codes 4 1 General error codes Error code Error value Description OK 0 No error response ERROR 1 general error code ADL_RET_ERR
89. catenation processing mode which will end as soon as the last command replies OK or if one of the commands used replies with an ERROR code During this specific mode all other external command requests will be refused on this port any external application connected on this port will receive a CME ERROR 515 code if it tries to MM M M WW OW CO ANN Confidential Page 27 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless O gt amp 2 amp ADL User Guide for Open AT OS v3 13 API send another command The embedded application can continue using this port for its specific processes but it has to be careful to send one at least one and only one terminal response for each subscribed command If a subscribed command is used in a concatenated command string the corresponding handler will be notified as if the command was used alone In order to handle the concatenation mechanism properly each subscribed command has to finally answer with a single terminal response ADL_STR_OK ADL STR ERROR or other ones otherwise the port will stay in concatenation processing mode refusing all internal and external commands on this one 3 1 4 2 The adl atCmdUnSubscribe function This function unsubscribes from a command and its handler e Proto
90. ce The application should subscribe to a GPIO in order to handle the SPI Chip Select signal IC2 soft ADL BUS TYPE I2C SOFT Less Significant Byte of BusAddress bus parameter is used as 7 bits slave address for devices on I2C bus M WW OW CQO ANN scontidential Page 71 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wevecom pue Make it wireless ADL User Guide for Open AT OS v3 13 API Possible type values Possible address values IC2 ADL BUS TYPE I2C HARD Less Significant Byte of BusAddress hard parameter is used as 7 bits slave bus address for devices on I2C bus for Q24X6 Q2400 Q3106 Q24 Classic Q24 Plus Q24 Extended and Q24 Auto products Parallel ADL BUS TYPE PARALLEL ADL BUS PARA LCDEN AS CS bus use LCD EN pin as Chip Select On P32X6 product the LCD EN pin is the same as the GPIO 8 pin it must not be allocated by any application ADL BUS PARA CSUSR AS CS use CS USER pin as Chip Select GPIO 5 on Pac products GPIO 3 on Q31X6 product This GPIO pin must not be allocated by any application Param Bus parameters defined by following values using a logical OR to combine the different settings i M MH S WW OW CQO ANN scontidential Page 72 154 This document is the sole
91. d ADL GPRS EVENT DEACTIVATE KO X f the deactivation requested with ad gprsDeact on the Cid X did fail ADL GPRS EVENT DEACTIVATE KO FROM EXT X If the deactivation requested by the external application on the Cid X did fail ADL GPRS EVENT ACTIVATE KO FROM EXT x f the activation requested by the external application on the Cid X did fail M WW OW CON scontidential Page 99 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API Event Call ID Description ADL GPRS EVENT ACTIVATE KO X If the activation requested with ad gprsAct on the Cid X did fail ADL GPRS EVENT ANSWER OK AUTO If the incoming PDP context activation was automatically accepted by the ME ADL GPRS EVENT SETUP OK X If the set up of the Cid X with ad gprsSetup did succeed ADL GPRS EVENT SETUP KO X If the set up of the Cid X with ad gprsSetup did fail ADL GPRS EVENT ME ATTACH If the ME has forced a network attachment ADL GPRS EVENT ME UNREG If the ME is not registered ADL GPRS EVENT ME UNREG SEARCHING If the ME is not registered but is searching a new operator to register to Note If Cid X is not defined the value ADL CID NOT EXIST will be used as X The p
92. d two times if all responses are subscribed WW OW CO ANN scontidential Page 30 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API The callback function is defined as follows typedef bool adl atRspHandler t adl atResponse t The argument of the callback function will be an adl atResponse t structure holding the received response The adl atResponse t structure is defined as follows declared in the adl at h header file typedef struct adl strID e RspID adl_atPort_e Dest ul6 StrLength ascii StrData 1 adl atResponse t This structure members are defined below o HRsplD Detected standard response ID if the received response is a standard response See 8 3 15 for more information o Dest Port on which the command has been executed it is also the destination port where the response will be forvvarded if the handler returns TRUE o StrLength amp StrData Response string length amp value The return value of the callback function has to be TRUE if the response string has to be sent to the port provided FALSE otherwise This allows a variable number of arguments where ADL expects a list of responses and intermediate responses to subscribe to When the command is executed its responses are compa
93. ded text to any external application connected to the required port as a response an unsolicited response or an intermediate response according to the requested type e Prototype void adl atSendResponse ul6 Type ascii String S WW OW CO ANN scontidential Page 22 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom exu Make it wireless ADL User Guide for Open AT OS v3 13 API e Parameters Type This parameter is composed of the response type and the destination port where to send the response The type amp destination combination has to be done with the follovving macro ADL AT PORT TYPE port type The port argument has to be a defined value of the adi atPort e type and this required port has to be available cf the AT FCM port Service sending a response on an Open AT the GSM or GPRS based port will have no effects Note that with the ADL AT UNS type value if the ADL AT PORT TYPE macro is not used the unsolicited response will be broadcasted on all currently opened ports If the ADL AT PORT TYPE macro is not used with the ADL AT RSP amp ADL AT INT types responses will be by default sent on the UART 1 port If this port is not opened responses will not be displayed The type argument has to be one of the values defined below e ADL AT RSP Termin
94. divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom m Make it wireless ADL User Guide for Open AT OS v3 13 API 3 1 5 3 AT commands ports processing Several AT commands ports are available on the module an application may know each port s current state using the AT FCM Port service When an AT command is sent using the adl atCmdCreate function this is pushed on the required port inner command stack ADL is processing one command stack by available port on the module When an AT command is sent from an external application on a specific port this command is also pushed on the required port inner command stack For each command stack while this stack is not empty ADL sends the commands one by one ie ADL sends the command on the required port waits until the terminal response is received and then continue with the next command until reaching the stack s end In addition to module physical UART ports and logical 27 010 channel ports there is an additional Open AT virtual port usable to send commands only with Open AT applications in order not to be disturbed or not to disturb applications running on the module physical ports ADL AT command stacks architecture is summarized in the following diagram adl atCmdCreate ATH Oper Al ADL Response Handler Open AT app virtual port command A lt Lo y stack lt lt BS Open AT app responses responses External app r
95. dl callHangup function This function just runs the adl callHangupExt one on the ADL PORT OPEN AT VIRTUAL BASE port cf adl callHangupExt description for more information Please note that events generated by the ad1 callHangup will not be able to be forwarded to any external port since the setup command was running on the Open AT port 3 12 6 The adl callHangupExt function This function hangs up the phone call e Prototype s8 adl callHangupExt adl port e Port e Parameters Port Port on which to run the call hang up command When hang up return events are received in the Call event handler if the application requires ADL to forward these events they will be forwarded to this Port parameter value e Returned values o OKon success o ADL RET ERR PARAM on parameter error unavailable port 3 12 7 The adl callAnswer function This function just runs the adl callAnswerExt one on the ADL PORT OPEN AT VIRTUAL BASE port cf adl callAnswerExt description for more information Please note that events generated by the ad1 callAnswer will not be able to be forwarded to any external port since the setup command was running on the Open AT port 3 12 8 The adl callAnswerExt function This function allows the application to answer a phone call out of the call events handler e Prototype s8 adl callAnswerExt adl port e Port WW OW CQO ANN scontidential Page 96 154 This document is the sole and exclusive property
96. e MyADEventHandler Subscribe to an A amp D cell MyADCellHandle adl adSubscribe 0x00000000 20 VVoOWVOCOZAMA sccontidential Page 130 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 weaevecom Make it wireless ADL User Guide for Open AT OS v3 13 API WaVeCOMMccontidential Page 131 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 17GPS Service ADL applications may use this service to access the GPS device information on Q2501 products Note the product uses the module s second UART to access the GPS component This will lock some GPIOs which will not be available for allocation by the application please refer to 82 5 for more information 3 17 1 Required Header File The header file for the GPS service is adl_gps h 3 17 2 GPS Data structures 3 17 2 1 Position GPS Position data is stored in the following structure typedef struct ascii UTC time S UTC TIME hhmmss sss ascii date S DATE ddmmyy ascii latitude S POSITION ddmm mmmm ascii latitude Indicator S INDICATOR N S ascii longitude S POSITION dddmm mmmm ascii
97. e Z x1A in C language character Rspflag This parameter is composed of the unsubscribed responses destination flag and the port to which the command is to be sent The flag amp destination combination has to be done with the following macro ADL AT PORT TYPE port flag The port argument has to be a defined value of the adl atPort e type and this required port has to be available cf the AT FCM port Service If this port is not available or if it is GSM or GPRS based one the command will not be executed The _flag argument has to be one of the values defined below If set to TRUE the responses and intermediate responses of the sent command that are not subscribed i e not listed in the adl atCmdCreate function arguments will be sent on the required port If set to FALSE they will not be sent to the external application If the ADL AT PORT TYPE macro is not used by default the command will be sent to the Open AT virtual port see next paragraph for more information about At command ports Rsphdl Handler of the callback function associated to all the responses and intermediate responses subscribed in the adl atCmdCreate function call Note that the callback function will be called one time on each response line sent back by the Wavecom Core Software For example since the AT CGMR commands replies with tvvo lines Software version response and then OK response the response handler will be calle
98. e adl errStartBacktraceAnalysis function cece cece eee eee eee teeta eee eae 84 3 9 7 The adl errGetAnalysisState FUNCTION essssssss m 84 3 9 8 The adl errRetrieveNextBacktrace function sessssss 84 3 10 SIM Service uis exe Rua RR Ex ERR ERR ERR ER Re ER ERE EE beck yeed Fu ERR CHR RR FR FER e CE Ra REY 86 3 10 1 Required Header File 00 cc cece cece eee eee eee eee sse ese he e emen ensem enne 86 3 10 2 The adl simSubscribe function 0 eee mmm eme men 86 3 10 3 The adl simUnsubscribe function 1 0 0 eee mmm 87 3 10 4 The adl simGetState function cece eee rete eee ene meme emen 87 3 11 SMS SBrvIEG socis er bel etek otk E a REX ER bean REX REI RTRREEE RR REX ER E tE EE LET ERE CRT Du La ERE 88 3 11 1 Required Header File ere eye tbv ek nere bedeuten ue Rx ed ica Wo TE RR 88 3 11 2 The adl smsSubscribe function sssssssssssssssee m meme men 88 3 11 3 The adl smsSend function sssssssssssssssssse e e m e meme meme emnes 90 3 11 4 The adl smsUnsubscribe function sssssssss mmm 91 SA2 Gall Se6rVIee seinistir reie inae ANENA els id va ERR PRX ERR GE KATE BUM PUER BEAT ER BEN eU sad Va E BUR han 92 3 12 11 Required Header File irienct xit Arte i Rer ROREM A ERA RVIRENDREXNAT RERRENDREENREEIRRUN EN AA 92 3 12 2 The adl callSubscribe function sssssssssssss mm meme 92 3 12 3 The adl callSetup function esses hehe ares E
99. e default values The commands concerned are listed below AT Command Fixed value AT CMEE 1 AT WIND All indications AT CREG 2 AT CGREG 2 AT CRC 1 AT CGEREP 2 ATV 1 ATQ 0 All WIND unsolicited indications are always required by the ADL library The WIND 3 indication product reset will be enabled only if the external application required this The above fixed values are set up internally by ADL This means that all related error codes for CMEE or unsolicited results are always all available to all Open AT ADL applications without requiring them to be sent using the corresponding configuration command Important Warning User is strongly advised against modifying the current values of these commands from any Open AT application Wavecom would not guarantee ADL correct processing if these values are modified by any embedded application External applications may modify these AT commands parameter values without any constraints These commands and related unsolicited results behavior is the same with our without a running ADL application If error codes or unsolicited results related to these commands are subscribed and then forwarded by an ADL application to an external application these results will be displayed for the external application only if this latter has required them using the corresponding AT commands same behavior as the Wavecom AT firmware w
100. e it wireless ADL User Guide for Open AT OS v3 13 API 3 3 3 The adl memGetlinfo function This function returns information about the Open AT RAM areas sizes e Prototype s32 adl memGetInfo adl memInfo t Info e Parameters Info Structure updated by the function using the following type typedef struct u32 TotalSize u32 StackSize u32 HeapSize u32 GlobalSize adi memInfo t o TotalSize Total RAM size for the Open AT application in bytes Please refer to the 8 2 8 Memory Resources for more information o StackSize Open AT application call stack area size in bytes This size is defined by the Open AT application through the wm apmCustomStackSize constant Please refer to the Mandatory API chapter for more information 8 2 2 o HeapSize Open AT application total heap memory area size in bytes This size is the difference between the total Open AT memory size and the Global amp Stack areas sizes o GlobalSize Open AT application global variables area size in bytes This size is reckoned at the binary link step it includes the ADL library plug in libraries if any and Open AT application global variables p M M P WW OW CQO ANN scontidential Page 40 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM
101. e sent to the external application adl atCmdCreate attclcc ADL AT PORT TYPE paras gt Port TRUE adl atRspHandler t NULL NULL return TRUE atd callback function void ATD Handler adl atCmdPreParser t paras t adl atCmdUnSubscribe atd adl atCmdHandler t ATD Handler We unsubscribe the command so that when we resend the command it won t be received by the ADL parser anymore We resend the command for the phone call to be made and subscribe to some of its responses We also set the 2 argument to TRUE so that the response not subscribed will be directly sent to the external application adl atCmdCreate paras StrData TRUE adl atRspHandler t ATD Response Handler ADL AT PORT TYPE paras Port TRUE WIND 2 OK NULL main function void adl main adl InitType e adlInitType Subscribe to the atd command adl_atCmdSubscribe atd adl atCmdHandler t ATD Handler ADL CMD TYPE ACT VVoOWVOCOAMA sccontidential Page 33 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 1 5 2 The adl atCmdSendText function This function is used to provide a running Text Mode command on a specific port e g AT CMGW with the required text
102. ed by the application Please refer to next chapter for more information e Returned values o A positive or null value on success e A amp D event handle to be used in further A amp D API functions calls o A negative error value e ADL RET ERR PARAM if the Handler parameter is invalid e ADL RET ERR NO MORE HANDLES if the A amp D event service has been subscribed more than 128 times e Notes In order to format or re compact the A amp D storage volume the adl adEventSubscribe function has to be called before the adl adFormat or the adl adRecompact functions 3 16 5 The adl adEventHdlr f call back type This call back function has to be provided to ADL through the adl adEventSubscribe interface in order to receive A amp D related events e Prototype typedef void adl adEventHdlr f adl adEvent e Event u32 Progress e Parameters Event Event is the received event identifier The events defined in the adl adEvent e type are described in the table below WW OW CQO ANN scontidential Page 120 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 Event Meaning ADL_AD_EVENT_FORMAT_INIT The adl adFormat function has been called by an application a format process has just been requested ADL AD EVENT FOR
103. elow e ADL PORT NONE Not usable e ADL PORT UART1 Product physical UART 1 Please refer to the AT WMFM command documentation to know how to open close this product port e ADL PORT UART2 Product physical UART 2 Please refer to the AT WMFM command documentation to know how to open close this product port M WW OW CQO ANN scontidential Page 138 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API e ADL PORT USB Product physical USB port reserved for future products e ADL PORT UART1 VIRTUAL BASE Base ID for 27 010 protocol logical channels on UART 1 Please refer to AT CMUX command amp 27 010 protocol documentation to know how to open close such a logical channel e ADL PORT UART2 VIRTUAL BASE Base ID for 27 010 protocol logical channels on UART 2 Please refer to AT CMUX command amp 27 010 protocol documentation to know how to open close such a logical channel e ADL PORT USB VIRTUAL BASE Base ID for 27 010 protocol logical channels on USB link reserved for future products e ADL PORT BLUETOOTH VIRTUAL BASE Base ID for connected Bluetooth peripheral virtual port ONLY USABLE WITH THE FCM SERVICE Please refer to the Bluetooth AT commands documentation to know how to connect and how
104. er memory is allocated by this function but its ownership is transferred to the embedded application i e the embedded application will have to release the returned pointer r M MH WW OW CQO ANN scontidential Page 116 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom a Make it wireless O gt amp ADL User Guide for Open AT OS v3 13 API 3 15 7 The adl strGetHesponseExt function This function provides a standard response string from its ID vvith the argument provided e Prototype ascii adl strGetResponseExt adl strID e RspID u32 arg e Parameters RsplD Response ID from which to get the string arg Response argument to copy in the response string according to response ID this argument should be an u32 integer value or an ascii string e Returned values Standard response string on success NULL if the ID does not exist IMPORTANT WARNING The returned pointer memory is allocated by this function but its ownership is transferred to the embedded application i e the embedded application will have to release the returned pointer p M WW OW CQO ANN scontidential Page 117 154 This document is the sole and exclusive property of Wavecom Not to be d
105. erty of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 18 9 The adl portStopSignalPolling function This function stops a running polling process on a required port signal for the provided subscribed handle The associated handler will no longer receive the ADL PORT EVENT XXX STATE CHANGE events related to this signal port The internal polling process cyclic timer will be stopped as soon as the last subscriber to the current running polling process has called this function e Prototype s8 adl portStopSignalPolling u8 Handle adl port e Port adl portSignal e Signal e Parameters Handle Handle previously returned by the adl portSubscribe function Port Port on which the polling process to stop is running Signal Signal on which the polling process to stop is running e Returned values OK on success ADL_RET_ERR_PARAM on parameter error ADL RET ERR UNKNOWN HDL if the provided handle is unknown ADL RET ERR NOT SUBSCRIBED if the service is not subscribed ADL RET ERR BAD STATE if the required port is not opened ADL RET ERR BAD HDL if there is no running polling process for this Handle Port Signal combination 000000 e p SEES TSS WW OW CQO ANN 6confidential Page 145 154 This document is the sole and exclusive property of Wavecom Not to be dist
106. eset the product in order to enable the GPS device internal mode The handler may refuse this reset by returning FALSE If at least one handler refuses the reset the service goes to ADL GPS STATE EXT MODE state The GpsData parameter is set to NULL ADL GPS EVENT EXT MODE If the at least one Handler refused the ADL GPS EVENT RHESETING HARDWARE event the service entered in ADL GPS STATE EXT MODE state and will be available on next product reset The GpsData parameter is set to NULL Handler s returned value is not relevant ADL GPS EVENT IDLE If the service entered the ADL GPS STATE IDLE state the service is ready to read GPS data The GpsData parameter is set to NULL Handler s returned value is not relevant ADL GPS EVENT POLLING DATA Ifa Polling Time was required on subscription The GpsData contains all GPS data read from the GPS device Handler s returned value is not relevant The GpsData parameter is based on the following type typedef struct adl gpsPosition t Position Current GPS position adl gpsSpeed t Speed Current GPS speed adl gpsSatView t SatView Current GPS satellite view adl gpsData t WW OW CQO ANN scontidential Page 134 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wevecom pu Make it wireless ADL User Guide for Open AT
107. esponses To UART 1 port UART 2 E ADL lt gt Open AT app port command esponses stack External app ATH ADL Open AT app channel X eaa command port stack External app Other AT ADL Open AT app ports command responses stacks External app Logical WW OW CO ANN 6confidential Page 35 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom m Make it wireless ADL User Guide for Open AT OS v3 13 API 3 2 Timers 3 2 1 Required Header Files The header file for the functions dealing with timers is adl TimerHandler h 3 2 2 The adl tmrSubscribe function This function starts a timer with an associated callback function The callback function will be executed as soon as the timer expires Note Since the WAVECOM products time granularity is 18 5 ms the 100 ms steps are emulated reaching a value as close as possible to the requested one modulo 18 5 For example if a 20 100ms timer is required the real time value will be 1998 ms 108 18 5ms e Prototype adl tmr t adl tmrSubscribe bool bCyclic u32 TimerValue u8 TimerType adl tmrHandler t Timerhdl e Parameters bCyclic This boolean flag indicates whether the timer is cyclic TRUE or not FALSE The cyclic timer is automatically set up when a cycle is over TimerValue The n
108. evel traces will be displayed on the CUS4 element of the Target Monitoring Tool Trace level range is from 1 to 32 P is the buffer s address to dump Lis the length in bytes of the required dump VW OW CO ANN scontidential Page 43 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wevecom pe Make it wireless ADL User Guide for Open AT OS v3 13 API Since the maximum length of a display line is 255 bytes if the display length is greater than 80 each byte is displayed on 3 ascii characters the dump will be segmented on several lines Each 80 bytes truncated line will end with the character sequence Example 1 u8 Buffer x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 DUMP 1 Buffer 10 At runtime this will display the following string on the CUS4 level 1 on the Target Monitoring Tool 00 01 02 03 04 05 06 07 08 09 Example 2 u8 Buffer 200 i for i120 i lt 200 i Buffer i i DUMP 1 Buffer 200 At runtime this will display the following three lines on the CUS4 level 1 on the Target Monitoring Tool 00 01 02 03 04 05 06 07 08 09 OA bytes from 0B to 4D 4E AF 50 51 52 53 54 55 56 57 58 59 5A bytes from 5B to 9D 9E OF AO Al A2 A3 A4 A5 A6 A7 bytes from A8 to C4 C5 C6 C7 In this Deb
109. event will be received by the control handler Mode Mode used for SMS reception from the following values ADL SMS MODE PDU SmsHandler will be called in PDU mode on each SMS reception ADL SMS MODE TEXT SmsHandler will be called in Text mode on each SMS reception e Returned values o On success this function returns a positive or null handle requested for further SMS sending operations o ADL_RET_ERR_PARAM if a parameter has a wrong value e M HH WW OW CQO ANN scontidential Page 89 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 11 3 The adi smsSend function This function sends a SMS to the network e Prototype s8 adl smsSend u8 Handle ascii SmsTel ascii SmsText u8 Mode e Parameters Handle Handle returned by adl smsSubscribe function SmsTel Telephone number to which the SMS is to be sent in text mode or NULL in PDU mode SmsText SMS text in text mode or SMS PDU in PDU mode Mode Mode used for SMS sending from the following values ADL SMS MODE PDU to send a SMS in PDU mode ADL SMS MODE TEXT to send a SMS in Text mode e Returned values o This function returns OK on success ADL_RET_ERR_PARAM if a parameter has a wrong value ADL_RET_E
110. ewe VEVGPRRERQ ERREUR EE Taaa 48 3 5 6 The adl fhWrite function sssssssssssssssse I Ime meme eme eter 49 3 5 7 The adl flhiRead f rictlOn eiecit ge ries a a IRL Ea REED EE E RUE US 49 3 5 8 The adl flhGetFreeMem function 1 2 0 eee eee eee meme 50 3 5 9 The adl flhGetlDCount function esssssssss Innen 50 3 5 10 The adl_flhGetUsedSize function cee eee memet 51 3 6 FCM Servie isnan ea daa a aa nace kaa Tid ones cad denia need onde eed OTEREN snes sede aes iiini 52 3 6 1 Required Header File teer ree RRRRERAERRAENER RXRARRRGRERRAERGASRRARERARERRERRTERERR4RRUE 53 3 6 2 The adl fcmlIsAvailable function esssssesssss HH meme 54 3 6 3 The adl fcmSubscribe function esssssssssssssses m meme 54 3 6 4 The adl fcmUnsubscribe function Lecce eee m mmn 58 3 6 5 The adl fcmReleaseCredits function sesssssss m 58 3 6 6 The adl fcmSwitchV24State function sessessss m 59 3 6 7 The adl fcmSendDaeta function eee terete m emen 59 3 6 8 The adl fcmSendDataExt function 2 0 eee etree nent mme 61 3 6 9 The adl fcmGetStatus function essssssssssssessesese ee meme 62 calcem UITIUM 63 3 7 1 Required Header File teer oreet exe Ex e RUIN ERE RSU ER PR TERR E n 63 3 7 2 The adl ioSubscribe function i eiie ed e Seed ges RR Y RR EE avus 63 3 7 3 The adl ioUnsubscribe function ssssssssss mme 67 3 7 4 The adl ioRead function sssssss
111. flow no limitation memory allocation size On GPRS flow 1500 bytes On Bluetooth virtual ports 2000 bytes OOo 0 e Returned values o OKon success The Control handler will also receive a ADL FCM EVENT MEM RELEASE event when the data block memory buffer is released o ADL FCM RET OK WAIT RESUME on success but the last credit was used The Control handler will also receive a ADL FCM EVENT MEM RELEASE event when the data block memory buffer is released ADL RET ERR PARAM is a parameter has an incorrect value ADL RET ERR UNKNOWN HDL if the provided handle is unknown ADL RET ERR BAD STATE if the flow is not ready to send data ADL FCM RET ERR WAIT RESUME if the flow has no more credit to use 0000 T WW OW CQO ANN cconfidential Page 61 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wevecom p Make it wireless ADL User Guide for Open AT OS v3 13 API On ADL FCM RET XXX WAIT RESUMIE returned value the subscriber has to wait for an ADL FCM EVENT RESUMIE event on Control Handler to continue sending data Important Remark The Data block will be released by the adl fcmSendDataExt API on OK and ADL FCM RET OK WAIT RESUMIE return values the memory buffer will be effectively released once the ADL FCM EVENT MEM RELEASE event is received in the Control Handler The application has to u
112. hard disk and not from to the module s flash memory The two storage places module and PC may be synchronized using the RTE Monitor interface cf the Tools Manual for more information 3 5 3 The adl flhSubscribe function This function subscribes to a set of objects identified by the given Handle e Prototype s8 adl flhSubscribe ascii Handle u16 NbObjectsRes e Parameters Handle The Handle of the set of objects to subscribe to NbObjectRes The number of objects related to the given handle It means that the IDs available for this handle are in the range O NbObjectRes 1 e Returned values o OK on success first allocation for this handle o ADL RET ERR PARAMI on parameter error o ADL RET ERR ALREADY SUBSCRIBED if space is already created for this handle o ADL FLH RET ERR NO ENOUGH IDS if there are no longer enough object IDs to allocate the handle Notes e Only one subscription is necessary It is not necessary to subscribe to the same handle at each application start e It is not possible to unsubscribe from a handle To release the handle and the associated objects the user must do an AT WOPEN 3 to erase the flash objects of the Open AT Embedded Application MM WW OW CQO ANN scontidential Page 47 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT
113. have to unsubscribe from it to stop the callback function being executed every time the matching unsolicited response is sent from the Wavecom Core Software Multiple subscriptions each unsolicited response may be subscribed several times If an application subscribes to an unsolicited response with handler 1 and then subscribes to the same unsolicited response with handler 2 every time the ADL parser receives this unsolicited response handler 1 and then handler 2 will be executed 3 1 2 1 The adl atUnSoSubscribe function This function subscribes to a specific unsolicited response with an associated callback function when the required unsolicited response is sent from the Wavecom Core Software the callback function will be executed e Prototype s16 adl atUnSoSubscribe ascii UnSostr adl atUnSoHandler t UnSohdl e Parameters UnSostr The name as a string of the unsolicited response we want to subscribe to This parameter can also be set as an adl rsplD e response ID Please refer to 83 15 for more information WW OW CQO ANN scontidential Page 20 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API UnSohdl A handler to the callback function associated to the unsolicited response
114. iber should switch the serial link to data mode with the adl fcmSwitchV24State API or wait for the ADL FCM EVENT V24 DATA MODE EXT event This event will come when the external application sends the ATO command the serial link is switched to data mode and then all V24 clients are notified e When a GSM data call is released from the remote part the GSM flow will automatically be unsubscribed the ADL FCM EVENT FLOVV CLOSED event will be received by all the flow subscribers e When a GPRS session is released or when a GSM data call is released from the module side with the adl callHangUp function the corresponding GSM or GPRS flow have to be unsubscribed These flows will have to be subscribed again before starting up a new GSM data call or anew GPRS session e For serial link flows the serial line parameters speed character framing etc must not be modified while the flow is in data state In order to change these parameters value the flovv concerned has firstly to be switched back in AT mode with the adl fcmSwitchV24State API Once the parameters have changed the flow may be switched again to data mode using the same API M WW OW CQO ANN scontidential Page 57 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom a Make it wireless
115. ibuted or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom ee Make it wireless ADL User Guide for Open AT OS v3 13 API 3 16 6 The adl adEventUnsubscribe function This function allovvs the Open AT application to unsubscribe from the A amp D events notification e Prototype s32 adl adEventUnsubscribe s32 EventHandle e Parameters EventHandle Handle previously returned by the adl adEventSubscribe function e Returned values o OK on success o ADL RET ERR UNKNOWN HDL if the handle is unknown o ADL_RET_ERR_NOT_SUBSCRIBED if no A amp D event handler has been subscribed o ADL_RET_ERR_BAD_STATE if a format or re compaction process is currently running with this event handle 3 16 7 The adl adWrite function This function writes data at the end of the given A amp D cell e Prototype s32 adl_adWrite s32 CellHandle u32 Size void Data e Parameters CellHandle A amp D cell handle returned by adi adSubscribe function Size Data buffer size in bytes Data Data buffer e Returned values o OKon success o ADL RET ERR UNKNOVWN HDL if the handle was not subscribed o ADL RET ERR PARAMI on parameter error o ADL RET ERR BAD STATE if the cell is finalized o ADL AD RET ERR OVERFLOW if the write operation exceeds the cell size I WW OW CQO ANN scontidential Page 122 154 This document is the sole and exclusive property of Wavecom
116. if WIND 9 MO MT ADL CALL EVENT ANSWER OK AUT O Speed OK response after an auto answer to an incoming call ATSO command was set to a non zero value in data call answer case the connection Speed in bps is also provided ADL CALL EVENT RING GPRS O if GPRS phone call WW OW CQO ANN scontidential Page 93 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API Event Call ID Description Type ADL CALL EVENT SETUP FROM EXT f the external application has used CMD Mode the ATD command to set up a call Mode value depends on call type Voice O GSM Data ADL CALL DATA FLAG GPRS session activation binary OH between ADL CALL GPHS FLAG constant and the activated CID According to the notified handlers return values call setup may be launched or not if at least one handler returns the ADL CALL NO FORWARD code or higher the command will reply LCME ERROR 600 to the external application otherwise if all handlers return ADL CALL FORWARD the call setup is launched ADL CALL EVENT CIEV OK response after a call setup was MO performed ADL CALL EVENT SETUP ERROR NO A call setup from embedded or MO SIM O external application
117. ing to its type it may now be used with either the AT Commands service or FCM service ADL PORT EVENT CLOSED Informs the ADL application that the specified Port is now closed It is no longer usable with either the AT Commands service or FCM service ADL PORT EVENT DSR STATE CHANGE Informs the ADL application that the specified Port DSR signal state has changed to the new State value 0 1 This event will be received by all TS SS P WW OW CQO ANN cconfidential Page 140 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API subscribers that have started a polling process on the specified Port DSR signal with the adl portStartSignalPolling function ADL PORT EVENT CTS STATE CHANGE Informs the ADL application that the specified Port CTS signal state has changed to the new State value 0 1 This event will be received by all subscribers that have started a polling process on the specified Port CTS signal with the adl portStartSignalPolling function The handler Port parameter uses the adl port e type described above The handler State parameter is set only for the ADL PORT EVENT XXX STATE CHANGE events e Returned values o A positive or null handle on success o ADL RET ERR PARAMI on parameter error o ADL RET ERR NO MORE
118. ion will alvvays return TRUE on the ADL PORT GPRS BASE port if the GPRS feature is enabled always FALSE otherwise 3 18 7 The adl portGetSignalState function This function returns the required port signal state e Prototype s8 adl portGetSignalState adl port e Port adl portSignal e Signal e Parameters Port Port from which to require the current signal state Only physical output related ports UARTX amp USB ports used as physical ports or with the 27 010 protocol may be used with this function Signal Signal from which to query the current state based on the following type typedef enum ADL PORT SIGNAL CTS ADL PORT SIGNAL DSR ADL PORT SIGNAL LAST adl portSignal e WW OW CQO ANN scontidential Page 142 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wevecom pe Make it wireless ADL User Guide for Open AT OS v3 13 API Signals are detailed below ADL PORT SIGNAL CTS Required port CTS input signal physical pin for a physical port UARTX emulated logical signal for a 27 010 logical port ADL PORT SIGNAL DSR Required port DSR input signal physical pin for a physical port UARTX emulated logical signal for a 27 010 logical port e Returned values o The signal state 0 1 on success o ADL_RET_ERR_PAR
119. is function returns TRUE if the string provided is a valid IP address string and FALSE otherwise NULL amp empty string are not considered as a valid IP address p EE WW OW CQO ANN scontidential Page 107 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 13 12 Example This example simply demonstrates how to use the GPRS service in a nominal case error cases are not handled Full examples using the GPRS service are also available on the SDK Ping GPRS sample Global variables amp constants adl gprsSetupParams t MyGprsSetup adl gprsInfosCid t InfosCid GRPS event Handler s8 MyGprsEventHandler u16 Event u8 CID fie Trace evant TRACE 1 Received GPRS event d d Event CID Switch on event switch Event case ADL GPRS EVENT SETUP OK TRACE 1 PDP Ctxt Cid d Setup OK CID Activate the session adl gprsAct 1 break case ADL GPRS EVENT ACTIVATE OK TRACE 1 PDP Ctxt d Activation OK CID Get context information adl gprsGetCidInformations 1 amp InfosCid De activate the session adl gprsDeAct 1 break case ADL GPRS EVENT DEACTIVATE OK TRACE 1 PDP Ctxt d De
120. istributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 16Application amp Data storage Service This service provides APIs to use the Application amp Data storage volume This volume may be used to store data or dwl files Wavecom OS updates new Open AT applications or E2P configuration files in order to be later installed on the product The default storage size is 768 Kbytes it may be configured with the AT WOPEN command Please refer to the AT commands interface guide for more information This storage size has to be set to the maximum about 1 2 Mbytes in order to have enough place to store a Wavecom OS update Warning any A amp D size change will result in formatting of this area some seconds after start up all A amp D cells data will be erased Legal mention The Download Over The Air feature enables the Wavecom firmware to be remotely updated The downloading and firmware updating processes have to be activated and managed by an appropriate Open AT based application to be developed by the customer The security of the whole process request for update authentication encryption etc has to be managed by the customer under his own responsibility Wavecom shall not be liable for any issue related to any use by customer of the Download Over The Air feature WAVECOM AGREES AND THE CUSTOM
121. ithout a running ADL application When ATQ1 mode is running though terminal responses are not sent to the external application they are always received from the firmware in the embedded application R rr T W vVvecCoOM Confidential Page 18 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM_ASW_OAT_UGD_00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 Description 2 11 Open AT specific AT Commands See document WM ASVW OAT UGD 0OO0O44 AT Commands Interface Guide for Open AT Firmware v6 57c 2 11 1 AT WDWL Command The AT WDWL command is usable to download dwl files trough the serial link using the 1K Xmodem protocol Dwl files may be Wavecom Core software updates Open AT application binaries or E2P configuration files By default this command is not pre parsed it cannot be filtered by the Open AT application except if the Application Safe Mode service is used Note The AT WDWL command is described in the document Ref II 2 11 2 AT WOPEN Command The AT WOPEN command is used to control Open AT applications mode amp parameters Parameters O Stop the application the application will be stopped on all product resets 1 Start the application the application will be started on all product resets 2 Get the Open AT libraries versions 3 Erase the objects flash of
122. l tmrUnSubscribe adl tmr t tim adl tmrHandler t Timerhdl u8 TimerType e Parameters tim The timer we want to unsubscribe to Timerhdl The handler of the callback function associated to the timer Note this parameter is only used to verify the coherence of tim parameter Timerhdl has to be the timer handler used in the subscription procedure For example PhoneTaskTimerPtr adl tmrSubscribe TRUE OneSecond ADL TMR TYPE 100MS PhoneTaskTimer adl tmrUnSubscribe PhoneTaskTimerPtr PhoneTaskTimer ADL TMR TYPE 100MS TimerType Unit of the TimerValue parameter The allovved values are defined below Timer type Timer unit ADL TMR TYPE 100MS TimerValue is in 100 ms steps ADL TMR TYPE TICK TimerValue is in 18 5 ms tick steps e Returned values o ERROR if the timer was not found or could not be stopped o the remaining time of the timer before it expires unit according to the TimerValue parameter o ADL RET ERR BAD HDL if the handler provided is not the timer s handler o ADL RET ERR BAD STATE if the handler has already expired WW OW CQO ANN scontidential Page 37 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 2 4 Example E Oo WoaVvVeCOM Confidential Page 38 15
123. longitude Indicator S INDICATOR E W ascii status S INDICATOR ascii P Fix S INDICATOR ascii sat used S SAT Satellites used ascii HDOP S HDOP Horizontal Dilution of Precision ascii altitude S ALTITUDE MSL Altitude ascii altitude Unit S INDICATOR ascii geoid Sep S GEOID SEP geoid correction ascii geoid Sep Unit S INDICATOR ascii Age Dif Cor S AGE DIF COR Age of Differential correction ascii Dif Ref ID S DIF REF ID Diff Ref station ID ascii magneticVariation S COURSE magnetic variation not available for sirf technology adl gpsPosition t All fields are ascii zero terminated strings containing GPS information 9 E WW OW CQO ANN cconfidential Page 132 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless O gt amp ADL User Guide for Open AT OS v3 13 API 3 17 2 2 Speed GPS Speed data is stored in the following structure typedef struct ascii course _S COURSE Degrees from true North ascii speed knots S SPEED Speed in knots ascii speed km p hour S SPEED Speed in km h adl gpsSpeed t All fields are ascii zero terminated strings containing GPS information 3 17 2 3 Satellite Vievv GPS satellite view data is stored in the following structure typedef struct u8 id range 1 to 32
124. n of end of processing in the GPRS handler before calling this function 3 13 10 The adl gprsUnsubscribe function This function unsubscribes from the GPRS service The handler provided will not receive GPRS events any more e Prototype s8 adl gprsUnsubscribe adl gprsHdlr f Handler e Parameters Handler Handler used with adl gprsSubscribe function e Returned values This function returns OK on success or a negative error value Possible error values are Error value Description ADL_RET_ERR_PARAM in case of parameters error ADL RET ERR UNKNOVVN HDL if the provided handler is unknown ADL RET ERR NOT SUBSCRIBED f the service is not subscribed WW OW CQO ANN scontidential Page 106 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless O gt amp ADL User Guide for Open AT OS v3 13 API 3 13 11 The adl gprslisAniPAddress function This function checks if the provided string is a valid IP address Valid IP address strings are those based on the a b c d format where a b c amp d are integer values between O and 255 e Prototype bool adl gprsIsAnIPAddress ascii AddressStr e Parameters AddressStr IP address string to check e Returned values Th
125. n which the next retrieved backtrace will be copied This parameter may be set to NULL in order to know the required size of the next backtrace buffer Size Backtrace buffer size If this size is not large enough the ADL RET ERR PARAM error code will be returned e Returned values o OK if the next stored backtrace was successfully copied in the BacktraceBuffer parameter o The required size for the next backtrace buffer if the BacktraceBuffer parameter is set to NULL o ADL_RET_ERR_PARAM if the provided Size parameter is not large enough o ADL RET ERR NOT SUBSCRIBED if the adl errStartBacktraceAnalysis function was not called before o ADL RET ERR UNKNOWN HDL if the provided Handle parameter is invalid o ADL RET ERR DONE if the last backtrace buffer has already been retrieved The Handle parameter will novv be unsubscribed and not usable any more with the adl errRetrieveNextBacktrace function A new analysis has to be started with the adi errStartBacktraceAnalysis function e Note Once retrieved the backtrace buffers may be stored separately or concatenated in order to be sent using the application s protocol bearer choice to a remote server or PC Once retrieved as one or several files on a PC this these may be read using the Target Monitoring Tool and the Serial Link Manager in order to decode the backtrace buffer s Please refer to the Tools Manual in order to know how to process these files WW OW CQO AMNN scontide
126. nction This function sends a data block on the requested flow e Prototype s8 adl fcmSendData u8 Handle u8 Data ul6 DataLen e Parameters Handle Handle returned by the adl fcmSubscribe function Data Data block buffer to write DataLen Data block buffer size Maximum data packet size depends on the subscribed flow o On serial link based flows 2000 bytes o On GSM data flow no limitation memory allocation size o On GPRS flow 1500 bytes o On Bluetooth virtual ports 2000 bytes M WW OW CQO ANN Confidential Page 59 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API e Returned values o O 0 0O 0 OK on success The Control handler will also receive a ADL FCM_EVENT_MEM_RELEASE event when the data block memory buffer is released ADL FCM_RET_OK_WAIT_RESUME on success but the last credit was used The Control handler will also receive a ADL FCM EVENT MEM RELEASE event when the data block memory buffer will be released ADL RET ERR PARAMI is a parameter has an incorrect value ADL_ RET_ ERR UNKNOWN HDL if the provided handle is unknown ADL_ RET_ ERR BAD STATE if the flow is not ready to send data ADL_ FCM _ RET_ ERR WAIT RESUME if the
127. nguage have to be sent by the application itself 3 1 3 2 The adl_atSendStdResponse function This function sends the provided standard response to the required port as a response an unsolicited response or an intermediate response according to the requested type e Prototype void adl atSendStdResponse u8 Type adl strID e RspID e Parameters Type Same use as the adl atSendResponse Type parameter RsplD Standard response ID to be sent see 83 15 for more information 3 1 3 3 The adl atSendStdResponseExt function This function sends the provided standard response with an argument to the required port as a response an unsolicited response or an intermediate response according to the requested type e Prototype void adl atSendStdResponseExt u8 Type adl strID e RspID u32 arg e Parameters Type Same use as the adl atSendResponse Type parameter RspIlD Standard response ID to be sent see 83 15 for more information arg Standard response argument According to response ID this argument should be an u32 integer or an ascii string WW OW CQO ANN scontidential Page 24 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 1 3 4 Additional macros for specific port access The above Respo
128. ning the application has to launch the adl adRecompact function before using any other A amp D service function o ADL RET ERR PARAM on parameter error p M WW OW CQO ANN scontidential Page 126 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom exu Make it wireless ADL User Guide for Open AT OS v3 13 API 3 16 14 The adl adGetCellList function This function provides the list of the current allocated cells e Prototype s32 adl adGetCellList wm_lst_t CellList e Parameters CellList Return allocated cell list The list elements are the cell identifiers and are based on u32 type The list is ordered by cell id values from the lowest to the greatest WARNING the list used memory is allocated by the adl adGetCellList function and has to be released by the application e Returned values o OKon success o ADL AD RET ERR NOT AVAILABLE if there is no A amp D space available on the product o ADL RET ERR PARAMI on parameter error Note e The number of elements in the returned list is limited by ADL AD MAX CELL RETRIEVE e f the number of cell IDs to get is superior to ADL AD MAX CELL RETRIEVE use adl adFindlnit and adl adFindNext functions please refer to sections 3 16 16 and 3 16 17 3 16 15 The adi adF
129. nse sending functions may be also used with the macros below which provide the additional Port argument it should avoid heavy code including each time the ADL AT PORT TYPE macro call define adl atSendResponsePort t p r adl atSendResponse ADL AT PORT TYPE p t r define adl atSendStdResponsePort t p r adl atSendStdResponse ADL AT PORT TYPE p t r define adl atSendStdResponseExtPort t p r a adl atSendStdResponseExt ADL AT PORT TYPE p t r a 3 1 4 Incoming AT commands An ADL application may subscribes to an AT command string in order to receive events each time an external application sends this AT command on one of the module s ports Once the application has subscribed to a command it will have to unsubscribe to stop the callback function being executed every time this command is sent by an external application Multiple subscriptions if an application subscribes to a command with a handler and subscribes then to the same command with another handler every time this command is sent by the external application both handlers will be successively executed in the subscription order 3 1 4 1 The adl atCmdSubscribe function This function subscribes to a specific command with an associated callback function so that next time the required command is sent by an external application the callback function will be executed e Prototype s16 adl atCmdSubscribe ascii Cmdstr adl atCmdHandler t
130. ntial Page 48 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wevecom p Make it wireless ADL User Guide for Open AT OS v3 13 API 3 5 6 The adl fhWrite function This function writes the flash object from the given Handle at the given ID for the length provided with the string provided A single flash object can use up to 30 Kbytes of memory e Prototype s8 adl flhWrite ascii Handle ul16 ID ul16 Len u8 WriteData e Parameters Handle The Handle of the subscribed set of objects ID The ID of the flash object to write Len The length of the flash object to write WriteData The string provided to write in the flash object e Returned values o OKon success ADL RET ERR PARAMI if one at least of the parameters has a bad value ADL RET ERR UNKNOVVN HDL if handle is not subscribed ADL FLH RET ERR ID OUT OF RANGE if ID is out of handle range ADL RET ERR FATAL if a fatal error occurred ADL ERR FLH WRITE error event will then occur ADL FLH RET ERR MEM FULL if flash memory is full o ADL FLH RET ERR NO ENOUGH IDS if the object cannot be created due to the global ID number limitation 0000 O 3 5 7 The adl flhnRead function This function reads the flash object from the given Handle at the given ID for the length provided and stores it in a string e Prototype s8 adl
131. ntial Page 85 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 10 SIM Service ADL provides this service to handle SIM and PIN code related events 3 10 1 Required Header File The header file for the SIM related functions is adl sim h 3 10 2 The adl simSubscribe function This function subscribes to the SIM service in order to receive SIM and PIN code related events This will allovv PIN code if provided to be entered if necessary e Prototype void adl simSubscribe adl simHdlr f SimHandler ascii PinCode e Parameters SimHandler SIM handler defined using the following type typedef void adl simHdlr f u8 Event The events received by this handler are defined below Normal events ADL SIM EVENT PIN OK if PIN code is all right ADL SIM EVENT REMOVED if SIM card is removed ADL SIM EVENT INSERTED if SIM card is inserted ADL SIM EVENT FULL INIT when initialization is done Error events ADL SIM EVENT PIN ERROR if given PIN code is wrong ADL SIM EVENT PIN NO ATTEMPT if there is only one attempt left to entered the right PIN code ADL SIM EVENT PIN WAIT if the argument PinCode is set to NULL On the last three events the service is waiting for the external application to enter the PIN code Please note
132. nts should be used also for this parameter If this parameter is set to O all subscribed GPIOs are allocated as outputs If it is set to OxFFFFFFFF all subscribed GPIOs are allocated as inputs Note this parameter is only relevant for GPIOs GPIs are always subscribed as inputs and GPOs are always subscribed as outputs whatever the GpioDir corresponding bit value GpioDefValues Mask of GPIO default values when set as an output For each subscribed output GPIO the corresponding bit in the mask is the default value after allocation O or 1 The GpioMask constants should also be used for this parameter If this parameter is set to O all subscribed output GPIOs are set to O If it is set to OxFFFFFFFF all subscribed output GPIOs are set to 1 PollingTime If some IO is allocated as input this parameter represents the time interval between two GPIO polling operations unit is 100ms If no polling is requested this parameter must be O GpioHandler Handler receiving the status of the GPIOs specified by the mask Must be NULL if no polling is requested The following type is used typedef void adl ioHdlr f u8 GpioHandle u32 GpioState GpioHandle handle on which the polling GPIOs are allocated GpioState mask of read values on polling GPIOs This handler is called every time the GpioState value changes ie one of the allocated GPIOs has changed T WW OW CQO ANN cconfidential Page 66 154 This document is the
133. of the parsed argument if argtype is ADL_STR_ARG_TYPE_ASCII arg is an ascii string if argtype is ADL_STR_ARG TYPE U32 arg is an u32 integer e Returned values o ADL STR NO STRING if the string is unknown o ld of the string otherwise __ WW OW CQO ANN scontidential Page 115 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 15 5 The adl strisTerminalResponse function This function checks whether the response ID provided is a terminal response A terminal response is the last response that a response handler will receive from a sent command e Prototype bool adl strIsTerminalResponse adl strID e RspID e Parameters RsplD Response ID to check e Returned values o TRUE if the provided response ID is a terminal one o FALSE otherwise 3 15 6 The adl strGetHesponse function This function provides the standard response string from its ID e Prototype ascii adl strGetResponse adl strID e RspID e Parameters RsplD Response ID from which to get the string e Returned values o Standard response string on success o NULL if the ID does not exist IMPORTANT WARNING The returned point
134. of the two LSBytes are used the OpcodeLength is the sum of Opcode and Address lengths in bits if OpcodeLength is O nothing is sent if OpcodeLength 9 just Opcode is sent if 8 OpcodeLength 25 Opcode then Address are sent the AddressLength parameter is not used WW OW CQO ANN scontidential Page 77 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wevecom pe Make it wireless ADL User Guide for Open AT OS v3 13 API For Q24X6 Q2400 P32X6 Q24 Classic Q24 Plus Q24 Extended and Q24 Auto products Up to 32 bits can be sent through the Opcode parameter according to the OpcodeLength parameter in bits if OpcodeLength is less than 32 bits only MSBits are used Up to 32 bits can be sent through the Address parameter according to the AddressLength parameter in bits if AddressLength is less than 32 bits only MSBits are used For I2C Soft bus Not used this parameter should be NULL For I2C hard bus Not used this parameter should be NULL For Parallel bus Only the Address parameter is used This parameter is used to set the A2 pin value it can be set to the following values WM BUS PARA ADDRESS A2 SET to set the A2 pin WM BUS PARA ADDRESS A2 RESET to reset the A2 pin DataLen Number of bytes to read from the b
135. ontidential Page 136 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 17 7 The adl gpsGetSpeed function This function gets the current speed read from the GPS device e Prototype s8 adl_gpsGetSpeed u8 Handle adl_gpsSpeed_t Speed e Parameters Handle The handle returned by the adl_gpsSubscribe function Speed Speed data read from the GPS device Please refer to GPS service data structures in 3 17 2 e Returned values o This function returns OK on success o ADL RET ERR NOT SUBSCRIBED if the GPS service was not subscribed o ADL RET ERR UNKNOVWN HDL if the handle provided is not a valid one o ADL RET ERR BAD STATE if the GPS service is out of IDLE state 3 17 8 The adl gpsGetSatView function This function gets the current satellite vievv read from the GPS device e Prototype s8 adl gpsGetSatView u8 Handle adl gpsSatView t SatView e Parameters Handle The handle returned by the adl gpsSubscribe function SatView SatView data read from the GPS device Please refer to GPS service data structures in 8 3 17 2 e Returned values o This function returns OK on success ADL_RET_ERR_NOT_SUBSCRIBED if the GPS service was not subscribed ADL_RET_ERR_UNKNOWN_HDL if the handle provided is not a
136. onversion is required on a year greater or equal to 2070 The adl rtcDiffTime function This function allows the difference between two timestamp structures to be reckoned e Prototype s32 adl rtcDiffTime adl rtcTimeStamp t TimeStampl adl rtcTimeStamp t TimeStamp2 adl rtcTimeStamp t Result e Parameters TimeStamp1 First timestamp TimeStamp2 Second timestamp Result Time difference between the two timestamps provided e Returned values o Oo Oo Oo O on success and if TimeStamp1 equals to TimeStamp2 1 on success and if TimeStamp1 is greater than TimeStamp2 1 on success and if TimeStamp2 is greater than TimeStamp1 ADL_RET_ERR_PARAM if one parameter value is incorrect WW OW CQO ANN scontidential Page 149 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom a Make it wireless ADL User Guide for Open AT OS v3 13 API 3 20 DAC Service 3 20 1 Required Header File The header file for the functions dealing with the DAC interface is adl dac h 3 20 2 The adl dacSubscribe function This function subscribes to one of the module DAC block interfaces e Prototype s32 adl dacSubscribe adl dacChannel e Channel adl dacParam t Parameters e Parameters Channel The DAC channel identifie
137. or Open AT and certain other trademarks and logos appearing on this document are filed or registered trademarks of Wavecom S A in France or in other countries All other company and or product names mentioned may be filed or registered trademarks of their respective owners Copyright This manual is copyrighted by WAVECOM with all rights reserved No part of this manual may be reproduced in any form without the prior written permission of WAVECOM No patent liability is assumed with respect to the use of the information contained herein i 555566665 WW OW CQO ANN scontidential Page 3 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 Overvievv This user guide describes the Application Development Layer ADL The aim of the Application Development Layer is to ease the development of Open AT embedded applications It applies to revision Open AT OS v3 13 and higher until the next version of this document SS WoaVvVeCOM Confidential Page 4 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 Table of Contents 1 INTRODU
138. ormat function This function allows the A amp D storage volume to be completely re initialized It is allovved only if there are currently no subscribed cells or if there is no currently running re compaction or format process Important warning All the A amp D storage cells will be erased by this operation The A amp D storage format process may take up to several seconds e Prototype s32 adl adFormat s32 EventHandle e Parameters EventHandle Event handle previously returned by the adl adEventSubscribe function The associated handler will receive the format process events sequence e W vVvecCoOM Confidential Page 127 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM_ASW_OAT_UGD_00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API e Returned values o OK on success Event handlers will receive the following event sequence e ADL AD EVENT FORMAT INIT just after the process is launched e ADL AD EVENT FORMAT PROGRESS several times indicating process progression e ADL AD EVENT FORMAT DONE once the process is complete ADL RET ERR UNKNOWN HDL if the handle is unknown ADL RET ERR NOT SUBSCRIBED if no A amp D event handler has been subscribed o ADL AD RET ERR NOT AVAILABLE if there is no A amp D space available on the product o ADL RET ERR BAD STATE if there is at least one currently s
139. ossible return values for this handler are defined below Event Description ADL GPRS FORWARD the event shall be sent to the external application On unsolicited events these will be forwarded to all opened ports On responses events these will be forwarded only on the port on which the request was executed ADL GPRS NO FORWARD the event shall not be sent to the external application ADL GPRS NO FORWARD ATH the event shall not be sent to the external application and the application shall terminate the incoming activation request by sending an ATH command ADL GPRS NO FORWARD ATA the event shall not be sent to the external application and the application shall accept the incoming activation request by sending an ATA command e Returned values for adl gprsSubscribe This function returns OK on success or a negative error value M M M VW oOWV eCQO ANN scontidential Page 100 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wevecom p Make it wireless ADL User Guide for Open AT OS v3 13 API Possible error values are Error value Description ADL RET ERR PARAM In case of parameter error 3 13 3 The adl gprsSetup function This function just runs the adl gprsSetupExt one on the
140. perty of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 3 3 2 The adl memGetType function DEPRECATED esses 39 3 3 3 The adl memGetlnfo function ete eee m mme meme men 40 3 3 4 The adl mierriGet FUNCION sss rione Pig ee EROR Pe E ERUR XRAER RACER ER REGEM RREA SR A EF unas 41 3 3 5 The adl memhRelease fUNCTION 0 cece eee erent e Im e nmn 42 3 3 1 i jaujol Me PE 42 3 4 Debug traces ze peo ExRARRNA ERRERKRR rakne eka na oaiae E RXREOER o ANa XRRRRKR ER riaa anes enon 43 3 4 1 Required Header File 0ccec cece e cece eee ss esee e she essen 43 3 4 2 Debug configuration cece cece eee ee eee nee se eme enne he she essen nnns 43 3 4 3 Full Debug configuration ssssssssssssssssssssse se esses sse sse ee sese nnns 44 3 4 4 Release configuration ceres eres rex red ra pee ERR ERR ERER ER e FREE VERE ER ENE ARR ERA REA 45 3 5 IASI MEETS 46 3 5 1 Required Header Elle ient rore tu eh ew each di eril h ek FREU eh RI a RR 46 3 5 2 Flash Objects Management ssssssssssssssssssssse sese senes nnns nnns 46 3 5 3 The adl flhSubscribe function esssssssssss Hn 47 3 5 4 The adl fh Exist function ueri ren eec need dane cede cues cada e d ie da nde RE e a d ene 48 3 5 5 The adl flhErase function ueri eee o be HX RR
141. pplication O VW OW CQO ANN scontidential Page 11 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wevecom ees Make it wireless ADL User Guide for Open AT OS v3 13 Introduction Target Monitoring Tool Set of utilities used to monitor a Wavecom product Receive command pre Process for intercepting AT responses parsing Send command Process for intercepting AT commands pre parsing Standard API Standard set of C functions Wavecom library Library delivered by VVavecom to interface Embedded Application sources with Wavecom Core Software functions Wavecom Core Software Set of GSM and open functions supplied to the User 1 4 Abbreviations A amp D Application amp Data ADL Application Development Layer API Application Programming Interface APN Access Point Name CID Context identifier CPU Central Processing Unit DAC Digital Analog Converter GPRS General Packet Radio Service GGSN Gatevvay GPRS Support Node IP Internet Protocol IR Infrared KB Kilobyte MS Mobile Station OS Operating System PDU Protocol Data Unit PDP Packet Data Protocol RAM Random Access Memory ROM Read Only Memory RTK Real Time Kernel SDK Software Development Kit SMA Small Adapter SMS Short Message Services WAP Wireless Application Protocol wavecon Confidential Page 1
142. r WDWL command subscription This command is at least subscribed in ACTION and READ mode Please see adl atCmdSubscribe API for more details on these options WOPENopt Additionnal options for VWWOPEN command subscription This command is at least subscribed in READ TEST and PARAM mode with at least one mandatory parameter Please see adl atCmdSubscribe API for more details on these options SafeHandler Application safe mode handler defined using the following type typedef bool adl safeHdlr f adl safeCmdType e CmdType adl atCmdPreParser t paras M WW OW CQO ANN scontidential Page 110 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API The CmdType events received by this handler are defined below typedef enum ADL SAFE CMD WDWL AT WDWL command ADL SAFE CMD WDWL READ AT WDWL command ADL SAFE CMD WDWL OTHER WDWL other syntax ADL SAFE CMD WOPEN STOP AT WOPEN 0 command ADL SAFE CMD WOPEN START AT WOPEN 1 command ADL SAFE CMD WOPEN GET VERSION AT WOPEN 2 command ADL SAFE CMD WOPEN ERASE OBJ AT WOPEN 3 command ADL SAFE CMD WOPEN ERASE APP AT WOPEN 4 command ADL SAFE CMD WOPEN SUSPEND APP AT WOPEN 5 command ADL SAF
143. r b stored in the second least significant byte as in OxOObO only if the ADL CMD TYPE PARA type is required A combination of the available types in C language the following Command type Value Meaning ADL CMD TYPE PARA OxO100 AT cmd x y is allowed The execution of the callback function also depends on whether the number of argument is valid or not ADL_CMD_TYPE_TEST Ox0O200 AT cmd is allowed ADL CMD TYPE READ OxO400 AT cmd is allowed ADL_CMD_TYPE_ACT OxO800 AT cmd is allowed ADL CMD TYPE ROOT Ox1000 All commands starting with the subscribed string are allovved The handler will only receive the whole AT string no parameters detection For example if the at string is subscribed all at cmd1 at cmd2 etc strings will be received by the handler but the only string at is not received Incoming commands which are matching with these options combinations will lead to the callback function execution If options do not match the command will be forwarded to be processed by the Wavecom Core Software e Returned values OK ERROR if an error occurred e Important note about incoming concatenated command ADL is able to recognize and process concatenated commands coming from external applications Please refer to AT Commands Interface Guide for more information on concatenated commands syntax In this case this port enters a specific con
144. r Guide for Open AT OS v3 13 API 3 7 6 The adl io GetProductType function This function returns the product type e Prototype adl ioProductTypes e adl ioGetProductType void e Returned values This function returns the product type with the following defined values ADL_IO_PRODUCT_TYPE_Q24X3 for Q23X3 and Q24X3 products ADL IO PRODUCT TYPE Q24X6 ADL IO PRODUCT TYPE P32X3 for P31X3 and P32X3 products ADL IO PRODUCT TYPE P32X6 ADL IO PRODUCT TYPE Q31X6 ADL IO PRODUCT TYPE P5186 ADL IO PRODUCT TYPE Q24XO ADL IO PRODUCT TYPE Q25X1 ADL IO PRODUCT TYPE O24CLASSIC ADL IO PRODUCT TYPE Q24PLUS ADL IO PRODUCT TYPE QO24AUTO ADL IO PRODUCT TYPE QO24EXTENDED e M WW OW CQO ANN scontidential Page 69 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom E Make it wireless O gt amp 2 amp ADL User Guide for Open AT OS v3 13 API 3 8 Bus Service ADL provides a bus service to handle all SPI I2C soft I2C hard and Parallel bus operations Note for bus management operations the Q25x1 series module behaves as Q2406 modules 3 8 1 Required Header File The header file for the bus functions is adl bus h 3 8 2 The adl busSubscribe function This function subscribes to a specific bus type e Prototype s8 adl_busSubscribe u32 BusAddress u32 Param
145. r to be subscribed using the type below typedef enum t ADL DAC CHANNEL 1 ADL DAC NUMBER OF CHANNEL ADL DAC CHANNEL PAD Ox 7fffffff adl dacChannel e Channel identifiers depend on the current module type please refer to the module Product Technical Specification document for more information Module type Channel Output DAC PIN Output DAC PIN identifier name number Q2501 ADL DAC CHANNEL 1 AUXDAC 31 Parameters DAC channel initialization parameters using the type below typedef struct u32 InitialValue adi dacParam t InitialValue Initial value to be written on the DAC just after this has been opened Significant bits and output voltage depends on the module type please refer to the module Product Technical Specification document for more information Module type Significant bits Max output voltage Q2501 8 less significant bits 2 64 V for OxFF value M WW OW CQO ANN scontidential Page 150 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wevecom pe Make it wireless ADL User Guide for Open AT OS v3 13 API e Returned values A positive or null value on success DAC service handle to be used with further DAC service functions calls A negative error value otherwise ADL RET ERR ALREADY SUBSCRIBED if the required ch
146. red with each item of this list For each matching response the callback function is called the other responses are processed as required by the RspFlag parameter Note that the last element of the list must be NULL If the list is set to only 2 elements and NULL vvhen the command will be sent all the responses and intermediate responses received by the ADL parser will execute the callback function until a terminal response is received by the ADL parser The elements of this response list can also be set as an adl rsp ID e response ID Please refer to 83 15 for more information r WW OW CO ANN scontidential Page 31 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API e Returned values o OK on success the command will be executed on the required port as soon as possible o ADL RET ERR PARAM on parameter error NULL command string or al command required this command cannot be used with the adl_atCmdCreate function o ADL RET ERR UNKNOWN HDL if the required port is not available e Note 1 This function can be associated with the adl atCmdSubscribe one for filtering or spying any intermediate response or response of a specific command send by the external application See the example below
147. responding event indication of end of processing in the GPRS handler before calling this function Important Note This function must be called before opening the GPRS FCM Flows WW OW CQO ANN scontidential Page 103 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 13 7 The adl gprsDeact function This function just runs the adl gprsDeactExt one on the ADL PORT OPEN AT VIRTUAL BASE port cf adl gprsDeactExt description for more information Please note that events generated by the adl gprsDeact will not be able to be forwarded to any external port since the setup command was running on the Open AT port 3 13 8 The adl gprsDeactExt function This function deactivates a specific PDP context identified by its Cid e Prototype s8 adl gprsDeactExt u8 Cid adl port e Port e Parameters Cid The Cid of the PDP context to deactivate integer value between 1 and 4 Port Port on which to run the PDP context deactivation command When deactivation return events are received in the GPRS event handler if the application requires ADL to forvvard these events they will be forvvarded to this Port parameter value e Returned values This function ret
148. ributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless O gt amp 2 amp ADL User Guide for Open AT OS v3 13 API 3 19 RTC Service ADL provides an RTC service to access to the module s inner RTC and to process time related data 3 19 1 Required Header File The header file for the RTC functions is adl_rtc h 3 19 2 RTC service types 3 19 2 1 The adl rtcTime t structure This type is the used structure by the Wavecom Core Software in order to retrieve the current RTC time This type is defined below typedef struct u8 Year Year Two digits u8 Month Month 1 12 u8 Day Day of the month 1 31 u8 Hour Hour 0 23 u8 Minute Minute 0 59 u8 Second Second 0 59 ul6 SecondFracPart Second fractional part adi rtcTime t Years are cyclically provided on two digits vvithout any century information Second fractional part step is the ADL RTC SECOND FRACPART STEP constant This field s most significant bit is not used values are in the O Ox7FFF range 3 19 2 2 The adl rtcTimeStamp t structure This type may be used in order to perform arithmetic operations on time data it is defined below typedef struct t u32 TimeStamp Seconds elapsed since 1 January 1970 ul6 SecondFracPart Second fractional part adl rtcTimeStamp t The timestamp uses the Unix format seconds elapsed since the
149. s API with NbCredits parameter set to OxFF e Returned values o OK on success o ADL RET ERR UNKNOWN HDL if the provided handle is unknown o ADL RET ERR BAD HDL if the handle is a slave one WW OW CQO ANN scontidential Page 58 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom m Make it wireless ADL User Guide for Open AT OS v3 13 API 3 6 6 The adl fcmSwitchV24State function This function switches a serial link state to AT mode or to Data mode The operation will be effective only when the control event handler has received an ADL FCM EVENT V24 XXX MODE event Only the main handle subscriber can use this API e Prototype s8 adl fcmSwitchV24State u8 Handle u8 V24State e Parameters Handle Handle returned by the adl fcmSubscribe function V24State Serial link state to switch to Allovved values are defined below ADL FCM V24 STATE AT ADL FCM V24 STATE DATA e Returned values o OK on success The Control handler will also receive a ADL FCM EVENT V24 XXX MODE event when the serial link state has changed o ADL RET ERR PARAMI if one parameter has an incorrect value ADL RET ERR UNKNOWN HDL if the provided handle is unknown e ADL_ RET_ ERR_ BAD_HDL if the handle is not the main flow one O 3 6 7 The adl fcmSendData fu
150. se only dynamic allocated buffers with adl memGet function 3 6 9 The adl fcmGetStatus function This function gets the buffer status for requested flow handle in the requested way e Prototype s8 adl fcmGetStatus u8 Handle adl fcmWay e Way e Parameters Handle Handle returned by the adl fcmSubscribe function Way As flows have two ways from Embedded application and to Embedded application this parameter specifies the direction or vvay from which the buffer status is requested The possible values are typedef enum ADL FCM WAY FROM EMBEDDED ADL FCM WAY TO EMBEDDED adl fcmWay e e Returned values o ADL FCM RET BUFFER EMPTY f the requested flow and way buffer is empty o ADL FCM RET BUFFER NOT EMIPTY f the requested flow and way buffer is not empty the Flow Control Manager is still processing data on this flow o ADL RET ERR UNKNOWN HDL f the provided handle is unknown o ADL RET ERR PARAMI f the way parameter value in out of range WW OW CQO ANN scontidential Page 62 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wevecom p Make it wireless ADL User Guide for Open AT OS v3 13 API 3 7 GPIO Service ADL provides a GPIO service to handle GPIO operations 3 7 1 Required Header File The header file for the G
151. se see 8 Description in the Open AT Basic Development Guide Important note Please keep in mind that the adl main function is NOT like a standard C main function since the application does not end as soon as adl main returns An Open AT application is stopped only if the AT WOPEN 0 command is used The adl main function is just the application entry point and has to subscribe to some services and events to go further Moreover since the whole software is protected by a watchdog mechanism the application cannot use infinite loops otherwise the module will reset after an 8 second security delay WW OW CO ANN scontidential Page 14 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 Description 2 3 Imported APIs from Open AT library The following APIs can be used as in Open AT standard applications The required headers are already included in the global ADL header file The APIs available in this vay are listed below e Standard API defined in wm stdio h file e List API defined in wm list h file e Sound API defined in wm snd h file Please refer to Open AT Basic Development Guide for a description of these APIs 2 4 ADL limitations e Concatenated commands for example AT CREG CGMR may be used from
152. service error codes Error codes Error code Error value ADL_FLH_RET_ERR_OBJ_NOT_EXIST ADL_RET_ERR_SPECIFIC_BASE ADL FLH RET ERR MEM FULL ADL RET ERR SPECIFIC BASE 1 ADL FLH RET ERR NO ENOUGH IDS ADL RET ERR SPECIFIC BASE 2 ADL FLH RET ERR ID OUT OF RANGE ADL RET ERR SPECIFIC BASE 3 4 4 Specific GPRS service error codes Error code Error value ADL GPRS CID NOT DEFINED 3 ADL NO GPRS SERVICE 4 ADL CID NOT EXIST 5 4 5 Specific GPS service error codes Error code Error value ADL GPS RET ERR NO Q25 PRODUCT ADL RET ERR SPECIFIC BASE 4 6 Specific A amp D storage service error codes Error code Error value ADL AD RET ERR NOT AVAILABLE ADL RET ERR SPECIFIC BASE ADL AD RET ERR OVERFLOW ADL RET ERR SPECIFIC BASE 1 ADL AD RET ERROR ADL RET ERR SPECIFIC BASE 2 ADL AD RET ERR NEED RECOMPACT ADL RET ERR SPECIFIC BASE 3 o M WW OW CQO ANN scontidential Page 154 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 vwWovVecoAV Make it wireless WAVECOM S A 3 esplanade du Foncet 92442 Issy les Moulineaux Cedex France Tel 33 0 1 46 29 08 00 Fax 33 0 1 46 29 08 08 Wavecom Inc
153. sssssssessssessess ene me memes mem eee 68 3 7 5 The adl ioWrite FUNCION 1 ecrire rar re ai onde nae cad cary VAR ante teed au d a a 68 3 7 6 The adl io GetProductType fUNCTION 0 ccc eee eee eee lessen 69 3 8 zISSerjauie v cabelas ietoetn state dealin E nines nee A ets 70 3 8 1 Required Header File ccc cnn tte oie etnies e V EVER MNT ERPRS UMP DEP TERRE 70 3 8 2 The adl busSubscribe function ssssssssssssssss meme 70 3 8 3 The adl busUnsubscribe function ssssssssss teeta eee ea ene ea nies 76 3 8 4 The adl busRead function ccc eee eee III meme meme mener 77 3 8 5 The adl b sWrite FUNCTION ri nee card snm n n d deere eden Hn FR a gu d Ra 78 3 9 Errors management 2 00 cece eee eee eee he e hr ee hn a hne hne retenir 81 3 9 1 Required Header Ee xsecietetxtc eei Ei EDEREVIEE ERA IRE a ENIM AE EMI LEER 81 3 9 2 The adl errSubscribe function eesesssesssssseseeee e meme 81 3 9 3 The adl errUnsubscribe function esssssssssssse IH 82 wavecon Confidential Page 6 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless 3 9 4 The adl errHalt function sssssssssesssssssesseseee ne meme emen meme meme 83 3 9 5 The adl errEraseAllBacktraces function essssssss eee tae tants 83 3 9 6 Th
154. strGetResponseExt function 0 cece eee eee eee e teeta eee 117 3 16 Application amp Data storage ServiCe c cece cece cece eee ence eee seen aetna eeneeeneenaeenanes 118 3 16 1 Required Header File c cece cece cece eee eee eee eee ee esse ense enhn 118 3 16 2 The adl adSubscribe function cece eee me me mene 118 3 16 3 The adl adUnsubscribe function sessssssss mn 119 3 16 4 The adl adEventSubscribe fun ction cece eee eee eee eee 120 3 16 5 The adl adEventHdlr f call back type eect eee eee teen eee eee eaeies 120 3 16 6 The adl adEventUnsubscribe function esses 122 3 16 7 The adl adWrite function sssssssssssssssssse III eme meme mener 122 3 16 9 The adl adlnfo function cei ere eee iet te decas et Ra ERE LER a E dA ER ERE IEEE 123 3 16 9 The adl adFinalise function sess e meme emen 123 3 16 10 The adl adDelete function ieee cette eee eee erent EPa EWEN EN 124 3 16 11 The adl adilnstall function 0 0 ee erent eet nett etna eee 124 3 16 12 The adl_adRecompact function cee tetera e meme 125 3 16 13 The adl adGetState function cece eee eee eee erent nent nent emen 126 3 16 14 The adl_adGetCellList function cee II 127 3 16 15 The adl adFormat fUNction cece eee eet nett ene t enm 127 9 16 16 Exam plesccisieccnciccnttiedeatiede EE E EE EEEE ed cu epoutVidek EE EEEE EEE 128 CAE Cl e ae E T TA
155. string o HeaderCompression PDP header compression option enabled if set to TRUE o DataCompression PDP data compression option enabled if set to TRUE Port Port on which to run the PDP context setup command VVhen setup return events are received in the GPRS event handler if the application requires ADL to forward these events they will be forwarded to this Port parameter value e Returned values This function returns OK on success or a negative error value Possible error values are Error value Description ADL_RET_ERR_PARAM In case of parameter error bad Cid value or unavailable port ADL RET ERR PIN KO If the PIN is not entered or if the WIND 4 indication has not occurred yet ADL GPRS CID NOT DEFINED in case of problem to set up the Cid the CID is already activated ADL NO GPRS SERVICE f the GPHS service is not supported by the product ADL RET ERR BAD STATE The service is still processing another GPRS API application should wait for the corresponding event indication of end of processing in the GPRS handler before calling this function 3 13 5 The adl gprsAct function This function just runs the adi gprsActExt one on the ADL PORT OPEN AT VIRTUAL BASE port cf adl gprsActExt description for more information Please note that events generated by the ad1 gprsAct will not be able to be forwarded to any external port since the setup command was running on the Open AT port
156. t adl flhDelete X adl fin Write X e The flash object driver checks if there is enough place to store the new object If not a Garbage Collector process is performed see below e The new object is created About the erase process each time the adl flhDelete or adl flh Write function is called on an ID this object is from this time considered as erased even if it is not physically erased an inner erase flag is set on this object Objects are physically erased only vvhen the Garbage Collector process is performed when an adl flh Write function call needs a size bigger than the available place in the flash objects storage place The Garbage Collector process erases the flash objects storage place and re write only the objects vvhich do not have their erase flag set Please note that the flash memory physical limitation is the erasure cycle number which is granted to be at least 100 000 times WW OW CO ANN scontidential Page 46 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 5 2 2 Flash objects in Remote Task Environment When an application is running in Remote Task Environment the flash object storage place is emulated on the PC side objects are read written from to files on the PC
157. t prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API A specific port state may be known using the ADL AT FCM port service Prototype s8 adl fcmSubscribe adl fcmFlow e Flow adl fcmCtrlHdlr f CtrlHandler adl fcmDataHdlr f DataHandler Parameters Flow The allowed values are the available ports of the adl port e type Only ports with the FCM capability may be used with this service i e all ports except the ADL PORT OPEN AT VIRTUAL BASE and not SPP ADL PORT BLUETOOTH VIRTUAL BASE based ones Please note that adl fcmFlow e type is the same as the adl port e except for the fact that it may handle some additional FCM specific flags see below Previous version FCM flows identifiers have been kept for upward compatibility Hovvever these constants should be considered as deprecated and the adl port e type members should now be used instead define ADL FCM FLOW V24 UART1 ADL PORT UART1 define ADL FCM FLOW V24 UART2 ADL PORT UART2 define ADL FCM FLOW V24 USB ADL PORT USB define ADL FCM FLOW GSM DATA ADL PORT GSM BASE define ADL FCM FLOW GPRS ADL PORT GPRS BASE To perform a slave subscription see above a bit wise or has to be done with the flow ID and the ADL FCM FLOW SLAVE flag for example adl fcmSubscribe ADL PORT UART1 ADL FCM FLOW SLAVE MyCtrlHandler MyDataHandler CtrlHandler FCM control even
158. t order ADL BUS PARA DATA REVERSE ORDER to send data on reverse order rt WW OW CQO ANN scontidential Page 74 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API o LCD_EN signal polarity only for LCD_EN chip select ADL BUS PARA LCDEN POL LOW data is sampled on the rising edge from low state to high state of LCD EN ADL BUS PARA LCDEN POL HIGH data is sampled on the falling edge from high state to low state of LCD EN o LCD EN Address Setup Time only for LCD EN chip select This is the time interval betvveen the setting of an address for the Parallel bus and the activation of the LCD EN pin It is the T1 time in the figure below The allowed values are from O to 31 using bits O to 4 The resulting time interval is For P32X3 product X 38 5 ns For P32X6 product 1 2X 19 ns Write access DATATA 2 ERE s F RDB l Read access DATA 7 0 Data sampling Figure 4 LCD EN Address Setup chronogram o LCD EN Signal Pulse Duration only for LCD EN chip select This is the time interval during which the LCD EN pin is valid It is the T2 time in the figure above The allovved values are from O to 31 using bits 5 to 10 The resulting time interval is For P32X3 product X 1 5 38 5 ns
159. ters Cid The Cid of the PDP context integer value between 1 and 4 Infos Structure containing the information of the activated PDP context using the following type typedef struct u32 LocalIP Local IP address of the MS u32 DNS1 First DNS IP address u32 DNS2 Second DNS IP address u32 Gateway Gateway IP address adl gprsInfosCid t This parameter fields will be set only if the GPRS session is activated otherwise they all will be set to O WW OW CQO ANN scontidential Page 105 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API e Returned values This function returns OK on success or a negative error value Possible error values are Error value Description ADL_RET_ERR_PARAM in case of parameters error bad Cid value ADL_RET_ERR_PIN_KO If the PIN is not entered or if the WIND 4 indication has not occurred yet ADL GPRS CID NOT DEFINED n case of problem to set up the Cid the CID is already activated ADL NO GPRS SERVICE f the GPHS service is not supported by the product ADL RET ERR BAD STATE The service is still processing another GPRS API application should wait for the corresponding event indicatio
160. text mode or the PDU length in PDU mode SmsText contains the SMS text in text mode or the SMS PDU in PDU mode This handler returns TRUE if the SMS must be forvvarded to the external application it is then stored in SIM memory and the external application is then notified by a CMITI unsolicited indication It returns FALSE if the SMS should not be forvvarded If the SMS service is subscribed several times a received SMS will be forwarded to the external application only if each of the handlers return TRUE e 5559555555656 WW OW CQO ANN scontidential Page 88 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API SmsCtrlHandler SMS event handler defined using the following type typedef void adl smsCtrlHdlr f u8 Event ul6 Nb This handler is notified by the following events during an SMS sending process ADL SMS EVENT SENDING OK the SMS was sent successfully Nb parameter value is not relevant ADL SMS EVENT SENDING ERROR An error occurred during SMS sending Nb parameter contains the error number according to CMS ERROR value cf AT Commands Interface Guide ADL SMS EVENT SENDING MR the SMS was sent successfully Nb parameter contains the sent Message Reference value A ADL SMS EVENT SENDING OK
161. the adl fcmSwitchV24State function The 2 switch on the figure above means that either the GSM CSD port or the GPRS port may be subscribed at one time but not both together Important note GPRS provides only packet mode transmission This means that the embedded application can only send receive IP packets to from the GPRS flow 3 6 1 Required Header File The header file for the FCM functions is adl fcm h o WW OW CQO ANN scontidential Page 53 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM_ASW_OAT_UGD_00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 6 2 The adl fcmisAvailable function This function is used to check if the required port is available and ready to handle the FCM service e Prototype bool adl fcmIsAvailable adl fcmFlow e Flow e Parameters Flow Port from which to require the state e Returned values o TRUE if the port is ready to handle the FCM service o FALSE if it is not ready e Notes All ports should be available for the FCM service except o The Open AT virtual one which is only usable for AT commands o The Bluetooth virtual ones with enabled profiles other than the SPP one o l fthe port is already used to handle a feature required by an external application through the AT commands
162. the A2 pin VM BUS PARA ADDRESS A2 RESET to reset the A2 pin DataLen Number of bytes to write on the bus 2 Data Data buffer to write on the bus e Returned values OK on success ADL RET ERR UNKNOVVN HDL if the handle provided is unknown ADL RET ERR PARAM if a parameter has an incorrect value For other negative errors please refer to the BUS API chapter of the Open AT Basic Development Guide i MM Hr WW OW CQO ANN scontidential Page 80 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 9 Errors management 3 9 1 Required Header File The header file for the error functions is adl errors h 3 9 2 The adl errSubscribe function This function subscribes to the managemant service and gives an error handler this allows the application to handle errors generated by ADL or by the adl errHalt function Errors generated by the Wavecom Core Software cannot be handled by such an error handler e Prototype s8 adl errSubscribe adl errHdlr f Handler e Parameters Handler Error Handler defined on following type typedef bool adl errHdlr f ul6 ErrorID ascii ErrorStr An error is described by an Id and a string associated text that are sent as parameters to the adl err
163. the Open AT Embedded Application allowed only if the application is stopped 4 Erase the Open AT Embedded Application allowed only if the application is stopped 5 Suspend the Open AT application until the AT VVOPENRES command is used or an hardware interruption occurs 6 Configures the Application amp Data storage place and Open AT application place sizes Note Refer to the document Ref II for more information about this command By default this command is not pre parsed it cannot be filtered by the Open AT application except if the Application Safe Mode service is used WW OW CQO ANN scontidential Page 19 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 API 3 1 Commands 3 1 1 Required Header File The header file for the functions dealing with AT commands is adl at h 3 1 2 Unsolicited Responses An unsolicited response is a string sent by the Wavecom Core Software to applications in order to provide them with unsolicited event information ie not in response to an AT command ADL applications may subscribe to an unsolicited response in order to receive the event in the handler provided Once an application has subscribed to an unsolicited response it will
164. to open close such a virtual port e ADL PORT GSM BASE Virtual Port ID for GSM CSD data call flow ONLY USABLE WITH THE FCM SERVICE Please note that this port will be considered as always available no OPEN CLOSE events for this port adl portlsAvailable function will always return TRUE e ADL PORT GPRS BASE Virtual Port ID for GPHS data session flow ONLY USABLE WITH THE FCM SERVICE Please note that this port will be considered as always available no OPEN CLOSE events for this port adl portlsAvailable function will always return TRUE if the GPRS feature is supported on the current product e ADL PORT OPEN AT VIRTUAL BASE Base ID for AT commands contexts dedicated to Open AT applications ONLY USABLE WITH THE AT COMMANDS SERVICE This port is always available and is opened immediately at the product s start up This is the default port on which the AT commands sent by the AT Command service are executed 3 18 3 Ports test macros Some ports amp events test macros are provided These macros are defined below e ADL PORT IS A SIGNAL CHANGE EVENT e Returns TRUE if the event e is a signal change one FALSE otherwise e ADL PORT GET PHYSICAL BASE port Extracts the physical port identifier part of the port provided P B WW OW CQO ANN scontidential Page 139 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW
165. ts handler using the following type typedef bool adl_fcmCtrlHdlr_f adl fcmEvent e event The FCM control events are defined below All handlers related to the concerned flow master and slaves will be notified together with these events o ADL FCM EVENT _FLOW_OPENNED related to adl fcmSubscribe ADL FCM EVENT FLOVV CLOSED related to adl fcmUnsubscribe ADL FCM EVENT V24 DATA MODE related to adl fcmSwitchV24State ADL FCM EVENT V24 DATA MODE EXT see note below ADL FCM EVENT V24 AT MODE related to adl fcmSwitchV24State ADL FCM EVENT V24 AT MODE EXT see note below ADL FCM EVENT RESUMIE related to adl fcmSendData and adl fcmSendDataExt o ADL FCM EVENT MEM RELEASE related to adl fcmSendData and adl fcmSendDataExt 000000 2252S WW OW CQO ANN cconfidential Page 55 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API This handler return value is not relevant except for ADL FCM EVENT V24 AT MODE EXT DataHandler FCM data events handler using the following type typedef bool adl fcmDataHdlr f u16 DataLen u8 Data This handler receives data blocks from the associated flow Once the data block is processed the handler must return TRUE to release the credit or FALSE if the credit must not
166. type s16 adl atCmdUnSubscribe ascii Cmdstr adl atCmdHandler t Cmdhdl e Parameters Cmastr The string name of the command we want to unsubscribe from Cmdhdl The handler of the callback function associated to the command e Returned values OK if the command was found ERROR otherwise S WW OW CQO ANN scontidential Page 28 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 1 4 3 Example callback function void atabc Handler adl atCmdPreParser t paras Unsubscribe therefore the command at abc will only work once adl atCmdUnSubscribe attabc adl atCmdHandler t atabc Handler if paras Type ADL CMD TYPE READ adl atSendResponsePort ADL AT RSP paras gt Port r nhandling attabc r n else if paras gt Type ADL CMD TYPE TEST adl_atSendResponsePort ADL_AT_ RSP paras gt Port r nhandling attabc r n else if paras gt Type ADL CMD TYPE ACT adl atSendResponsePort ADL AT RSP paras Port r nhandling attabc r n else if paras gt Type ADL CMD TYPE PARA ascii buffer 25 wm strcpy buffer r nhandling attabc wm_strcat buffer ADL GET_PARAM paras 0 wm_strcat buffer r n adl_atSendResponsePort ADL AT RSP
167. u8 elevation maximum 90 u32 azimuth range 0 to 359 s8 SNR range 0 to 99 1 when not tracking adl gpsSatellite t All fields are integers containing GPS information about the current satellite typedef struct u8 NB_Msg Number of messages u8 MSG Number Message Number u8 Sat_view Satellites in view adl gpsSatellite t sat NB SAT MAX array for informations about differents satellites adl gpsSatView t The different fields contain information about the current satellite vievv Each satellite s information details are contained in the sat field M M WW OW CQO ANN scontidential Page 133 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom exu Make it wireless ADL User Guide for Open AT OS v3 13 API 3 17 3 The adl gpsSubscribe function This function subscribes to the GPS service in order to receive GPS related events e Prototype s8 adl gpsSubscribe adl gpsHdlr f GpsHandler u32 PollingTime e Parameters GpsHandler GPS events handler defined using the following type typedef bool adl gpsHdlr f adl gpsEvent e Event adl gpsData t GpsData The events received by this handler are defined below ADL GPS EVENT RESETING HARDWARE If the ADL GPS service needs to r
168. ubscribed cell or if a re compaction or format process is already running O O 3 16 16 The adl adFindlnit function e Protoype s32 adl adFindInit u32 MinCellId u32 MaxCellId adl adBrowse t BrowseInfo e Parameters MinCellld Minimum cell value for vvanted cell identifiers MaxCellld Maximum cell value for vvanted cell identifiers Browselnfo Returned browse information to be used with the adl adFindNext function see section 3 16 17 This parameter is based on following type typedef struct u32 hidden 4 memory space necessary for cell information adl_ adBrowse_t e Returned values o OK on success o ADL_AD RET ERR NOT AVAILABLE if A amp D space is not available o ADL RET ERR PARAM on parameter error WW OW CQO ANN scontidential Page 128 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless O gt amp ADL User Guide for Open AT OS v3 13 API 3 16 17 The adl adFindNext function This function performs a cell ID search on the browse informations provided by the adl ad FindInit function e Protoype s32 adl adFindNext adl adBrowse t BrowseInfo u32 CellID e Parameters Browselnfo Browse informations returned by the ad1 adFindInit function CelllD Next found cell ID
169. ug configuration the FULL TRACE and FULL DUMP macros are ignored even if these are used in the application source code they will neither be compiled nor displayed on the Target Monitoring Tool at runtime 3 4 3 Full Debug configuration When the Full Debug configuration is selected in the IDE used or with the wmmake command the DEBUG APP and DEBUG FULL compilation flags are both defined and also the follovving macros e TRACE u8 TL ascii T Cf the Debug configuration e DUMP u8 TL u8 P ul6 L Cf the Debug configuration e FULL_TRACE u8 TL ascii T Works exactly as the TRACE macro e FULL_ DUMP u8 TL u8 P ul6 L Works exactly as the DUMP macro r Tr WW OW CO ANN scontidential Page 44 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API 3 4 4 Release configuration When the Release configuration is selected in the used IDE or with the wmmake command neither the DEBUG APP nor DEBUG FULL compilation flags are defined In this configuration the TRACE DUMP FULL TRACE and FULL DUMIP macros are ignored even if these are used in the application source code they will neither be compiled nor displayed on the Target Monitoring Tool at runtime SS M WoaVvVeCOM Confidential Page 4
170. ug traces This service is used to display software trace strings on the Target Monitoring Tool The different vvays to embed these trace strings in an Open AT application depends on the selected configuration in the used IDE or with the wmmake command For more information about the Target Monitoring Tool the configurations and the Integrated Development Environments please refer to the Tools Manual 3 4 1 Required Header File The header file for the flash functions is adl traces h 3 4 2 Debug configuration When the Debug configuration is selected in the used IDE or with the wmmake command the DEBUG APP compilation flag is defined and also the following macros e TRACE u8 TL ascii T Prints a trace in the Target Monitoring Tool TL defines the trace level traces will be displayed on the CUS4 element of the Target Monitoring Tool Trace levels range is from 1 to 32 T is the trace string which may use the standard C sprintf syntax Please note that maximum string length displayed is 256 bytes If the string is longer it will be truncated on display Example u8 I 123 TRACE 1 Value if I d I At runtime this will display the following string on the CUS4 level 1 on the Target Monitoring Tool Value of I 123 e DUMP u8 TL u8 P ul6 L Displays the content each byte in hexadecimal format of the buffer provided in the Target Monitoring Tool TL defines the trace l
171. umber of periods after which the timer expires TimerType dependant TimerType Unit of the TimerValue parameter The allowed values are defined below Timer type Timer unit ADL_TMR_TYPE_100MS TimerValue is in 100 ms steps ADL_TMR_TYPE_TICK TimerValue is in 18 5 ms tick steps Timerhdl The handler of the callback function associated to the timer It is defined following the type below typedef void adl tmrHandler t u8 The argument of the callback function will be the timer ID received by the ADL parser WW OW CO ANN scontidential Page 36 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom as Make it wireless ADL User Guide for Open AT OS v3 13 API e Returned values A pointer to the timer started that will be later used for instance for the un subscription There can only be 32 timers running at the same time if you try to get more this function will return a NULL pointer Note The function will return a NULL pointer if the timer value is zero The timer will not be started 3 2 3 The adl tmrUnSubscribe function This function stops the timer and unsubscribes to it and his handler The call to this function is only meaningful to a cyclic timer or a timer that has not expired yet e Prototype s32 ad
172. urns OK on success or a negative error value Possible error values are Error value Description ADL_RET_ERR_PARAM in case of parameters error bad Cid value or unavailable port ADL_RET_ERR_PIN_KO If the PIN is not entered or if the 4 WIND 4 indication has not occurred yet ADL GPRS CID NOT DEFINED n case of problem to set up the Cid the CID is already activated ADL NO GPRS SERVICE f the GPHS service is not supported by the product ADL RET ERR BAD STATE The service is still processing another GPRS API application should wait for the corresponding event indication of end of processing in the GPRS handler before calling this function VW OW CON scontidential Page 104 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API IMPORTANT NOTE if the GPRS flow is running please do wait for the ADL_FCM_EVENT_FLOW_CLOSED event before calling the adl gprsDeact function in order to prevent module lock 3 13 9 The adl gprsGetCidlnformations function This function gets information about a specific activated PDP context identified by its Cid e Prototype s8 adl_gprsGetCidInformations u8 Cid adl_gprsInfosCid_t Infos e Parame
173. us Data Buffer to which the read bytes are to be copied e Returned values o Oo O Oo OK on success ADL RET ERR UNKNOVVN HDL if the handle provided is unknown ADL RET ERR PARAM if a parameter has an incorrect value For other negative errors please refer to the BUS API chapter of the Open AT Basic Development Guide 3 8 5 The adl busWrite function This function writes on a previously subscribed bus e Prototype s8 adl busWrite u8 Handle adl busAccess t pAccessMode u32 DataLen void Data 9 WW OW CQO ANN scontidential Page 78 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API e Parameters Handle Handle previously returned by adl busSubscribe function pAccessMode Bus access mode defined with the following type typedef struct u32 Address u32 Opcode u8 OpcodeLength u8 AddressLength u8 AccessSize reserved for future products adi busAccess t This parameter is processed differently according to bus type e For SPI bus o For Q24X3 and P32X3 products one byte can be sent via the Opcode parameter only the LSByte is used if OpcodeLength is less than 8 bits only the IVISBits of the LSByte are used two bytes can be sent via the Address parameter
174. vecom p Make it wireless ADL User Guide for Open AT OS v3 13 API e Parameters Handle Handle previously returned by the adl portSubscribe function Port Port on which to run the polling process Only physical output related ports UARTX amp r USB ones used as physical ports or with the 27 010 protocol may be used with this function Signal Signal to monitor during the polling process See the adl portGetSignalState function for information about the available signals PollingTimerType PollingTimerValue parameter value s unit The allowed values are defined below Timer type Timer unit ADL TMR TYPE 100MS PollingTimerValue is in 100 ms steps ADL TMR TYPE TICK PollingTimerValue is in 18 5 ms tick steps This parameter is ignored on additional function calls on the same port PollingTimerValue Polling time interval uses the PollingTimerType parameter s value unit This parameter is ignored on additional function calls on the same port e Returned values OK on success ADL_RET_ERR_PARAM on parameter error ADL_RET_ERR_UNKNOWN_HDL if the provided handle is unknown ADL RET ERR NOT SUBSCRIBED if the service is not subscribed ADL RET ERR BAD STATE if the required port is not opened ADL RET ERR ALREADY SUBSCRIBED if a polling process is already running on another port 000000 e SSCS SEES WW OW CQO ANN 6confidential Page 144 154 This document is the sole and exclusive prop
175. xclusive property of Wavecom Not to be distributed or divulged without prior written agreement Page 73 154 WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API o Chip Select Polarity ADL BUS SPI CS POL LOW for low polarity ADL BUS SPI CS POL HIGH for high polarity o Lsb or Msb first ADL BUS SPI MSB FIRST to send data MSB first ADL BUS SPI LSB FIRST to send data LSB first o QGpio Handling only when an IO is used as Chip Select ADL BUS SPI BYTE HANDLING the IO signal pulse on each data byte ADL BUS SPI FRAME HANDLING the O signal works as a normal chip select For 2C Soft bus o SCL signal GPIO The GPIO index to use to handle the SCL signal shifted to the two MSBytes o SDA signal GPIO The GPIO index to use to handle the SDA signal on the two LSBytes Remark the ADL IO ID U32 TO U16 macro should be used to convert the used GPIO ID to u16 type before calling the API Example Adl busSubscribe ADL BUS TYPE IC2 SOFT ADL IO ID U32 TO U16 MySDAGpio ADL IO ID U32 TO U16 MySCLGpio 16 For I2C Hard bus o CIk Speed The CIk Speed parameter sets the required I2C bus speed Defined values are ADL BUS I2C HARD CLK STD standard I2C bus speed 100 Kbit s ADL BUS I2C HARD CLK FAST fast I2C bus speed 400 Kbit s For Parallel bus o Data Order ADL BUS PARA DATA DIRECT ORDER to send data on direc
176. y subscribed in master mode o ADL RET ERR NOT SUBSCRIBED if a slave subscription is made when master flow is not subscribed o ADL FCM RET ERROR GSM GPRS ALREADY OPENNED if a GSM or GPRS subscription is made when the other one is already subscribed o ADL RET ERR BAD STATE if the required port is not available WW OW CQO ANN scontidential Page 56 154 This document is the sole and exclusive property of Wavecom Not to be distributed or divulged without prior written agreement WM ASW OAT UGD 00006 011 May 3 2007 wavecom Make it wireless ADL User Guide for Open AT OS v3 13 API e Notes e When 7 bits mode is enabled on a v24 serial link in data mode payload data is located on the 7 least significant bits LSB of every byte e When a serial link is in data mode if the external application sends the sequence 1s delay 1s delay this serial link is switched to AT mode and corresponding handler is notified by the ADL FCM EVENT V24 AT MODE EXT event Then the behavior depends on the returned value If it is TRUE all this flow remaining handlers are also notified with this event The main handle cannot be un subscribed in this state If it is FALSE this flow remaining handlers are not notified with this event and this serial link is immediately svvitched back to data mode In the first case after the ADL FCM EVENT V24 AT MODE EXT event the main handle subscr
Download Pdf Manuals
Related Search
Related Contents
Robert Bosch Power Tools Division 70745 Leinfelden TP2000 R EN 140:1998 4Z Input/2 Output Expansion SnapCard Installation Toyota ECO15CG sewing machine 総合実習 - 沖縄県立沖縄水産高等学校 Manuel d`utilisation Cadre photos CP 24 Magnet Manual Cirago IPA3510 mobile device charger 取扱説明書 警告 注意 - 直管型LED照明 TELUMINA-slim Copyright © All rights reserved.
Failed to retrieve file