Sendatcommand – Argox PT-9130 User Manual

Page 103

Advertising
background image

PT-90 Mobile Computer SDK Programming Manual 96

SendATCommand

Send specify AT command and verify required response.

DWORD SendATCommand

{

char *

lpCmd

,

char *

lpResponse

,

DWORD

dwResLen

,

DWORD

dwWaitTime

}

Parameters

lpCmd

[in] Specifies AT command. Max size of 256.

lpResponse

[out] Receive the required response data.

dwResLen

[in] The lpResponse buffer max size.

dwWaitTime

[in] The time interval for wait response, in milliseconds.

Returned Values

If the action succeeds, the returned value is

E_FUNC_SUCCEED

. If the action fails, possible returned values are

E_FUNC_ERROR

,

E_FUNC_PAR_ERROR

,

GPRS_ERR_DEVICE_ERROR

,

GPRS_ERR_BUFFER_INSUFFICIENT

.

Remarks

.If receive data incomplete, maybe matter of wait time. Can adjust dwWaitTime parameter to try.

Example

char szResponse[512];

if(SendATCommand("at+gsn", szResponse, sizeof(szResponse), 0) != E_FUNC_SUCCEED)

AfxMessageBox(_T("Send AT command fail!"));

Requirements

OS Versions: Windows CE 6.0 or beyond.

Header: sysapiax.h

Link Library: sysapiax.lib

Link DLL: sysapiax.dll
Device: PT90

Advertising