http://www.wavecom.com/forum Open AT ® Release version: 4.10 |
This sample depends on the following libraries :
As this application uses the MultiApp library, the following start/stop command has to be used to control the application execution.
AT+DATASTART (Duplex Data start/stop command)
Command | Answers |
AT+DATASTART? | +DATASTART:
<state>
OK |
AT+DATASTART=? | +DATASTART:
(0-1)
OK |
AT+DATASTART= <state> | +CME ERROR: 3 or OK |
Parameter | Values range | Description | Default value |
state | 0-1 | The current application running state. This parameter is stored in non-volatile memory. | 0 |
The init entry point sent to the MultiApp library is the dxdata_init() function. The start/stop entry points linked to the +DATASTART command are the dxdata_run() and dxdata_stop() functions.
To test this application, the user shall download it on two Wavecom products
equipped with a SIM card (supporting DATA subscription). A specific +DATA
command has been defined to initialize a data call between one product,
considered as the Master, and another one considered as the Slave.
In Full Duplex mode, each product sends up to 256 blocks of data to the other party.
In Half Duplex mode, only the master product sends up to 256 blocks of data to the slave one.
The Master then releases the call.
AT+DATA (Data call setup command)
Command | Answers |
AT+DATA=? | +DATA:
(0-2)
,
(20)
,
(1-256)
OK |
AT+DATA= <mode> , <number> ,[ <packetsnb> ] | +CME ERROR: 3 or OK |
Parameter | Values range | Description | Default value |
mode | 0-2 | 0 : uses the half duplex mode 1 : uses the full duplex mode 2 : defines packetsnb | mandatory |
number | 20 | Slave product data phone number to dial | NA |
packetsnb | 1-256 | Number of packets to send to the other part. | 256 |
If number 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 :
On both sides, when a product receives a data block through the Data flow, it sends this block to the serial link :
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. If packetsnb is not defined for the Slave, 256 data blocks are sent by the Slave. 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.
Updated: Tue Sep 19 17:07:39 CEST 2006;