=============================================================================== W A V E C O M =============================================================================== OPEN AT V1.10 Updated : April 22th, 2002 =============================================================================== (To print this file : use Notepad and remove all margins and default header.) --------------------------------- Content of this file --------------------------------- Sample application n°2 (Full Duplex Data) description I. Changes II. Application description III. Application States IV. Remote Task Environment specificity I - Changes =========== * 01/11/06 - V1.00 Initial revision. * 02/04/22 - V1.10 New Wavecom sample library. The "AT+CRC" command now returns "+CME ERROR: 600". II - Application description ============================ To test this application, the user shall download it on two Wavecom products equipped with a SIM card (supporting DATA subscription). A specific "AT+DATA" command has been defined to initialize a data call between one product, considered as the Master, and another one considered as the Slave. Each product then sends 256 blocks of data to the other party. The Master then releases the call. (Test Command) AT+DATA=? +DATA: (20) OK (Parameters Command) AT+DATA= : phone number of the Slave product. If is correct, the current product acts as Master. The application then opens the Data and V24 flows, and calls the other product with the "ATD" command. As the other product receives the indication of a data call, it is considered as Slave. The application then opens the Data and V24 flows, and answers the call from Master with the "ATA" command. On both sides, as the "CONNECT" response comes, the products begin to send data blocks : "Sent from Master [X]" for Master "Sent from Slave [X]" for Slave X range value is [0.255] On both sides, when a product receives a data block through the Data flow, it sends this block to the serial link : "Rec {YYY}\r\n" where YYY is the received data block. When the Master has sent all its data blocks, the application waits untill all the data blocks from Slave are received, and starts a security timer. When all data blocks are received, or when the security timer has expired, Master releases the call. Then both products close the V24 and Data flows. This command is only available is IDLE state, once the "+WIND: 4" indication has been issued. III - Application States ======================== * CRC settings ******** +->* IDLE * | ******** | | | | first IDLE | | | V | ************ +--* CRC INIT * Send the "AT+CRC=1" command, to get the +CRING ************ indications * MASTER states ******** +-->* IDLE * | ******** | | | | AT+DATA command | | | V | *************** | * MASTER SEND * Open flows | *************** Send the "ATD" command | | On the CONNECT response, set a 0.2s cyclic timer | | -> On timer expiry, send a data block to Slave | | -> On data block received, sent it to V24 flow | | | | When all data blocks are sent | | | V | **************** | * WAIT PACKETS * Wait for all Slave data blocks | **************** | | | | All blocks received | | | V | ******* +---* ATH * Release the call, close the flows and return to IDLE ******* * SLAVE states ******** +-->* IDLE * | ******** | | | | "+CRING" data call indication | | | V | ******* | * ATA * Open data and V24 flows, Answer the call | ******* | | | | CONNECT response | | | V | ************** | * SLAVE SEND * Set a 0.2s cyclic timer | ************** -> On timer expiry, send a data block to Master | | -> On data block received, sent it to V24 flow | | | | When all data blocks are sent | | | V | ************** | * WAIT WIND6 * Wait for the Master to release the call | ************** | | | | +WIND: 6, close the flows and return to IDLE state +-----+ IV - Remote Task Environment specificity ======================================== In remote task mode, sending a large amount of data on the V24 flow may cause some troubles. So, all data blocks received from the Data flow are displayed as a response in remote task mode.