Denso BHT-700-WM Reference Manual

Page 1
Bar Code Handy Terminal
BHT-700-WM
GPRS Class Library
Reference Manual
Page 2
All rights reserved. No part of this publication may be reproduced in any form or by any means without permission in writing from the publisher.
Specifications are subject to change without prior notice.
All products and company names mentioned in this manual are trademarks or registered trademarks of their respective holders.
Page 3
Update
Version Date Detail
1.0 March, 2009 First Release
2.0 July, 2009 Added “Operating Precautions”
Modified following parameters of functions.
- GetSIMPINPUKCounter
- SetNecessarySIMPIN
- SetRadioBand
- GetOperatorInfo
- SendSMS
3.0 September, 2009 Added “1. Programing”
Page 4
Introduction
This reference manual is intended for software developers using VB.NET or C# to develop software applications using GPRS(EDGE) functions for the BHT-700.
Operating Precautions When you develop software applications using GPRS(EDGE) functions, you need to copy GPRSLIB.dll supplied with GPRS Class Library to a Windows folder of BHT-700. 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.
DENSO WAVE INCORPORATED MT Bldg. Hall No.2, 4-2-12,Toranomon, Minato-ku, Tokyo, 105-0001 Japan Tel: +81-3-5472-0477
Latest Information Please access our Web site using the following URL for the latest information on this manual and our full range of
products.
http://www.denso-wave.com/
More detailed information is available for product owners at our dedicated Web site (QBNet) for registered users. Please access the above URL for user registration and details on QBNet.
- i -
Page 5
Contents
1. Programing ......................................................................................................................................................................................... 1
2. GPRS class........................................................................................................................................................................................ 2
3. SMS information structure........................................................................................................................................................31
4. Operator list structure................................................................................................................................................................ 35
5. Operator structure .......................................................................................................................................................................36
6. Time structure................................................................................................................................................................................37
7. error code.........................................................................................................................................................................................38
- ii -
Page 6
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" method
Step5 : Input PIN code If PIN code is necessary at 4. use "SetSIMPIN" method
Step6 : Set a radio frequency band. use "SetRadioBand" method
Step7 : After within around 60 sec, GPRS complete to connect to a base station. (Notes)
(Notes) It is long time to connect to a base station at the first time.
- 1 -
Page 7
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 Get the number of attempts still available for entering the
PIN/PUK code
SetSIMPIN Set the SIM PIN for GSM network registration
ChangeSIMPIN Change SIM PIN for GSM network registration
SetNecessarySIMPIN Select whether SIM PIN is necessary or not
SetSIMPUK Set the SIM PUK to unlock the PIN-lock issue and assign a
new PIN code for next registration
SetRadioBand Select radio frequency band
GetSignalStrength Get the RSSI
GetModuleVersion Get the firmware version of module
GetAllOperatorCnt Acquire the number of total operator
GetAllOperatorInfo Acquire all the operator name
GetOperatorListCnt Acquire the number of visible operator
GetOperatorListInfo Acquire all the visible operator name
GetOperatorInfo Get the operator name
SetSMSStorageDest Specify destination storing received short message
DeleteSMS Delete short message
ReadSMS Read short message
SendSMS Send short message
WriteSMSToMem Write short message into the memory
SendSMSFromMem Send short message stored in the memory
GetSMSListCnt Acquire the number of SMS stored in the memory or UIM
Enumeration
Enumeration Name Description
EN_SIMSTATUS SIM authentication state
EN_RADIOBAND Radio band
EN_STORAGESMS Storage area to save short message
- 2 -
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. For more detail, refer to
7. error code.
- 7 -
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);
■ Parameters
PINCount
[out] available attempts number for entering the PIN code
PUKCount
[out] available attempts number for entering the PUK code
■ Return value
error code
0 : Normal end Other than 0 : Abnormal end. For more detail, refer to
7. error code.
- 8 -
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
PIN
[in ] SIM PIN
■ Return value
error code
0 : Normal end Other than 0 : Abnormal end. For more detail, refer to
7. error code.
- 9 -
Page 15
ChangeSIMPIN
Change SIM PIN for GSM network registration.
■ Syntax
[VB]
Public Shared Function ChangeSIMPIN _
(ByVal PIN As String, ByVal newPIN As String) As UInt32
[C#] public static UInt32 ChangeSIMPIN(string PIN, string newPIN);
■ Parameters
PIN
[in ] (old)PIN
newPIN
[in ] new PIN
Settable value : string which length is from 4 digits to 8 digits.
■ Return value
error code
0 : Normal end Other than 0 : Abnormal end. For more detail, refer to
7. error code.
- 10 -
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
req
[in ] PIN is necessary(=true) or unncessary(=false)
PIN
[in ] SIM PIN
■ Return value
error code
0 : Normal end Other than 0 : Abnormal end. For more detail, refer to
7. error code.
- 11 -
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 pin);
■ Parameters
puk
[in ] PUK code
pin
[in ] new SIM PIN code
■ Return value
error code
0 : Normal end Other than 0 : Abnormal end. For more detail, refer to
7. error code.
- 12 -
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.
enableBand
[in ] permitted band selection.
The selectable band is as following table.
band specification
GSM900 GSM900MHz GSM1800 GSM1800MHz GSM900 + GSM1800 GSM900MHz and GSM1800MHz GSM1900 GSM1900MHz GSM900 + GSM1900 GSM900MHz and GSM1900MHz GSM850 GSM850MHz GSM850 + GSM1800 GSM850MHz and GSM1800MHz GSM850 + GSM1900 GSM850MHz and GSM1900MHz
■ Return value
error code
0 : Normal end Other than 0 : Abnormal end. For more detail, refer to
7. error code.
- 13 -
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
0 -113 dBm or less 1 -111 dBm 2…30 -109…-53 dBm 31 -51 dBm or greater 99 Not known or not detectable
BER
[in ] Bit Error Rate
■ Return value
error code
0 : Normal end Other than 0 : Abnormal end. For more detail, refer to
7. error code.
- 14 -
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. For more detail, refer to
7. error code.
- 15 -
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. For more detail, refer to
7. error code.
- 16 -
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
error code
0 : Normal end Other than 0 : Abnormal end. For more detail, refer to
7. error code.
■ note
Element count of opeInfo should be equal to or larger than the number of operator. Call GetAlloperatorCnt method before calling this method to acquire the number of operator.
- 17 -
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. For more detail, refer to
7. error code.
- 18 -
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
error code
0 : Normal end Other than 0 : Abnormal end. For more detail, refer to
7. error code.
■ note
Element count of opeInfo should be equal to or larger than the number of visible operator. Call GetOperatorListCnt method before calling this method to acquire the number of visible operator.
- 19 -
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. For more detail, refer to
7. error code.
- 20 -
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
error code
0 : Normal end Other than 0 : Abnormal end. For more detail, refer to
7. error code.
- 21 -
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
■ Return value
error code
0 : Normal end Other than 0 : Abnormal end. For more detail, refer to
7. error code.
- 22 -
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);
■ Parameters
SMSDest
[in ] destination storing short message
settable value : one of EN_STORAGESMS member
index
[in ] index of short message
info
[out] read SMS information
■ Return value
error code
0 : Normal end Other than 0 : Abnormal end. For more detail, refer to
7. error code.
- 23 -
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
SMSDest
[in ] destination of short message
SMSText
[in ] contents of short message
msgRef
[out] SMS reference
■ Return value
error code
0 : Normal end Other than 0 : Abnormal end. For more detail, refer to
7. error code.
- 24 -
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 SMSDestAddr,
string SMSText, out UInt32 index);
■ Parameters
SMSDestStorage
[in ] destination storing short message
settable value : one of EN_STORAGESMS member
SMSDestAddr
[in ] destination of short message
SMSText
[in ] contents of short message
index
[out] index of stored short message
■ Return value
error code
0 : Normal end Other than 0 : Abnormal end. For more detail, refer to
7. error code.
- 25 -
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);
■ Parameters
SMSSrcStorage
[in ] source storage
settable value : one of EN_STORAGESMS member
index
[in ] index of send short message
msgRef
[out] message reference
■ Return value
error code
0 : Normal end Other than 0 : Abnormal end. For more detail, refer to
7. error code.
- 26 -
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, out UInt32 totalInSMS, out UInt32 inME, out UInt32 totalInME);
■ Parameters
inSIM
[out] the number of SMS stored in SIM
totalInSMS
[out] the number of SMS that can be stored in SIM
inME
[out] the number of SMS stored in ME
totalInME
[out] the number of SMS that can be stored in ME
■ Return value
error code
0 : Normal end Other than 0 : Abnormal end. For more detail, refer to
7. error code.
- 27 -
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
DNWA.BHT700CL.GPRS
- 28 -
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 SIM card
ME ME(terminal)
■ Class
DNWA.BHT700CL.GPRS
- 30 -
Page 36
3. SMS information structure
Fields
Field Name Description
Status Status of SMS
DestAddr Destination address
SMSData Contents of short message
tm 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;
tm
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 -
Page 40
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 -
Page 41
5. Operator structure
Fields
Field Name Description
OperatorName Operator name
OperatorName
Operator name
■ Syntax
[VB] Public OperatorName As String
[C#]
public string OperatorName;
- 36 -
Page 42
6. Time structure
Fields
Field Name Description
tm_year Year
tm_mon Month
tm_mday Date
tm_hour Hour
tm_min Minute
tm_sec second
- 37 -
Page 43
7. error code
Value Explanation
0 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
DENSO WAVE INCORPORATED Automatic Data Capture Division
Third Release September, 2009
- 39 -
Loading...