Page 3
Update Version Date Detail March, 2009 First Release Added “ Operating Precautions ” July, 2009 Modified following parameters of functions. GetSIMPINPUKCounter SetNecessarySIMPIN SetRadioBand GetOperatorInfo SendSMS September, 2009 Added “1. Programing”...
Page 4
Otherwise the applications you developed can’t operate properly. Related Manuals Please refer to the following related manuals for further information. • BHT-700-WM Class Library Reference Manual Contacts Please forward any opinions or questions that you may have regarding this manual to the address below or contact us by telephone.
1. Programing Procedure for GRPS's connection Step1 : Insert SIM card into BHT Step2 : Power on GPRS module. use "PowerOn" method Step3 : Open COM port to send a control command to the GPRS module. use "OpenCom" method Step4 : Check the authentication status of SIM PIN authentication. use "GetSIMPINStatus"...
2. GPRS class Constructor There is no need to create an instance because all the members are static members Methods Method Name Description PowerOn Turn ON GPRS module PowerOff Turn OFF GPRS module OpenCom Open GPRS COM port CloseCom Close GPRS COM port GetSIMPINStatus Get the SIM PIN authentication status GetSIMPINPUKCounter...
Page 8
PowerOn Turn the power of GPRS module on. Syntax ■ [VB] Public Shared Function PowerOn() As UInt32 [C#] public static UInt32 PowerOn(); Return value ■ error code 0 : Normal end Other than 0 : Abnormal end. For more detail, refer to 7. error code. - 3 -...
Page 9
PowerOff Turn the power of GPRS module off. Syntax ■ [VB] Public Shared Function PowerOff() As UInt32 [C#] public static UInt32 PowerOff(); Return value ■ error code 0 : Normal end Other than 0 : Abnormal end. For more detail, refer to 7. error code. - 4 -...
Page 10
OpenCom Open the COM port for GPRS function. Syntax ■ [VB] Public Shared Function OpenCom() As UInt32 [C#] public static UInt32 OpenCom(); Return value ■ error code 0 : Normal end Other than 0 : Abnormal end. For more detail, refer to 7. error code. - 5 -...
Page 11
CloseCom Close the COM port of GPRS. Syntax ■ [VB] Public Shared Function CloseCom() As UInt32 [C#] public static UInt32 CloseCom(); Return value ■ error code 0 : Normal end Other than 0 : Abnormal end. For more detail, refer to 7. error code. - 6 -...
Page 12
GetSIMPINStatus Get the SIM PIN authentication state. Syntax ■ [VB] Public Shared Function GetSimPINStatus( _ ByRef status As EN_SIMSTATUS) As UInt32 [C#] public static UInt32 GetSimPINStatus(out EN_SIMSTATUS staus); Parameters ■ status [out] Authentication state ■ Return value error code 0 : Normal end Other than 0 : Abnormal end.
Page 13
GetSIMPINPUKCounter Get the number of attempts still available for entering the PIN/PUK code. Syntax ■ [VB] Public Shared Function GetSIMPINPUKCounter( _ ByRef PINCount As UInt32, _ ByRef PUKCount As UInt32) As UInt32 [C#] public static UInt32 GetSIMPINPUKCounter( out UInt32 PINCount, out UInt32 PUKCount);...
Page 14
SetSIMPIN Set the SIM PIN for GSM network registration. Syntax ■ [VB] Public Shared Function SetSIMPIN(ByVal PIN As String) As UInt32 [C#] public static UInt32 SetSIMPIN(string PIN); Parameters ■ [in ] SIM PIN Return value ■ error code 0 : Normal end Other than 0 : Abnormal end.
Page 15
ChangeSIMPIN Change SIM PIN for GSM network registration. Syntax ■ [VB] Public Shared Function ChangeSIMPIN _ (ByVal As String, ByVal newPIN As String) As UInt32 [C#] public static UInt32 ChangeSIMPIN(string PIN, string newPIN); Parameters ■ [in ] (old)PIN newPIN [in ] new PIN Settable value : string which length is from 4 digits to 8 digits.
Page 16
SetNecessarySIMPIN Select whether SIM PIN is necessary or not. Syntax ■ [VB] Public Shared Function SetNecessarySIMPIN _ (ByVal req As Boolean, ByVal PIN As String) As UInt32 [C#] public static UInt32 SetNecessarySIMPIN(bool req, string PIN); Parameters ■ [in ] PIN is necessary(=true) or unncessary(=false) [in ] SIM PIN ■...
Page 17
SetSIMPUK Set the SIM PUK to unlock the PIN-lock issue and assign a new PIN code for next registration. Syntax ■ [VB] Public Shared Function SetSIMPUK( _ ByVal puk As String, ByVal pin As String) As UInt32 [C#] public static UInt32 SetSIMPUK(string puk, string...
Page 18
SetRadioBand Select radio frequency band. Syntax ■ [VB] Public Shared Function SetRadioBand( _ ByVal prefBand As EN_RADIOBAND, _ ByVal enableBand As EN_RADIOBAND) As UInt32 [C#] public static UInt32 SetRadioBand( EN_RADIOBAND prefBand, EN_RADIOBAND enableBand); ■ Parameters prefBand [in ] preference band selection. The selectable band is as following table.
Page 19
GetSignalStrength Get the signal strength. Syntax ■ [VB] Public Shared Function GetSignalStrength( _ ByRef RSSI As UInt32, ByRef BER As UInt32) As UInt32 [C#] public static UInt32 GetSignalStrength( out UInt32 RSSI, out UInt32 BER); ■ Parameters RSSI [out] signal strength rssi specification -113 dBm or less...
Page 20
GetModuleVersion Get the firmware version of module. Syntax ■ [VB] Public Shared Function GetModuleVersion( _ ByVal version As System.Text.StringBuilder) As UInt32 [C#] public static UInt32 GetModuleVersion( System.Text.StringBuilder version); ■ Parameters version [out] F/W version Return value ■ error code 0 : Normal end Other than 0 : Abnormal end.
Page 21
GetAllOperatorCnt Acquire the number of total operator. Syntax ■ [VB] Public Shared Function GetAllOperatorCnt( _ ByRef opeCount As UInt32) As UInt32 [C#] public static UInt32 GetAllOperatorCnt(out UInt32 opeCount); Parameters ■ opeCount [out] the number of operator ■ Return value error code 0 : Normal end Other than 0 : Abnormal end.
Page 22
GetAllOperatorInfo Acquire all the operator name. Syntax ■ [VB] Public Shared Function GetAllOperatorInfo( _ ByVal opeInfo As OperatorInfo()) As UInt32 [C#] public static UInt32 GetAllOperatorInfo(OperatorInfo[] opeInfo); Parameters ■ opeInfo [out] array storing operator information (refer to 5. Operator structure) Return value ■...
Page 23
GetOperatorListCnt Acquire the number of visible operator. Syntax ■ [VB] Public Shared Function GetOperatorListCnt( _ ByRef listCnt As UInt32) As UInt32 [C#] public static UInt32 GetOperatorListCnt(out UInt32 listCnt); Parameters ■ listCnt [out] the number of operator ■ Return value error code 0 : Normal end Other than 0 : Abnormal end.
Page 24
GetOperatorListInfo Acquire all the visible operator name. Syntax ■ [VB] Public Shared Function GetOperatorListInfo( _ ByVal opeInfo As OperatorListInfo()) As UInt32 [C#] public static UInt32 GetOperatorListInfo( OperatorListInfo[] opeInfo); Parameters ■ opeInfo [out] array storing operator information (refer to 4. Operator list structure) Return value ■...
Page 25
GetOperatorInfo Get the operator name. Syntax ■ [VB] Public Shared Function GetOperatorInfo( _ ByVal opeInfo As System.Text.StringBuilder) As UInt32 [C#] public static UInt32 GetOperatorInfo( System.Text.StringBuilder opeInfo); ■ Parameters opeInfo [out] operator name Return value ■ error code 0 : Normal end Other than 0 : Abnormal end.
Page 26
SetSMSStorageDest Specify the destination storing received short message. Syntax ■ [VB] Public Shared Function SetSMSStorageDest( _ ByVal store As EN_STORAGESMS) As UInt32 [C#] public static UInt32 SetSMSStorageDest(EN_STORAGESMS store); Parameters ■ store [in ] destination Settable value : One of EN_STORAGESMS member Return value ■...
Page 27
DeleteSMS Delete a short message. Syntax ■ [VB] Public Shared Function DeleteSMS( _ ByVal storeDelSMS As EN_STORAGESMS, ByVal index As UInt32) As UInt32 [C#] public static UInt32 DeleteSMS (EN_STORAGESMS storeDelSMS, UInt32 index); Parameters ■ storeDelSMS [in ] storage area storing delting SMS Settable value : one of EN_STORAGESMS member index [in ] index of SMS...
Page 28
ReadSMS Read out a short message. Syntax ■ [VB] Public Shared Function ReadSMS( _ ByVal SMSDest As EN_STORAGESMS, _ ByVal index As UInt32, ByRef info As SMSInfo) As UInt32 [C#] public static UInt32 ReadSMS (EN_STORAGESMS SMSDest, UInt32 index, out SMSInfo info);...
Page 29
SendSMS Send a short message. Syntax ■ [VB] Public Shared Function SendSMS( _ ByVal SMSDest As String, ByVal SMSText As String, _ ByRef msgRef As UInt32) As UInt32 [C#] public static UInt32 SendSMS (string SMSDest, string SMSText, out UInt32 msgRef); Parameters ■...
Page 30
WriteSMSToMem Write short message into the memory. Syntax ■ [VB] Public Shared Function WriteSMSToMem( _ ByVal SMSDestStorage As EN_STORAGESMS, _ ByVal SMSDestAddr As String, ByVal SMSText As String, _ ByRef index As UInt32) As UInt32 [C#] public static UInt32 WriteSMSToMem (EN_STORAGESMS SMSDestStorage, string...
Page 31
SendSMSFromMem Send short message stored in the memory. Syntax ■ [VB] Public Shared Function SendSMSFromMem( _ ByVal SMSSrcStorage As EN_STORAGESMS, _ ByVal index As UInt32, ByRef msgRef As UInt32) As UInt32 [C#] public static UInt32 SendSMSFromMem( EN_STORAGESMS SMSSrcStorage, UInt32 index, out UInt32 msgRef);...
Page 32
GetSMSListCnt Acquire the number of SMS stored in the memory or UIM. Syntax ■ [VB] Public Shared Function GetSMSListCnt( _ ByRef inSIM As UInt32, ByRef totalInSMS As UInt32, _ ByRef inME As UInt32, ByRef totalInME As UInt32) As UInt32 [C#] public static UInt32 GetSMSListCnt( out UInt32 inSIM,...
Page 33
EN_SIMSTATUS Specifies the SIM authentication satate. Syntax ■ [VB] Public Enum EN_SIMSTATUS [C#] public enum EN_SIMSTATUS Members ■ Member Name Description NEED Wait for SIM PIN enter READY PIN has already been entered LOCK PIN was disabled after three failed attempts to enter PIN and wait for PUK entering Class ■...
Page 34
EN_RADIOBAND Specifies the Radio band. Syntax ■ [VB] Public Enum EN_RADIOBAND [C#] public enum EN_RADIOBAND Members ■ Member Name Description GSM900 GSM 900 MHz GSM1800 GSM 1800 MHz GSM1900 GSM 1900 MHz GSM850 GSM 850 MHz Class ■ DNWA.BHT700CL.GPRS - 29 -...
Page 35
EN_STORAGESMS Specify destination storing short message. Syntax ■ [VB] Public Enum EN_STORAGESMS [C#] public enum EN_STORAGESMS Members ■ Member Name Description SIM card ME(terminal) Class ■ DNWA.BHT700CL.GPRS - 30 -...
3. SMS information structure Fields Field Name Description Status Status of SMS DestAddr Destination address SMSData Contents of short message Times stamp of short message Enumeration Enumeration Name Description EN_STATUS Status of short message - 31 -...
Page 37
Status Status of short message Syntax ■ [VB] Public Status As EN_STATUS [C#] public EN_STATUS Status; DestAddr Destination address. ■ Syntax [VB] Public DestAddr As string [C#] public string DestAddr; - 32 -...
Page 38
SMSData Contents of short message. Syntax ■ [VB] Public SMSData As String [C#] public string SMSData; Time Stamp of short message. ■ Syntax [VB] Public SCTimeStamp As tm [C#] public tm SCTimeStamp; Refer to 6. Time structure. - 33 -...
Page 39
EN_STATUS Specify status of short message. Syntax ■ [VB] Public Enum EN_STATUS [C#] public enum EN_STATUS Members ■ Member Name Description REC_UNREAD not read yet REC_READ already read STO_UNSENT not sent yet STO_SENT already sent Class ■ DNWA.BHT700CL.GPRS - 34 -...
4. Operator list structure Fields Field Name Description OpeInfo operator information OpeInfo Operator information. Syntax ■ [VB] Public OpeInfo As OperatorInfo [C#] public OperatorInfo OpeInfo; - 35 -...
5. Operator structure Fields Field Name Description OperatorName Operator name OperatorName Operator name Syntax ■ [VB] Public OperatorName As String [C#] public string OperatorName; - 36 -...
7. error code Value Explanation normal end 20000 COM port has not been opened. 20001 Fail to open COM port 20003 Argument value is invalid 20005 Timeout error - 38 -...
Page 44
BHT-700-WM GPRS Class Library Reference Manual Third Release September, 2009 DENSO WAVE INCORPORATED Automatic Data Capture Division - 39 -...