PT-20 Programming Guide
34
characters will be writed to other Bluetooth device, and “pslPutSize” will
tell you how meny characters send to other Bluetooth device.
Returns
:
BT_NOMODULE : The terminal is notPA-2010 / PA-2110.
BT_NOSTART : Bluetooth module power disable, please run BT_Start.
BT_DISCONNECT : Bluetooth not connect to other bluetooth device,
please run BT_Open.
BT_ERROR : Parameter error, please check your parmeter.
BT_OK :Write OK.
BT_GetLocalInfo
Purpose
:
Get Bluetooth information.
Syntax
:
int BT_GetLocalInfo(_BT_INFO* stInfo);
Example call
:
_BT_INFO stInfo;
BT_GetLocalInfo(&stInfo);
Includes
:
#include “SDK.h ”
Description
:
This function will return thePA-2010 / PA-2110 Bluetooth information in
structure.
The structure describe as follows:
typedef struct __BT_INFO
{
char assLocalAddress[16]; //PA-2010 / PA-2110 Bluetooth MAC
address.(Cannot change.)
char assLocalName[20];
//PA-2010 / PA-2110 Bluetooth device
name
BOOL bLocalSecurity;
//PA-2010 / PA-2110 Bluetooth
security mode, set TRUE(on) or
FALSE(off)
BOOL bLocalEncryption;
//PA-2010 / PA-2110 Bluetooth
encryption mode, set TRUE(on) or
FALSE(off)
int stInquiryTimeout;
//PA-2010 / PA-2110 Bluetooth inquiry
timeout set, the value from 1(1.28
seconds) to 48(61.44 seconds).
int stInquirytMaxResponse; //PA-2010 / PA-2110 Bluetooth inquiry
max response, the value from 1 to 9.
char assLinkAddress[16]; //Set link device address.