Denso BHT-700-CE Reference Manual

Denso BHT-700-CE Reference Manual

Barcode handy terminal
Table of Contents

Advertisement

Quick Links

Barcode Handy Terminal
BHT-700-CE
API Reference Manual

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the BHT-700-CE and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Denso BHT-700-CE

  • Page 1 Barcode Handy Terminal BHT-700-CE API Reference Manual...
  • Page 2 Copyright © DENSO WAVE INCORPORATED, 2007 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...
  • Page 3: Table Of Contents

    Contents Chapter 1. Software Requirements for the BHT-700 ..................1 1.1. Operating System (OS) on the BHT-700..................1 1.2. Application Development Software on the PC.................. 1 1.2.1. Application Development Tool ...................... 1 1.2.2. Software Development Kit ......................1 Chapter 2. Application Development Environment ..................2 2.1.
  • Page 4 9.1. Outline............................27 9.2. Battery Voltage Acquisition ......................27 9.3. Battery Voltage Icon ........................27 9.4. Battery Voltage Warning ........................ 27 Chapter 10. LED ............................28 10.1. Outline............................28 10.2. LED Control............................ 28 10.2.1. Display LED ..........................28 10.2.2. Charge LED ..........................28 Chapter 11.
  • Page 5 17.4.1. Properties ..........................144 17.4.2. Methods..........................145 17.4.3. Event Callback Function......................148 17.4.4. Error Codes ........................... 149 17.4.5. Coding Sample........................149 17.5. File Transfer Control ........................150 17.5.1. Properties ..........................150 17.5.2. Methods..........................151 17.5.3. Event Callback Functions ...................... 157 17.5.4.
  • Page 6: Chapter 1. Software Requirements For The Bht-700

    Chapter 1. Software Requirements for the BHT-700 1.1. Operating System (OS) on the BHT-700 The OS running on the BHT-700 is Microsoft Windows CE 5.0. 1.2. Application Development Software on the PC 1.2.1. Application Development Tool The application development tool for the BHT-700 is Microsoft eMbedded Visual C++ 4.0 (Service Pack 1.2.2.
  • Page 7: Chapter 2. Application Development Environment

    Chapter 2. Application Development Environment 2.1. Required Hardware (PC to be used for application development) Item Specification Microsoft Windows 2000 Professional with Service Pack 2 or higher, or Microsoft Windows 2000 Server with Service Pack 2 or higher, or Microsoft Windows XP Professional or higher. With a Pentium-II class processor, 450 MHz or faster Memory For Microsoft Windows 2000 Professional or Microsoft Windows XP Professional:...
  • Page 8: Chapter 3. Output To The Lcd Screen

    Chapter 3. Output to the LCD Screen 3.1. Screen Fonts The BHT-700 has the following integrated screen fonts: (1) Arial (ttf) (2) Courier New (ttf) (3) Tahoma (ttf) (4) Time New Roman (ttf) (5) Wingding (ttf) If no screen font is specified, Tahoma applies automatically. 3.2.
  • Page 9: Setting The Screen Rotation Angle

    3.3. Setting the Screen Rotation Angle The settable rotation angles are The direction is anti-clockwise. 0°, 90°, 180°, and 270°. The screen rotation angle can be set and read using the BHT_SetSysSettingDW (DWORD dwCtrlCode,DWORD dwSysParam) and BHT_GetSysSettingDW (DWORD dwCtrlCode,DWORD *pdwSysParam) functions, respectively. Control Code Parameter Value Validation...
  • Page 10: Chapter 4. Backlight Control

    Chapter 4. Backlight Control 4.1. Outline The backlight illumination and power saving modes can be controlled using either of the following methods. (1) The backlight can be controlled by pressing the backlight control key. (2) The backlight can be controlled using the backlight control function (BHT_SetBltStatus). The following backlight related setting items are also available.
  • Page 11: Setting The Backlight Illumination Time

    4.3. Setting the Backlight Illumination Time The backlight illumination time is set and read using the BHT_SetSysSettingDW (DWORD dwCtrlCode,DWORD dwSysParam) and BHT_GetSysSettingDW (DWORD dwCtrlCode,DWORD *pdwSysParam) functions. Control Code Parameter Value Parameter Type Default Validation Timing dwCtrlCode dwSysParam Illumination time BHT_BACKLIGHT 0 - 255 When backlight illumination timer is...
  • Page 12: Controlling The Backlight With The Backlight Control Key

    4.5. Controlling the Backlight with the Backlight Control Key The backlight function can be enabled/disabled by pressing the backlight function control key (Default: Hold down [SF] key and press [M3].). The illumination time is specified using the BHT_SetSysSettingDW (BHT_BACKLIGHT_BATT_TIME/BHT_BACKLIGHT_AC_TIME, …) function. The default value is 3 seconds when powered by the battery, and 60 seconds when placed on the CU.
  • Page 13: Controlling The Backlight With The Backlight Control Function

    4.6. Controlling the Backlight with the Backlight Control Function The backlight function can be controlled using the BHT_SetBltStatus function. The BHT_SetBltStatus (BHT_BL_ENABLE_ON) function is used to enable the backlight function and turn the backlight ON. The backlight power saving mode is enabled if no keys are pressed, or the touch panel tapped from the point the backlight is turned ON using the BHT_SetBltStatus (BHT_BL_ENABLE_ON) function until the time set using the BHT_SetSysSettingDW (BHT_BACKLIGHT_BATT_TIME/BHT_BACKLIGHT_AC_TIME,…) function (Default: 3 seconds when...
  • Page 14: Key Backlight

    (*5) The backlight specified with the BHT_SetSysSettingDW (BHT_BACKLIGHT_DEVICE,…) function illuminates. (*6) Cold booting is performed from the status at (1) above. However, cold booting is performed from the status at (1) when the registry is saved with the status at (1) or (2), and is performed from the status at (3) when the registry is saved with the status at (3).
  • Page 15: Chapter 5. Beeper And Vibrator Control

    Chapter 5. Beeper and Vibrator Control 5.1. Outline The beeper and vibrator are controlled by: (1) the beeper/vibrator setting functions (that allow you to choose beeper and/or vibrator and set the beeper volume. Refer to Section 5.2.) (2) the beeper/vibrator start/stop functions (that allow you to set the beeping or vibration interval, the number of repetitions, and frequency.
  • Page 16: Setting The Beeper/Vibrator

    5.2. Setting the Beeper/Vibrator The BHT_SetSysSettingDW (DWORD dwCtrlCode, DWORD dwSysParam) and BHT_GetSysSettingDW (DWORD dwCtrlCode, DWORD *pdwSysParam) functions write or read the beeper/vibrator parameters as specified below. Parameter Control code Parameter value Validating Type Default name (dwCtrlCode) (dwSysParam) timing Rumble BHT_BEEP_VIB BEEP_SELECT BEEP_SELECT First sound...
  • Page 17: Starting/Stopping The Beeper/Vibrator

    5.3. Starting/Stopping the Beeper/Vibrator The beeper/vibrator is activated or deactivated by the following functions: Function Used to: Activate the selected device (beeper or vibrator). BHT_StartBeep Activate the beeper. BHT_StartBeeperOnly BHT_StartVibratorOnly Activate the vibrator. The functions listed above start the beeper/vibrator control and immediately pass control to the subsequent statement or function.
  • Page 18: Chapter 6. Keys And Trigger Switch Control

    Chapter 6. Keys and Trigger Switch Control 6.1. Outline In addition to the processing for depressed or released keys and trigger switch, the BHT OS controls the following functions assigned to them. (1) Specifying the shift key operation mode (2) Assigning functions to the magic keys (M1 to M3) (3) Supporting the alphabet entry mode (in addition to the numeric entry mode) (4) Function mode (5) Key click sound...
  • Page 19: Setting The Keys And Trigger Switch

    6.2. Setting the Keys and Trigger Switch The BHT_SetSysSettingDW (DWORD dwCtrlCode, DWORD dwSysParam) and BHT_GetSysSettingDW (DWORD dwCtrlCode, DWORD *pdwSysParam) functions write or read the keys and trigger switch parameters. Parameter Validating Type Control code Parameter value Default name timing Shift key BHT_KEY KEY_NON_LOCK KEY_NON_LOCK...
  • Page 20: Shift Key Operation Mode

    6.3. Shift Key Operation Mode The shift key operation mode works as follows: Shift key operation Description mode Non-lock mode - The keypad is shifted when the Shift key is held down. Onetime lock - The shift status is cleared immediately after releasing a key when in the mode shift status from the time the key is pressed until it is released while the shift key is held down and after it is released.
  • Page 21: Assigning A User-Defined Key Code To The Magic Keys

    6.5. Assigning a User-Defined Key Code to the Magic Keys Apart from the previously mentioned functions, optional keys can be applied to the magic keys following the method below. With this function it is possible to assign keys to the magic keys that do not exist in the BHT-700, or to execute the equivalent of a multi-key function by pressing a magic key once.
  • Page 22: Key Input Modes

    6.6. Key Input Modes The BHT-700 key pad has the following three key entry modes. (1) Numeric entry mode This mode allows you to type in numeric data with the numeric keys. (2) Alphabet entry mode 1 In the 27-key pad, use the numeric keys to type in alphabet letters in the same way as he/she uses a cellular phone.
  • Page 23 (2) If keys [0] to [9] or the [.] key is pressed, the pressed key becomes an unestablished character and displays in the unestablished character display window. The character then reverts to a character code when any of these keys becomes established. Press any of the following keys below to establish unestablished characters.
  • Page 24 6.6.4. Alphabet Entry Mode 2 (27-key pad only) Alphabet entry mode 2 starts by: (1) calling the BHT_SetSysSettingDW (BHT_KEY_INPUT_METHOD, INPUT_METHOD_ALPHABET2) function. (2) pressing the [AL] key when in alphabet entry mode 1. (*1) Alphabet entry mode 2 terminates by: (1) switching to any other entry mode with the BHT_SetSysSettingDW (BHT_KEY_INPUT_METHOD, INPUT_METHOD_XXXXXX) function.
  • Page 25: Function Mode

    6.7. Function Mode Use either of the methods below to enable function mode. (1) Call up the BHT_SetSysSettingDW (BHT_KEY_FUNCTION,KEY_FUNCTION_ON) function. (2) Press the [FN] key when in function mode. Use either of the methods below to disable function mode and return to non-function mode. (1) Call up the BHT_SetSysSettingDW (BHT_KEY_FUNCTION,KEY_FUNCTION_OFF) function.
  • Page 26: Auto Repeat Function

    6.10. Auto Repeat Function The keys used to perform auto repeat are listed in the following table. Whether auto repeat function for each key is enabled or disabled is listed in the following table. 27-key pad 42-key pad [0] to [9] key and - In Numeric entry mode : ●...
  • Page 27: Chapter 7. Lcd Status Indication

    Chapter 7. LCD Status Indication 7.1. Outline The status of the BHT is displayed on the LCD as specified below. Status Description Icon Battery voltage level Displays the battery voltage in five levels. Software keyboard Shows whether the software keyboard is : The software keyboard is display state displayed or hidden.
  • Page 28: Setting The Lcd Status Indication

    (Display sample of icons) Status indicator icons in the task bar 7.2. Setting the LCD Status Indication The BHT_SetSysSettingDW (DWORD dwCtrlCode, DWORD dwSysParam) and BHT_GetSysSettingDW (DWORD dwCtrlCode, DWORD *pdwSysParam) functions write or read the LCD status indication as specified below. Parameter Parameter Type...
  • Page 29: Chapter 8. Power Management

    Chapter 8. Power Management 8.1. Outline The power management functions switch the system powering state. The following four system power states exist. (1) Power ON (2) Standby (3) Suspned (*1) (4) Critical OFF (*2) (*1) Suspend The BHT will be suspended when the power is turned off with the power key or auto power off feature. (*2) Critical OFF The BHT will become critical off when the power is turned off due to battery voltage drop or battery cover unlocked.
  • Page 30: Standby

    8.2. Standby 8.2.1. Switching to the Standby State The BHT switches from the power ON state to the standby state when any of the following conditions arises: (1) When the standby transition timeout occurs after a standby transition prohibited event (listed below) is completed.
  • Page 31: Suspend

    8.3. Suspend 8.3.1. Setting the Standby Transition Timeout The BHT switches to the suspend state when any of the following conditions arises: (1) When the power is on, the power key is held down for the effective held-down time (for switching to the suspend state) or more.
  • Page 32: Chapter 9. Battery State

    Chapter 9. Battery State 9.1. Outline The battery status can be ascertained using the following methods. (1) Battery status acquisition (2) Battery voltage icon (3) Low battery voltage warning message display 9.2. Battery Voltage Acquisition The BHT_GetPowerStatus function can be used to ascertain whether the BHT is on the CU, and acquires the battery level, battery voltage, and battery type.
  • Page 33: Chapter 10. Led

    Chapter 10. LED 10.1. Outline The BHT-700 has two LEDs. The display LED can be controlled from the application. Color ON/OFF control from applications Indicator LED Red and blue Possible Charger LED Red and green Impossible 10.2. LED Control 10.2.1. Display LED (1) Control method The red and blue display LEDs can be turned ON and OFF using the BHT_SetNLedStatus, BHT_SetNLedOn, and BHT_SetNLedOff functions.
  • Page 34: Chapter 11. Data Communication

    Chapter 11. Data Communication 11.1. Outline In wired communication between the BHT and host computer, the following interfaces are available: (1) IrDA interface (2) Connector interface (3) USB client interface (4) USB host interface 11.2. Programming for Data Communication (1) IrDA interface The IrDA interface is assigned to port 4.
  • Page 35: Activesync

    11.4. ActiveSync 11.4.1. Establishing an ActiveSync Connection An ActiveSync connection can be established with either of the following procedures. (1) Manual connection via the [BhtShell] - [2:Communication] menu (2) Auotmatic connection by placing the BHT on CU-733 connected to the computer by USB Communication I/F Manual Connection Automatic Connection...
  • Page 36: Chapter 12. Wireless Communication

    Chapter 12. Wireless Communication 12.1. Outline 12.1.1. Spread Spectrum Communications Method Data communication is performed using TCP/IP protocol via a wireless module. Refer to item 13.2 for details on communication program creation. 12.1.2. Configuration of Spread Spectrum System The BHT communicates with the host computer via an access point in wireless communication. For details, refer to the "BHT-700BB/700BWB/700BWBG-CE User's Manual"...
  • Page 37: Programming For Wireless Communication

    12.2. Programming for Wireless Communication To connect to the wireless communications pathway, specify the following system settings in System Menu or in a user program: - POWER - RADIO MODE - ESSID (Extended Service Set ID) - ENCRYPTION - AUTHENTICATION - EAP TYPE - KEY(WEP KEY, PRE SHARED KEY) For the procedure in System Menu, refer to the "BHT-700BB/700BWB/700BWBG-CE User's Manual"...
  • Page 38: Wireless Communication Parameters

    12.2.1. Wireless Communication Parameters Settable Parameters The BHT can be used with the following security configurations by setting ZeroConfig. - PEAP (802.1x) - EAP-TLS (802.1x) - PEAP (WPA) - EAP-TLS (WPA) - PSK (WPA) - PEAP (WPA2) - EAP-TLS (WPA2) - PSK (WPA2) Details of the parameters used with the above security configurations are outlined in the table below.
  • Page 39 ▪ POWER Set the power mode for the wireless module built in the BHT. The following two power modes are available. The default is P_PWRSAVE_PSP. The set value is validated when the wireless LAN device is opened first after setting. Power mode Power consuming state P_PWRSAVE_CAM...
  • Page 40 ▪ EAP TYPE This is the EAP type setting. A selection can be made from Prohibited, PEAP, and TLS. ▪ KEY (WEP KEY, PRE SHARED KEY) The encryption key (WEP KEY or PRESHARE KEY) can be set. [Ex.] Setting to enable WEP. Set the WEP KEY to "01234567890123456789ABCDEF" (128 bit). DWORD dwVal = P_AUTH_OPEN;...
  • Page 41: Opening And Closing The Wireless Communications Device

    12.2.2. Opening and Closing the Wireless Communications Device Use the BHT_RF_Open and BHT_RF_OpenEx functions to start up the wireless communication device and permit wireless communication. Use the BHT_RF_Close and BHT_RF_CloseEx functions to stop the wireless communication device and prohibit wireless communication. Use the BHT_RF_OpenEx (DWORD dwOpt) and BHT_RF_CloseEx (DWORD dwOpt) functions to perform wireless communication in the following communication formats.
  • Page 42: Checking Synchronization With The Access Point

    12.2.3. Checking Synchronization with the Access Point When performing data communication with a wireless communication device, use the BHT_RF_Synchronize function to check whether synchronization with the access point has been obtained. The following is a list of possible reasons why it may not be possible to obtain synchronization with the access point.
  • Page 43: Chapter 13. Barcode Reading

    Chapter 13. Barcode Reading 13.1. Outline 13.1.1. Enable Reading BHT-700B The BHT_EnableBar function enables the barcode device to read barcodes. In this function, you may specify the following barcode types available in the BHT. The BHT can handle one of them or their combination.
  • Page 44 BHT-700Q The BHT_EnableBar function enables the barcode device to read barcodes. In this function, you may specify the following barcode types available in the BHT. The BHT can handle one of them or their combination. Available Barcode Type Default Setting 2D codes Not specified: Model 1, Model 2, Micro QR code, code version QR code...
  • Page 45: Specify Options In The Bht_Enablebar Function

    13.1.2. Specify Options in the BHT_EnableBar Function You may also specify several options as listed below for each of the barcode types in the BHT_EnableBar function. BHT-700B Barcode type Options Universal product code Initial (country flag) add-on code Interleaved 2of5 (ITF) Length of read data Check digit CODABAR (NW-7)
  • Page 46: Barcode Buffer

    13.1.3. Barcode Buffer The barcode buffer stores the inputted barcode data. BHT-700B The barcode buffer will be occupied by one operator entry job and can contain up to 99 characters. BHT-700Q The barcode buffer will be occupied by one operator entry job and can contain up to 99 bytes in barcode or 8,192 bytes in 2D code (1 kanji character equals 2 bytes).
  • Page 47: Programming

    13.2. Programming 13.2.1. Code Mark The BHT_GetBarType function allows you to check the code mark (denoting the code type) and the length of the inputted barcode data. 13.2.2. Multiple Code Reading You may activate the multiple code reading feature which reads more than one code type while automatically identifying them.
  • Page 48: Controlling The Indicator Led And Beeper/Vibrator As A Confirmation Of Successful Reading

    13.2.5. Controlling the Indicator LED and Beeper/Vibrator as a Confirmation of Successful Reading By using the BHT_EnableBar function, you can control: - whether the indicator LED should light in blue or not (Default: Light in blue) - whether the beeper should beep or not (Default: No beep) when a barcode is read successfully.
  • Page 49: Barcode Reading Using The Virtual Com Port

    NOTE: In the Point Scan mode, scanning split codes in batch edit mode is disabled. (For details about the Point Scan mode, refer to the “BHT-700BB/700BWB/700BWBG-CE User's Manual” or "BHT- 700QWBG-CE User's Manual"). 13.3. Barcode Reading Using the Virtual COM Port 13.3.1.
  • Page 50: Chapter 14. Updating Os

    Chapter 14. Updating OS The OS can be updated (version update) using the following method when running Windows CE. (1) Copy the OS image file to an arbitrary folder. (2) Execute the BHT_SystemModify function. For the 1st argument, specify the absolute path to the folder in which the OS image file was stored, and for the 2nd argument, specify whether to turn OFF the power or perform a cold boot after updating the OS.
  • Page 51: Chapter 15. System Functions

    Chapter 15. System Functions System functions are used when setting or acquiring system values or when acquiring device information. Function Used to: Write system parameter values (DWORD). BHT_SetSysSettingDW Read system parameter values (DWORD). BHT_GetSysSettingDW Write system parameter values (character string). BHT_SetSysSettingWCS BHT_GetSysSettingWCS Read system parameter values (character string).
  • Page 52: If A System Parameter Value Is Dword

    15.1. If a System Parameter Value is DWORD BHT_SetSysSettingDW Description Write system parameter values. Syntax DWORD BHT_SetSysSettingDW ( DWORD dwCtrlCode DWORD dwSysParam Parameters dwCtrlCode [in] Control code dwSysParam [in] Parameter value Return value Error code Meaning ERROR_SUCCESS Successful completion ERROR_INVALID_PARAMETER Invalid parameter ERROR_GEN_FAILURE Not supported...
  • Page 53 BHT_GetSysSettingDW Description Read system parameter values. Syntax DWORD BHT_GetSysSettingDW ( DWORD dwCtrlCode DWORD* pdwSysParam Parameters dwCtrlCode [in] Control code pdwSysParam [out] Address for storing the parameter value Return value Error code Meaning ERROR_SUCCESS Successful completion ERROR_GEN_FAILURE Not supported ERROR_INVALID_PARAMETER No storage address specified...
  • Page 54: If A System Parameter Value Is A Character String

    15.2. If a System Parameter Value is a Character String BHT_SetSysSettingWCS Description Write system parameter values. Syntax DWORD BHT_SetSysSettingWCS ( DWORD dwCtrlCode TCHAR* pwchSysParam DWORD dwLen Parameters dwCtrlCode [in] Control code pwchSysParam [in] Heading address of the storage buffer for a string written dwLen [in] String length Return value...
  • Page 55 BHT_GetSysSettingWCS Description Read system parameter values. Syntax DWORD BHT_GetSysSettingWCS ( DWORD dwCtrlCode TCHAR* pwchSysParam DWORD dwLen DWORD* pdwLenReturned Parameters dwCtrlCode [in] Control code pwchSysParam [out] Heading address of the storage buffer for a string read dwLen [in] String length pdwLenReturned [out] Length of the string read out Return value Error code...
  • Page 56: System Parameter Values That Can Be Set/Obtained

    15.3. System Parameter Values That Can be Set/Obtained Validating Parameter name Type Control code Parameter value Default timing System information related System version BHT_SYS_OS (4 characters) _VERSION Total RAM size BHT_SYS (bytes)(*1) _RAMSIZE Total ROM size BHT_SYS (bytes) (*1) _ROMSIZE Model name BHT_SYS (8 characters)
  • Page 57 Validating Parameter name Type Control code Parameter value Default timing Backlight related Backlight ON-duration BHT_BACKLIGHT 0 - 255 When backlight (sec.) _BATT_TIME 0: Backlight OFF illumination timer 255: Backlight continuously is next reset (When battery- driven) Backlight ON-duration BHT_BACKLIGHT 0 - 255 When backlight (sec.) _AC_TIME...
  • Page 58 Scanning range marker BHT_BAR_MARKER MARKER_NORMAL MARKER Immediately (*6) : Normal mode _NORMAL after setting MARKER_AHEAD Maker ahead MARKER_DISABLE : Fixed to OFF...
  • Page 59 Validating Parameter name Type Control code Parameter value Default timing Front-back inverted BHT_BAR_REVERSE 0: Disable Immediately reading (*6) 1: Enable after setting Scan mode (*6) BHT_BAR_SCAN SCAN_MODE_NORMAL SCAN_MODE_ When the _MODE : Normal mode NORMAL barcode device is opened first SCAN_MODE_POINT after setting : Point scan mode...
  • Page 60 Parameter name Type Control code Parameter value Default Validating timing Status indicator related Battery voltage level BHT_ICON 0: Hide Immediately after setting icon _BATTERY 1: Display Software keyboard BHT_ICON_SIP 0: Hide Immediately after setting icon 1: Display Keypad shift icon BHT_ICON 0: Hide The icon appears when the...
  • Page 61 Parameter name Type Control code Parameter value Default Validating timing Display related Screen rotation BHT_DISP DISP_ROTATION_0 DISP Immediately _ROTATION : 0° _ROTATION_0 after setting DISP_ROTATION_90 : 90° DISP_ROTATION_180 : 180° DISP_ROTATION_270 : 270° Screen rotation control BHT_DISP Key no. None Immediately _ROTATION_KEY after setting...
  • Page 62: Device Information Acquisition

    15.4. Device Information Acquisition BHT_GetDeviceInfo Description Acquires the mounted device information. Syntax DWORD BHT_GetDeviceInfo( DWORD dwDevice, DWORD* pdwDevInfo, LPVOID pvExtInfo Parameters dwDevice [in] Type of the device for which information is being acquired pdwDevInfo [out] Device information storage location pdwDevInfo [out] Extension information storage location Return Value Error Code...
  • Page 63: Chapter 16. Device Control Functions

    Chapter 16. Device Control Functions The device control functions listed below control the devices (barcode reading device, backlight, battery, indicator LED, etc.) dedicated to the BHT. Function Used to: Open the barcode device file to enable barcode reading. This function BHT_EnableBar specifies the read mode and readable barcode types.
  • Page 64 Function Used to: Open the wireless LAN device and enable wireless communication. BHT_RF_Open Set the communication format, open the wireless LAN device and enable BHT_RF_OpenEx wireless communication. Close the wireless LAN device and disable wireless communication. BHT_RF_Close Close the wireless LAN device for the set format and disable wireless BHT_RF_CloseEx communication.
  • Page 65: Barcode Api

    16.1. Barcode API BHT_EnableBar Description Open the barcode device file to enable barcode reading. This function specifies the read mode and readable barcode types. Up to eight barcode types can be specified. Syntax DWORD BHT_EnableBar ( TCHAR* pwchRdMode TCHAR* pwchCdParam Parameters pwchRdMode [in] Heading address of the storage buffer for a character string specifying the read mode,...
  • Page 66 ■ Readmode The BHT supports four read modes--the momentary switching mode, the auto-off mode, the alternate switching mode, and the continuous reading mode, which can be selected by specifying M, F, A, and C to readmode, respectively. □ Momentary switching mode (M) Only when you hold down the trigger switch, the illumination LED lights and the BHT can read a barcode.
  • Page 67 ■ Beepercontrol and LEDcontrol This function can control the beeper and the indicator LED to activate or deactivate each of them when a barcode is read successfully. This function may also control the vibrator with beepercontrol. - You should describe parameters of readmode, beepercontrol, and LEDcontrol without any space inbetween.
  • Page 68 □ Interleaved 2 of 5 (ITF) (I) Syntax I[:[mini.no.digits[-max.no.digits]][CD]] where mini.no.digits and max.no.digits are the minimum and maximum numbers of digits for barcodes to be read by the BHT, respectively.They should be a numeral from 2 to 99 and satisfy the following conditions: mini.no.digits ≤...
  • Page 69 □ CODABAR (NW-7) (N) Syntax N[:[mini.no.digits[-max.no.digits]][startstop][CD]] Where mini.no.digits and max.no.digits are the minimum and maximum numbers of digits for barcodes to be read by the BHT, respectively.They should be a numeral from 3 to 99 and satisfy the following condition: mini.no.digits ≤...
  • Page 70 □ CODE-39 (M) Syntax M[:[mini.no.digits[-max.no.digits]][CD]] Where mini.no.digits and max.no.digits are the minimum and maximum numbers of digits for barcodes to be read by the BHT, respectively.They should be a numeral from 1 to 99, excluding start/stop characters. They should satisfy the following condition: mini.no.digits ≤...
  • Page 71 □ CODE-93 (L) Syntax L[:[mini.no.digits[-max.no.digits]]] Where mini.no.digits and max.no.digits are the minimum and maximum numbers of digits for barcodes to be read by the BHT, respectively.They should be a numeral from 1 to 99, excluding start/stop characters and check digits. They should satisfy the following condition: mini.no.digits ≤...
  • Page 72 □ CODE-128 (K) Syntax K[:[mini.no.digits[-max.no.digits]]] Where mini.no.digits and max.no.digits are the minimum and maximum numbers of digits for barcodes to be read by the BHT, respectively.They should be a numeral from 1 to 99, excluding start/stop characters and check digit. They should satisfy the following condition: mini.no.digits ≤...
  • Page 73 Handling special characters If the BHT reads any barcode consisting of special characters only (such as FNC, CODEA, CODEB, CODEC and SHIFT characters), it will not transfer the data to the barcode buffer. The beeper sounds only if it is enabled. Details about FNC characters (1) FNC1 The BHT will not transfer an FNC1 character placed at the first or second character position...
  • Page 74 □ Standard 2 of 5 (STF) (H) Syntax H[:[mini.no.digits[-max.no.digits]][CD][startstop]] Where mini.no.digits and max.no.digits are the minimum and maximum numbers of digits for barcodes to be read by the BHT, respectively.They should be a numeral from 1 to 99, excluding start/stop characters. They should satisfy the following condition: mini.no.digits ≤...
  • Page 75 □ MSI (P) Syntax P[:[mini.no.digits[-max.no.digits]][CD]] Where mini.no.digits and max.no.digits are the minimum and maximum numbers of digits for barcodes to be read by the BHT, respectively.They should be a numeral from 1 to 99, excluding start/stop characters. They should satisfy the following condition: mini.no.digits ≤...
  • Page 76 BHT-700Q The readable barcodes include, among 2D codes, QR code, PDF417, MaxiCode, Data Matrix, and EAN·UCC composite, and, among barcodes, universal product code, interleaved 2of5 (ITF), Codabar (NW-7), Code 39, Code 93, Code 128, and RSS. Further, the BHT-700Q can read EAN-128 with Code 128 (read specified).
  • Page 77 In scannning a split code in edit mode, the maximum data length is 8,192 bytes. Data exceeding 8,192 bytes causes a read error to be recognized and the beeper to sound for 500 ms. The read data will be destroyed. When a split code is read in non-edit mode, the read data is stored into the barcode buffer in the following format: No.
  • Page 78 □ MaxiCode(X) Syntax □ MaxiCode(Z) Syntax Z [:[symbol type [min code no.[−max code no.]]] [;symbol type [min code no.[−max code no.]]]] For symbol type, you can specify one of the values shown below. Symbol type Applicable code Square Data Matrix Rectangular Data Matrix “min code no.”...
  • Page 79 □ Universal product code (A) Syntax A [:[code][1 character [2 character]] [supplemental]] Specify one of the codes listed below. Code Barcode type EAN-13 (JAN-13), UPC-A EAN-8 (JAN-8) UPC-E If you do not specify any of the codes, all of the above-listed codes can be read. The first and second characters are the first characters representing the country flag and must be a numeral (0 through 9) each.
  • Page 80 □ Interleaved 2of5 (ITF) (I) Syntax I [:[min no. digits [−max no. digits]][CD][;[1 character [2 character]]]] “min no. digits” and “max no. digits” are the minimum and maximum numbers of digits of the barcode. You can specify any pair of numbers between 2 and 99 (inclusive) that satisfy the following relationship: min no.
  • Page 81 □ Codabar (NW-7) (N) Syntax N [:[min no. digits [− max no. digits]][startstop] [CD]] “min no. digits” and “max no. digits” are the minimum and maximum numbers of digits of the barcode. You can specify any pair of numbers between 3 and 99 (inclusive) that satisfy the following relationship: min no.
  • Page 82 □ Code 39 (M) Syntax M [:[min no. digits [−max no. digits]][CD][;[1 character [2 character]]]] “min no. digits” and “max no. digits” are the minimum and maximum numbers of digits of the barcode. The start character and the stop character are not included in the number of digits here. You can specify any pair of numbers between 1 and 99 (inclusive) that satisfy the following relationship: min no.
  • Page 83 □ CODE-93 (L) Syntax L [: [min.no.digits [-max.no.digits]][;1 digit [-2 digit]]]] Where min.no.digits and max.no.digits are the minimum and maximum numbers of digits for barcodes to be read by the BHT, respectively. These should be numerals from 1 to 99, excluding start/stop characters and check digits, and should satisfy the following condition: min no.
  • Page 84 □ Code 128 (K) Syntax K [:[min no. digits [−max no. digits]][;[1 character [2 character]]]] “min no. digits” and “max no. digits” are the minimum and maximum numbers of digits of the barcode. The start character and the stop character are not included in the number of digits here. You can specify any pair of numbers between 1 and 99 (inclusive) that satisfy the following relationship: min no.
  • Page 85 Positions of special characters When a code consisting only of special characters (FNC, CODEA, CODEB, CODEC, and SHIFT characters) or a code containing FNC3 has been read, the read data is not stored into the barcode buffer. When beeper sounding is enabled, the beeper sounds. Handling of FNC characters (1) FNC1 The FNC1 character located 1 or 2 places after the start character will not be stored into the barcode...
  • Page 86 ■ Multi-line code reading To specify Multi-line code reading, specify “&” followed by the codes to be read. Up to three rows can be specified. Syntax “&, (code in 1 row), (code in 2 row)[, (code in 3 row)]” The codes supported in multi-line code reading are the universal product code, interleaved 2of5 (ITF), Codabar (NW-7), Code 39, and Code 128 (all among barcodes).
  • Page 87 (5) If the same code (with the same code type and the same data code) appears more than once in a multi-line code, the BHT cannot read it. [Ex] A code consisting of EAN-13: “4912345678904” in the first row, EAN-13; “1200000000003” in the second row, and EAN-13 “4912345678904”...
  • Page 88 BHT_DisableBar Description: Close the barcode device file to disable barcode reading. Syntax: DWORD BHT_DisableBar (void) Parameters None Return value Error code Meaning ERROR_SUCCESS Successful completion ERROR_INVALID_HANDLE Barcode device file not opened...
  • Page 89 BHT_ReadBar Description Read out data read from the barcode buffer. If the string length longer than that of the read barcode is specified to dwBarLen, the remaining area following the read barcode will be filled with NULL codes. If barcode reading is not enabled, an error (ERROR_INVALID_HANDLE) will result. Syntax: DWORD BHT_ReadBar ( TCHAR*...
  • Page 90 BHT_ReadBarEx Description Read out data from the barcode buffer and encodes it into the specified data format. If the length of the read data is shorter than the specified maximum data length (dwBarLen), the excess part will be filled with 0s. If barcode reading is disabled, an error (ERROR_INVALID_HANDLE) will be caused.
  • Page 91 BHT_GetBarType Description BHT-700B Read the barcode type and the number of digits of a barcode read most recently. If no barcode has been read after the BHT was turned on, the function gets "0." BHT-700Q Read the barcode type and the number of digits of a barcode read most recently. If no barcode has been read after the BHT was turned on, the function gets "0."...
  • Page 92 BHT_ GetBarInfo Description BHT-700B Read the information on the code read most recently, including the code type and the number of digits in the code. If no barcode has been read after the BHT was turned on, the function gets "0" for both the code type and the number of digits.
  • Page 93 BHT_GetBarNum Description Read the number of digits of the barcode remaining in the barcode buffer. If barcode reading is not enabled, an error (ERROR_INVALID_HANDLE) will result. Syntax DWORD BHT_GetBarNum ( DWORD* pdwCodeNum Parameters pdwCodeNum [out] Address for storing the barcode length Return value Error code Meaning...
  • Page 94 BHT_GetBarChkDgt Description the barcode data Calculate a check digit (CD) of according to the calculation method specified by dwCDType. Syntax DWORD BHT_GetBarChkDgt ( TCHAR* pwchBarbuf DWORD dwCDType DWORD* pdwChkdgt Parameters pwchBarbuf [in] Heading address of barcode data storage buffer dwCDType [in] Check digit type Barcode type and the corresponding calculation method Barcode Type...
  • Page 95 Comment: If barcode data contains a character(s) out of the specification of the barcode type specified by dwCDType, then this function sets "0" and returns an error code. However, if only the CD position character in barcode data is out of the specification, this function calculates the correct CD and returns it as one-character string.
  • Page 96 When dwCDType is A (EAN or UPC), this function identifies the EAN or UPC depending upon the data length (number of digits) as listed below. If the data length is a value other than 13, 8, and 7, this function gets "0" and returns an error code. Data length of barcode data Barcode type EAN-13 (JAN-13), UPC-A EAN-8 (JAN-8)
  • Page 97 When dwCDType is I (ITF), the length of barcode data must be an even number of two or more digits. If not, this function gets "0" and returns an error code. To check whether the CD is correct: Pass a CD-suffixed barcode data to the BHT_GetBarChkDgt function as shown below.
  • Page 98 When dwCDType is H (STF), the length of barcode data must be two or more digits. If not, this function gets "0" and returns an error code. To check whether the CD is correct: Pass a CD-suffixed barcode data to the BHT_GetBarChkDgt function as shown below.
  • Page 99 When dwCDType is N (Codabar), the length of barcode data must be three digits or more including start and stop characters. If not, this function gets "0" and returns an error code. To check whether the CD is correct: Pass a CD-suffixed barcode data to the BHT_GetBarChkDgt function as shown below.
  • Page 100 When dwCDType is M (Code 39), the length of barcode data must be two or more digits except for start and stop characters. If not, this function gets "0" and returns an error code. To check whether the CD is correct: Pass a CD-suffixed barcode data to the BHT_GetBarChkDgt function as shown below.
  • Page 101 When dwCDType is P (MSI), the length of barcode data must be two or more digits. If not, this function gets "0" and returns an error code. To calculate a two-digit CD, call this function twice. To check whether the CD is correct: Pass a CD-suffixed barcode data to the BHT_GetBarChkDgt function as shown below.
  • Page 102 BHT_BAR_SetDecodeOptions Description Sets the editing function setting value for the decoded result. This is supported only by the BHT-700B. Syntax DWORD BHT_BAR_SetDecodeOptions ( EN_DCD_OPTIONS_CODE_TYPE enCodeType, LPVOID pOptions, DWORD dwLen) Parameters enCodeType [in] Code type to be edited pOptions [out] Editing function setting value. The addresses for the structure are listed below. Code type EnCodeType pOptions...
  • Page 103 Member name Default Details FALSE Used to convert (TRUE) or not convert (FALSE) bConvertToUPCA to UPC-A. FALSE Used to add (TRUE) or not add (FALSE) a “0” at bReportNumsys the beginning. TRUE Used to add (TRUE) or not add (FALSE) a C/D. bReportChk typedef struct _ST_DCD_UPCA_OPTIONS { bReportNumsys;...
  • Page 104 BHT_BAR_GetDecodeOptions Description Sets the editing function setting value for the decoded result. This is supported only by the BHT-700B. Syntax DWORD BHT_BAR_GetDecodeOptions ( EN_DCD_OPTIONS_CODE_TYPE enCodeType, TCHAR * pwchSysParam, LPVOID pOptions, DWORD* pdwLen) Parameters enCodeType [in] Code type to be edited pOptions [out] Editing function setting value.
  • Page 105 Member name Default Details FALSE Used to convert (TRUE) or not convert (FALSE) bConvertToUPCA to UPC-A. FALSE Used to add (TRUE) or not add (FALSE) a “0” at bReportNumsys the beginning. TRUE Used to add (TRUE) or not add (FALSE) a C/D. bReportChk typedef struct _ST_DCD_UPCA_OPTIONS { BOOL...
  • Page 106: Backlight Api

    16.2. Backlight API BHT_SetBltStatus Description Control the backlight. Syntax DWORD BHT_SetBltStatus ( DWORD dwStatus Parameters dwStatus [in] Backlight status Specification dwStatus BHT_BL_ENABLE_ON Turn on the backlight. (*1) BHT_BL_ENABLE_OFF Turn off the backlight. BHT_BL_DISABLE Disable the backlight. (*1) The backlight specified with the BHT_SetSysSettingDW (BHT_BACKLIGHT_DEVICE,…) function illuminates. Return value Error code Meaning...
  • Page 107 BHT_GetBltStatus Description Read the backlight status. Syntax DWORD BHT_GetBltStatus ( DWORD* pdwStatus Parameters pdwStatus [out] Current backlight status Specification pdwStatus BHT_BL_ENABLE_ON Backlight ON BHT_BL_ENABLE_OFF Backlight OFF BHT_BL_DISABLE Backlight enabled Return value Error code Meaning ERROR_SUCCESS Successful completion ERROR_INVALID_PARAMETER Storage address not specified.
  • Page 108: Battery Api

    16.3. Battery API BHT_GetPowerStatus Description Read information about the battery loaded in the BHT body. Syntax DWORD BHT_GetPowerStatus ( WORD* pwCuOnLine WORD* pwBatteryFlag WORD* pwBatteryVoltage WORD* pwBatteryChemistry Parameters pwCuOnLine [out] Read the BHT state on/off the CU Specification pwCuOnLine AC_LINE_ONLINE Placed on the CU AC_LINE_OFFLINE Not placed on the CU pwBatteryFlag...
  • Page 109 BHT_GetPowerStatus2nd Description Read information about the battery loaded in the grip. Syntax DWORD BHT_GetPowerStatus2nd ( WORD* pwCuOnLine WORD* pwBatteryFlag WORD* pwBatteryVoltage WORD* pwBatteryChemistry Parameters pwCuOnLine [out] Read the BHT state on/off the CU Specification pwCuOnLine AC_LINE_ONLINE Placed on the CU AC_LINE_OFFLINE Not placed on the CU pwBatteryFlag [out] Read battery voltage level...
  • Page 110: Led Api

    16.4. LED API BHT_GetNLedStatus Description Read the status of the indicator LED (red/blue). Syntax DWORD BHT_GetNLedStatus ( DWORD* pdwInfo Parameters pdwInfo [out] Address for storing the LED status Specification pdwInfo LED_OFF Both red and blue LEDs OFF RED_LED_ON Red LED ON GREEN_LED_ON Blue LED ON RED_LED_ON | GREEN_LED_ON Both red and blue LEDs ON...
  • Page 111 BHT_SetNLedStatus Description Control the indicator LED (red/blue). Syntax DWORD BHT_SetNLedStatus ( DWORD dwStatus Parameters dwStatus [in] Controls the LED ON/OFF Specification dwStatus LED_OFF Turn off both red and blue LEDs RED_LED_ON Turn on red LED only GREEN_LED_ON Turn on blue LED only RED_LED_ON | GREEN_LED_ON Turn on both red and blue LEDs Return value Error code...
  • Page 112 BHT_GetNLedStatusEx Description Read the status of the indicator LED and synchronization LED. Syntax DWORD BHT_GetNLedStatusEx ( DWORD dwLedDevice DWORD* pdwStatus Parameters dwLedDevice [in] LED device Specification dwLedDevice LED_BAR Indicator LED pdwStatus [out] Address for storing the LED status Specification pdwStatus If dwLedDevice = LED_BAR RED_LED_ON Red LED ON (Blue LED OFF)
  • Page 113 BHT_SetNLedOn Description Turn on the indicator LED and/or synchronization LED. Syntax DWORD BHT_SetNLedOn ( DWORD dwLedDevice DWORD dwLedNum Parameters dwLedDevice [in] LED device Specification dwLedDevice LED_BAR Indicator LED dwLedNum [in] LEDs to be turned on Specification dwLedNum If dwLedDevice = LED_BAR RED_LED Red LED GREEN_LED...
  • Page 114 BHT_SetNLedOff Description Turn off the indicator LED and/or synchronization LED. Syntax DWORD BHT_SetNLedOff ( DWORD dwLedDevice DWORD dwLedNum Parameters dwLedDevice [in] LED device Specification dwLedDevice LED_BAR Indicator LED dwLedNum [in] LEDs to be turned off Specification dwLedNum If dwLedDevice = LED_BAR RED_LED Red LED GREEN_LED...
  • Page 115: Beeper/Vibrator Api

    16.5. Beeper/Vibrator API BHT_StartBeep Description Drive the beeper or vibrator. Syntax DWORD BHT_StartBeep ( DWORD dwOnTime DWORD dwOffTime WORD wRepCnt WORD wFreq Parameters dwOnTime [in] ON-duration (in units of 100 ms), Entry range: 0 to 255 dwOffTime [in] OFF-duration (in units of 100 ms), Entry range: 0 to 255 wRepCnt [in] Number of repetitions, Entry range: 0 to 255 wFreq...
  • Page 116 Comment: - The system functions allow the beeper volume to be changed. (Refer to Section 5.2. and 5.3.) wFreq - Specification of any of 3 through 667 to deactivates the beeper or vibrator. - Specification of zero to dwOnTime deactivates the beeper or vibrator. - Specification of a value except zero to dwOnTime and wRepCnt and specification of zero to dwOffTime keep the beeper sounding.
  • Page 117 BHT_StartBeeperOnly Description Drive the beeper. Syntax DWORD BHT_StartBeeperOnly ( DWORD dwOnTime DWORD dwOffTime, WORD wRepCnt WORD wFreq Parameters dwOnTime [in] ON-duration (in units of 100 ms), Entry range: 0 to 255 dwOffTime [in] OFF-duration (in units of 100 ms), Entry range: 0 to 255 wRepCnt [in] Number of repetitions, Entry range: 0 to 255 wFreq...
  • Page 118 Comment: - The system functions allow the beeper volume to be changed. (Refer to Section 5.2. and 5.3.) wFreq - Specification of any of 3 through 667 to deactivates the beeper or vibrator. - Specification of zero to dwOnTime deactivates the beeper or vibrator. - Specification of a value except zero to dwOnTime and wRepCnt and specification of zero to dwOffTime keep the beeper sounding.
  • Page 119 BHT_StartVibrationOnly Description Drive the vibrator. Syntax DWORD BHT_StartVibrationOnly ( DWORD dwOnTime DWORD dwOffTime WORD wRepCnt Parameters dwOnTime [in] ON-duration (in units of 100 ms), Entry range: 0 to 255 dwOffTime [in] OFF-duration (in units of 100 ms), Entry range: 0 to 255 wRepCnt [in] Number of repetitions, Entry range: 0 to 255 Return value...
  • Page 120: Wireless Communication Api

    16.6. Wireless Communication API BHT_RF_Open Description Open the wireless LAN device and enable wireless communication. Syntax DWORD BHT_RF_Open ( void ) Parameters None Return value Error code Meaning ERROR_SUCCESS Successful completion ERROR_DEV_NOT_EXIST No NIC device found. ERROR_SHARING_VIOLATION Bluetooth device is opened. Remarks Wireless LAN and Bluetooth device cannot be opened at the same time.
  • Page 121 BHT_RF_OpenEx Description Sets the communication format, opens the wireless LAN device and enables wireless communication. Syntax DWORD BHT_RF_OpenEx ( DWORD dwOpt Parameters dwOpt [in] Communication format Specification dwOpt Wireless communication open COMM_NORMAL COMM_CONTINUOUS Wireless communication continuously open Return value Error code Meaning ERROR_SUCCESS Successful completion...
  • Page 122 BHT_RF_Close Description Close the wireless LAN device and disable wireless communication. Syntax DWORD BHT_RF_Close ( void ) Parameters None Return value Error code Meaning ERROR_SUCCESS Successful completion...
  • Page 123 BHT_RF_CloseEx Description Closes the wireless LAN device for the set format and disables wireless communication. Syntax DWORD BHT_RF_CloseEx ( DWORD dwOpt Parameters dwOpt [in] Communication format Specification dwOpt Wireless communication open COMM_NORMAL COMM_CONTINUOUS Wireless communication continuously open Return value Error code Meaning ERROR_SUCCESS Successful completion...
  • Page 124 BHT_RF_IoControl Description Sends a control command to the driver and performs an operation corresponding to that command. Syntax DWORD BHT_RF_IoControl ( DWORD LPVOID lpInBuf DWORD nInBufSize LPVOID lpOutBuf DWORD nOutBufSize LPVOID lpBytesReturned Parameters [in] Control command ID Specification RF_UPDATE_PROFILE Updates the profile settings for the BHT wireless registry. (*1) RF_COMMIT_PROFILE Updates the changed parameter value to the driver.
  • Page 125 The details set for each argument differ for each command. lpInBuf nInBufSize lpOutBuf nOutBufSize − − − − RF_UPDATE_PROFILE − − − − RF_COMMIT_PROFILE ST_RF ST_RF_PROFILE _PROFILE_KEY − − RF_SET_PROFILE _KEY size (*3) ST_RF ST_RF_PROFILE RF_REMOVE_PROFILE − − _PROFILE_KEY _KEY size Profile count −...
  • Page 126 BHT_RF_Synchronize Description Get the association status. Syntax DWORD BHT_RF_Synchronize ( long lTimeout long* plSync Parameters lTimeout [in] Timeout (in units of 100 ms) Specification lTimeout > 0 Confirm the synchronization status until timeout Check the synchronization status immediately and return the result Try to synchronize with the access point until synchronized plSync [out] Address for storing the synchronization result...
  • Page 127 BHT_RF_GetParamInt Description Read integer from the wireless communications parameter. Syntax DWORD BHT_RF_GetParamInt ( DWORD dwParam DWORD* pdwData DWORD* pdwLen Parameters dwParam [in] Parameter number Specification dwParam Power mode dwData P_INT_POWERSAVE = P_PWRSAVE_CAM = P_PWRSAVE_PSP Radio mode dwData = P_RADIOMODE_11A P_INT_RADIOMODE = P_RADIOMODE_11B = P_RADIOMODE_11B | P_RADIOMODE_11G...
  • Page 128 Return value Error code Meaning ERROR_SUCCESS Successful completion Parameter error ERROR_INVALID_PARAMETER Address for storing data obtained not specified. ERROR_NOT_SUPPORTED Not supported...
  • Page 129 BHT_RF_SetParamInt Description Write integer to the wireless communications parameter. Syntax DWORD BHT_RF_SetParamInt ( DWORD dwParam const DWORD* pdwData DWORD dwLen Parameters dwParam [in] Parameter number Specification dwParam Power mode dwData P_INT_POWERSAVE = P_PWRSAVE_CAM = P_PWRSAVE_PSP Radio mode dwData = P_RADIOMODE_11A P_INT_RADIOMODE = P_RADIOMODE_11B = P_RADIOMODE_11B |...
  • Page 130 Return value Error code Meaning ERROR_SUCCESS Successful completion Parameter error ERROR_INVALID_PARAMETER Address for storing data obtained not specified. ERROR_NOT_SUPPORTED Not supported...
  • Page 131 BHT_RF_GetParamStr Description Read string from the wireless communications parameter. Syntax DWORD BHT_RF_GetParamStr ( DWORD dwParam TCHAR* pwchData DWORD* pdwLen Parameters dwParam [in] Parameter number Specification dwParam P_STR_VERSION Driver version P_STR_FW_VERSION Firmware version P_STR_MACADDRESS MAC address pwchData [out] Heading address of the storage buffer for data obtained pdwLen [out] Length of data obtained Return value...
  • Page 132 BHT_RF_SetParamStr Description Write character string to the wireless communications parameter. Syntax DWORD BHT_RF_SetParamStr ( DWORD dwParam TCHAR* pwchData DWORD dwLen Parameters dwParam [in] Parameter number Specification dwParam P_STR_WEPKEY1 WEP Key 1 P_STR_PRESHAREDKEY Pre Shared Key pwchData [in] Heading address of the storage buffer for data specified dwLen [in] Length of data specified Return value...
  • Page 133 BHT_RF_GetInfoInt Description Read integer from the communications parameter. Syntax DWORD BHT_RF_GetInfoInt ( DWORD dwType DWORD* pdwInfo Parameters dwType [in] Type of information to be read out Specification dwType Current communication speeds: → P_RATE_NOT_LINK No link → P_RATE_1MBPS 1Mbps → P_RATE_2MBPS 2Mbps P_RATE_INFO 5.5Mbps →...
  • Page 134 BHT_RF_GetInfoStr Description Read string from the communications parameter. Syntax DWORD BHT_RF_GetInfoStr ( DWORD dwType TCHAR* pwchInfo Parameters dwType [in] Type of information to be read out Specification dwType P_APMAC_INFO MAC address of AP being linked pwchInfo [out] Heading address of the storage buffer for info read Return value Error code Meaning...
  • Page 135 BHT_RF_GetSiteSurvey Description Get the quality of the communications link. Syntax DWORD BHT_RF_GetSiteSurvey ( DWORD* pdwStrength DWORD* pdwBeacon DWORD* pdwLink Parameters pdwStrength [out] Current signal strength, 0 to 100 (%) pdwBeacon [out] The same value as pdwStrength, 0 to 100 (%) pdwLink [out] Current link quality Specification...
  • Page 136: Os Updating Api

    16.7. OS Updating API BHT_SystemModify Description Update the BHT OS. Syntax DWORD BHT_SystemModify ( DWORD dwCtrlCode, TCHAR * pwchSysParam, DWORD dwLen, DWORD * pdwLenReturned Parameters pwszFileName [in] Pointer filename that points a NULL-appended character string containing the OS reconfiguration filename. dwMode [in] Reboot mode after turning the power off Specification...
  • Page 137: Bluetooth Api

    16.8. Bluetooth API BHT_BT_PowerOn Description Turns ON the Bluetooth device power supply and enables Bluetooth. Syntax DWORD BHT_BT_PowerOn ( void ) Parameters None Return value Error code Meaning ERROR_SUCCESS Successful completion The unit is not equipped with a Bluetooth ERROR_DEV_NOT_EXIST device.
  • Page 138 BHT_BT_PowerOff Description Turns OFF the Bluetooth device power supply and disables Bluetooth. Syntax DWORD BHT_BT_PowerOff ( void ) Parameters None Return value Error code Meaning ERROR_SUCCESS Successful completion The unit is not equipped with a Bluetooth ERROR_DEV_NOT_EXIST device.
  • Page 139 BHT_BT_GetPowerStatus Description Acquires the Bluetooth device power status. Syntax DWORD BHT_BT_GetPowerStatus ( DWORD *pdwStatus Parameters pdwStatus [in] Device status storage location address The following values are returned for the device status. Specification pdwStatus BHT_BT_POWER_ON The Bluetooth device power is ON. BHT_BT_POWER_OFF The Bluetooth device power is OFF.
  • Page 140: Other Apis

    16.9. Other APIs BHT_WaitEvent Description Make the system wait until the specified event or timeout occurs. Syntax DWORD BHT_WaitEvent ( DWORD dwEvtNum DWORD dwEvtMask DWORD dwTimeOut DWORD* pdwSignalEvent Parameters dwEvtNum [in] Number of events to wait dwEvtMask [in] Waiting event mask Specification dwEvtMask EVT_MASK_KEYDOWN...
  • Page 141 Return value Error code Meaning ERROR_SUCCESS Successful completion Parameter error. ERROR_INVALID_PARAMETER Storage address not specified Comment: The following five types of events can be specified: - Depression of any key - Depression of the trigger switch - Stylus release - Decoding completion - Data reception (in IrDA interface, Serial interface, USB interface) Specifying two or more events concurrently using this function allows the system to wait for occurrence of any of these events.
  • Page 142 BHT_WaitStandbyEvent Description Make the system wait until the specified event occurs. Syntax BHT_WaitStandbyEvent ( DWORD dwEvtNum DWORD dwEvtMask DWORD* pdwSignalEvent Parameters dwEvtNum [in] Number of events to wait dwEvtMask [in] Events to wait Specification dwEvtMask EVT_MASK_KEYDOWN Key depression EVT_MASK_TRGDOWN Trigger switch depression EVT_MASK_TCHUP Stylus release EVT_MASK_DECODE...
  • Page 143 Comment: The following five types of events can be specified: - Depression of any key - Depression of the trigger switch - Stylus release - Decoding completion - Data reception (in IrDA interface, Serial interface, USB interface) Unlike BHT_WaitEvent, this function lets the CPU enter the standby mode when making the system wait, reducing power consumption.
  • Page 144 BHT_ShutdownSystem Description Turn off the BHT and boot the BHT according to the mode specified by the parameter. Syntax DWORD BHT_ShutdownSystem ( DWORD dwMode Parameters dwMode [in] Power-off mode Specifications dwMode Turn off and warm-boot the BHT. No power-off action is required. BHT_PWR_WARM The contents in the RAM can be retained.
  • Page 145 BHT_RegStore Description Save the registry. Syntax DWORD BHT_RegStore ( void ) Parameters None Return value Error code Meaning ERROR_SUCCESS Successful completion ERROR_WRITE_FAULT Failed to save registry.
  • Page 146: Chapter 17. Programming Using Ocx (Ole Customer Control)

    Chapter 17. Programming Using OCX (OLE Customer Control) The BHT-700 Software Development Kit (BHT-700 SKD) provides ActiveX Control that can be used for programming applications for barcode reading and file transfer. This chapter gives information for using the ActiveX control. 17.1.
  • Page 147 (2)-2 Click Add Control and choose the newly installed OCX by clicking Open. (2)-3 Click OK, and the control is pasted as shown below. (3) Add the control to the project. (3)-1 Click Project–Add to Project–Components and Controls on the menu bar as shown below.
  • Page 148 (3)-2 Select the installed .OCX file. (3)-3 Click Insert, and the message “Do you insert component?” pops up. Click OK, and specify an appropriate class name, header filename and implement filename. (3)-4 If OK is clicked, an icon of the added control will be added to the dialog as shown below (red- circled).
  • Page 149: Scanner Control

    17.4. Scanner Control 17.4.1. Properties Name and type Value Default value Description eVC++ Enable/disable flag for barcode reading TRUE or GetPortOpen BOOL FALSE FALSE TRUE: Enable SetPortOpen FALSE: Disable Character string for specifying GetReadMode CString (*1) "FB" the read mode (*1), (*2) SetReadMode BHT700B "A,I:4-99,M:1-99,...
  • Page 150: Methods

    17.4.2. Methods GetChkDigit Description Calculate a check digit (CD) of the barcode data according to the specified calculation method. (Refer to the BHT_GetBarChkDgt function.) Syntax long GetChkDigit ( TCHAR* BarData short ChkDgtType Parameters BarData [in] Character string of the barcode ChkDgtType [in] Check digit type (For details, refer to the BHT_GetBarChkDgt function.)
  • Page 151 GetLastCount Description Supported only on BHT-700Q Read the number of digits in the specified row of the code that was read most recently. Syntax long GetLastCount ( long CodeNo) Parameters CodeNo [in] Row number for which you wish to get the number of digits (starting with “0” for the first row). Return value No.
  • Page 152 GetLastType Description Supported only on BHT-700Q Read the code type in the specified row of the code that was read most recently. Syntax long GetLastType( long CodeNo) Parameters CodeNo [in] Row number for which you wish to get the code type (starting with “0” for the first row). Return value Code type in the row specified in CodeNo If [the row number specified in CodeNo + 1] is larger than the number of rows actually read, “0”...
  • Page 153: Event Callback Function

    17.4.3. Event Callback Function DecodeDone Description This function is called when decoding is successfully completed. It reads out the bufferData property to get data decoded. Syntax void OnDecodeDone ( void ) Parameters None Return value None...
  • Page 154: Error Codes

    17.4.4. Error Codes If an error occurs during access to properties or during calling to methods, the error code will be stored into the errorStatus variable. Error Code Table Propertie or Name Content Method ERROR_TOO_MANY_OPEN_FILES Barcode reading enabled (when flag is TRUE). readMode or readType out of the range (when ERROR_INVALID_PARAMETER portOpen...
  • Page 155: File Transfer Control

    17.5. File Transfer Control 17.5.1. Properties Name Default R/W Value Content value eVC++ GetPort COM1 short COM4 COM port COM4 SetPort CBR_300 (*1) CBR_600 (*1) CBR_1200 (*1) CBR_2400 (*1) GetBaud CBR_4800 (*1) long CBR_115200 Transmission rate CBR_9600 SetBaud CBR_19200 CBR_38400 CBR_57600 CBR_115200 NOPARITY...
  • Page 156: Methods

    17.5.2. Methods Function Description Add a file to be transmitted. AddFile Clear a file added by AddFile. ClearFile Acquires the file name of the file to be transmitted or received. GetFile At the transmission side, returns the number of transmitted files, and at the receipt side, returns the number of received files, including the file currently GetFileCount being received.
  • Page 157 ClearFile Description Clears a file added by AddFile. Syntax void ClearFile ( void ) Parameters None Return value None GetFile Description Acquires the file name of the file to be transmitted or received. The maximum value given by the “Index” parameter is the number of files acquired with GetFileCount. Syntax CString GetFile (long Index) Parameter...
  • Page 158 GetTransferredCount Description Returns the number of files for which transmission or receipt is complete. Syntax void GetTransferredCount (void) Parameter None Return Values Transmission side: Number of files for which transmission is complete Receipt side: Number of files for which receipt is complete Comment: This value is cleared when Receive or ClearFile is called.
  • Page 159 Send Description Transmit a file specified by AddFile. Syntax Long Send ( void ) Parameters None Return value Error code Meaning ERROR_SUCCESS Successful completion ERROR_ACCESS_DENIED Access to COM port denied (e.g., occupied by other tasks) ERROR_FILE_NOT_FOUND Specified file or device not found ERROR_NO_MORE_FILES No send file found (No file added by AddFile.) ERROR_BAD_PATHNAME...
  • Page 160 Abort Description Abort the current file transmission process. After aborting, the Done event will occur. Syntax Void Abort ( void ) Parameters None Return value None GetState Description Get the current file transmission status. Syntax short GetState ( void ) Parameters None Return value...
  • Page 161 GetError Description Return the error information for the transaction processed last. Syntax long GetError ( void ) Parameters None Return value Code of an error that occurred during processing of methods.
  • Page 162: Event Callback Functions

    17.5.3. Event Callback Functions Function Description This function is called when the transmission ends as specified. Done Transferring Get the information about a file being transmitted. Done Description This function is called when the transmission ends as specified. Syntax void OnDone ( long Result Parameters...
  • Page 163 Transferring Description Get the information about a file being transmitted. Syntax void OnTransferring ( LPCTSTR FileName long Total long Transferred Parameters FileName [out] Name of file being transmitted Total [out] Size of file being transmitted Transferred [out] Size of file already transmitted Return value None...
  • Page 164: Coding Sample

    17.5.4. Coding Sample void CSerialTransferDlg::DoDataExchange(CDataExchange* pDX) CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CSerialTransferDlg) DDX_Control(pDX, IDC_FILETRANSFERCTRL1, m_clFileTransfer); //}}AFX_DATA_MAP BEGIN_EVENTSINK_MAP(CSerialTransferDlg, CDialog) //{{AFX_EVENTSINK_MAP(CSerialTransferDlg) ON_EVENT(CSerialTransferDlg, IDC_FILETRANSFERCTRL1, 1 /* Done */, OnDoneFiletransferctrl, VTS_I4) ON_EVENT(CSerialTransferDlg, IDC_FILETRANSFERCTRL1, 2 /* Transferring */, OnTransferringFiletransferctrl, VTS_BSTR VTS_I4 VTS_I4) //}}AFX_EVENTSINK_MAP END_EVENTSINK_MAP() /* Start download */ void CSerialTransferDlg::OnDownload() m_clFileTransfer.SetPath(TEXT("\\My Documents"));...
  • Page 165: Appendix A. Keyboard Arrangement, Virtual Key Codes And Character Codes

    Appendix A. Keyboard Arrangement, Virtual Key Codes and Character Codes A.1. 27-key pad A.1.1. Keyborard Arrangement (1) Numeric entry mode SCAN SCAN SCAN SCAN SCAN SCAN & > Normal status Status with [SF] pressed (2) Alphabet entry mode (3) Function mode SEND SCAN SCAN...
  • Page 166: Virtual Key Codes And Character Codes

    A.1.2. Virtual Key Codes and Character Codes Numeric entry mode Normal status Status with [SF] pressed Virtual key code Virtual key code Character Character code code Constant Value Constant Value [F1] VK_F1 ← ← ← [F2] VK_F2 ← ← ← [F3] VK_F3 ←...
  • Page 167 Function mode Virtual key code Character code Constant Value [F1] VK_F5 [F2] VK_F6 [F3] VK_F7 [F4] VK_F8 VK_F9 VK_F11 VK_F10 VK_F12 5B ( [ ] 27 ( ’ ) 5C ( \ ) 60 ( ` ) 2D ( - ) 2F ( / ) 3D ( = ) 3B ( ;...
  • Page 168: Character Codes In Alphabet Entry Mode

    A.1.3. Character Codes in Alphabet Entry Mode In the alphabetic entry mode, the 0 to 9 and period (.) keys are used to enter alphabets. The table below lists the relationship between keys to be pressed, the number of depressions, and character codes. Depre- ssion 4 th...
  • Page 169: 42-Key Pad

    A.2. 42-key pad A.2.1. Keyborard Arrangement (1) Alphabet entry mode SCAN SCAN SCAN SCAN SCAN SCAN Normal status Status with [SF] pressed (2) Numeric entry mode SCAN SCAN SCAN SCAN SCAN SCAN ‘ “ & < > Status with [SF] pressed Normal status...
  • Page 170 (3) Function mode SEND SCAN SCAN SCAN...
  • Page 171: Virtual Key Codes And Character Codes

    A.2.2. Virtual Key Codes and Character Codes Alphabet entry mode Normal status Status with [SF] pressed Virtual key code Character Virtual key code Character code code Constant Value Constant Value [F1] VK_F1 ← ← ← [F2] VK_F2 ← ← ← [F3] VK_F3 ←...
  • Page 172 Numeric entry mode Normal status Status with [SF] pressed Character Character Virtual key code Virtual key code code code [F1] VK_F1 ← ← ← [F2] VK_F2 ← ← ← [F3] VK_F3 ← ← ← [F4] VK_F4 ← ← ← [▲] VK_UP ←...
  • Page 173 Function mode Normal status Character Virtual key code code [F1] VK_F5 [F2] VK_F6 [F3] VK_F7 [F4] VK_F8 [▲] VK_F9 [▼] VK_F10 [◄] VK_F11 [►] VK_F12 [SF] VK_CAPITAL [FN] VK_FUNC [NUM] VK_NUM [BS] VK_BACK [SP] VK_SPACE [ESC] VK_ESCAPE [ENTER] VK_RETURN [TAB] VK_TAB [SCAN] VK_SCAN...
  • Page 174: Appendix B. Differences Between Older Unit

    Appendix B. Differences between Older Unit The following table lists differences between the BHT-700 and the BHT-400. Type Item BHT-700 BHT-400 System ROM capacity 128MB 64MB information Screen display Rotation function Possible Not possible Backlight Key backlight Equipped Not equipped Key backlight illumination trigger Key press No key backlight...
  • Page 175 Type Item BHT-700 BHT-400 Data communication Default baud rate 115200 bps 9600 bps RS-232C Tx, Rx Tx, Rx, RTS, CTS I/F usable with Active Sync USB, IrDA USB, IrDA, RS-232C Automatic connection Placement in cradle connected to Connection of cable computer by USB connecting BHT with (Default : Allow)
  • Page 176 BHT-700. Please feel free to send your comments regarding any errors or omissions you may have found, or any suggestions you may have for generally improving the manual. In no event will DENSO WAVE be liable for any direct or indirect damages resulting from the application of the information in this manual.

Table of Contents