README FOR GAMMU+ DLL

DLL is compiled using cdecl.

Functions for communicating with phone. They all have first parameter numer, which is phone number from 0 to 9

GSM_Error GPlusOpen(int numer, char *device, char *connection, char *model);;
Function for opening connection with GSM device

device connection model
empty "bluephonet" - Bluetooth for WIN XP2 and later BT stack from Microsoft (it will search for all devices in range and try to connect into first) use model name (like "6610") only when connection fails. Normally can be empty.
 device address "bluephonet" - Bluetooth for WIN XP2 and later BT stack from Microsoft (it will connect into this device)
any value "irdaphonet" - Infrared
serial port name - for example "com2:" "fbus" - FBUS cable
any value "dku2phonet" or "dku2" - DKU2 cable

GSM_Error GPlusOpenFromFile(int numer);

Tries to read connection parameters from gammurc file in directory with DLL. File gammurc is written using INI style. Here is example:

[gammu]
device = com2:
connection = fbus
model = 6210


If some parameter is not found, default value is taken (device = com2:, connection = fbus, model empty)

GSM_Error GPlusGetIMEI (int numer, unsigned char *IMEI);
Get IMEI from GSM device.

GSM_Error GPlusGetModel(int numer, unsigned char *Model);
Get phone model (for example "6610" for Nokia 6610)

GSM_Error GPlusGetCodeNameModel(int numer, unsigned char *Model);
Get codename for model (for example "RH-12" for European Nokia 6230)

GSM_Error GPlusGetFirmware(int numer, unsigned char *Firmware);
Get firmware version

GSM_Error GPlusClose(int numer);
Close connection with GSM device

GSM_Error GPlusGetPBKMemoryStatus(int numer, GSM_PBKStatus *Status);
Get phonebook memory info. Memory in Status must be filled ("ME" for phone memory, "SM" for SIM memory, etc.) before can call it.

GSM_Error GPlusGetPBKMemory(int numer, GSM_PBKEntry2 *E);
Fills structure with phonebook entry details. You need to fill Location and Memory and set SubEntries to NULL before can call it.

void GPlusSetUserReply(int numer, GSM_Error (__cdecl *UsrReply)(int MsgLength, unsigned char MsgType, unsigned char *MsgBuffer, void *Struct, int RequestID))
Function for setting own frame receiving handler

GSM_Error GPlusWrite(int numer, unsigned char *buffer,int length, unsigned char type, int time, int request, void *Struct)
Function for sending own data to phone

char* GPlusGetPhoneModuleName(int numer)
Get name for selected phone module

General functions

void GPlusGetGPlusVersion(char *Version);
Get Gammu+ version.

void GPlusGetNextSupportedPhoneInfo(BOOLEAN start, char *Model, char *Protocol, char *CodeNameModel);
Used for getting name/codename and supported protocols for known for Gammu+ models. Set start to TRUE for first call.

void GPlusCleanPBKEntry2(GSM_PBKEntry2 *E);
Deallocates memory set for SubEntries in structure.

char* GPlusGetErrorInfo(GSM_Error e);
Get short error description for error number.

General structures and constans

GSM_Error
Defines error types

GSM_PBKStatus
For getting phonebook memory status.

GSM_PBK_SubEntryType
Defines subentry types for phonebook entries

GSM_PBKSubEntry2
Defines subentry for phonebook entries. It contains Unicode text (Text), Type and pointer to next subentry (one-way list)

GSM_PBKEntry2
Structure for getting and setting phonebook entries.