Barcode Handy Terminal BHT-700-CE API Reference Manual
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 respective holders.
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 ...............................................................
9.1. Outline............................................................................................................................................ 27 9.2. Battery Voltage Acquisition ............................................................................................................ 27 9.3. Battery Voltage Icon ....................................................................................................................... 27 9.4. Battery Voltage Warning .................................
17.4.1. Properties .............................................................................................................................. 144 17.4.2. Methods................................................................................................................................. 145 17.4.3. Event Callback Function........................................................................................................ 148 17.4.4. Error Codes .....................................................
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 4) 1.2.2. Software Development Kit The BHT-700 Software Development Kit provides the application development environment for Windows CE set up on the BHT-700.
Chapter 2. Application Development Environment 2.1. Required Hardware (PC to be used for application development) Item OS 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.
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. Screen Rotation The screen can be rotated using either of the following methods. (1) By pressing the screen rotation control key. (2) By using the system setting function (BHT_SetSysSettingDW). 3.2.1.
3.3. Setting the Screen Rotation Angle The settable rotation angles are 0°, 90°, 180°, and 270°. The direction is anti-clockwise. 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.
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.
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. Parameter Type R/W Illumination time when powered by battery (sec.) Illumination time when placed on CU (sec.
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. Backlight control is performed as shown in the flow diagram below.
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.
(*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).
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. Refer to Section 5.3.
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.
5.3. Starting/Stopping the Beeper/Vibrator The beeper/vibrator is activated or deactivated by the following functions: Function BHT_StartBeep BHT_StartBeeperOnly BHT_StartVibratorOnly Used to: Activate the selected device (beeper or vibrator). Activate the beeper. Activate the vibrator. The functions listed above start the beeper/vibrator control and immediately pass control to the subsequent statement or function. The actual device operation is carried out in background processing.
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.
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.
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. 6.4.
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. 6.5.1.
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. In the 42-key pad, use the alphabet keys to type in alphabet letters directly.
(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. - Keys [0] to [9] or [.
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. (2) pressing the [AL] key. (*1) (*1) Effective only when the key entry mode transition key is not disabled.
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. (2) Press the [FN] key when in function mode. Non-function mode is enabled as the default when the unit is booted up.
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. Key [0] to [9] key and Period ([.
Chapter 7. LCD Status Indication 7.1. Outline The status of the BHT is displayed on the LCD as specified below. Status Battery voltage level Description Displays the battery voltage in five levels. Software keyboard display state Shows whether the software keyboard is displayed or hidden. Tapping this icon toggles the software keyboard on and off. Keypad shift state Displays the icon when the keypad is shifted. Function state Displays the icon when in function mode.
(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.
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.
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. (2) When waiting for the event specified by the BHT_WaitStandbyEvent function with the standby transition prohibited event completed.
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. (2) An auto power-off timeout occurs after one of the suspend transition prohibited events (listed below) is completed. (3) When the power OFF function is called. 8.3.2.
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. 9.3.
Chapter 10. LED 10.1. Outline The BHT-700 has two LEDs. The display LED can be controlled from the application. LED Indicator LED Charger LED Color Red and blue Red and green ON/OFF control from applications Possible 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.
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.
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 USB ● ● IrDA ● Wireless ● USB-LAN (*1) ● (*1) CU-714 is necessary for USB-LAN communication. 11.4.2.
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" or "BHT-700QWBG-CE User's Manual.
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" or "BHT-700QWBG-CE User's Manual." If no system settings are made in a user program, those made in System Menu will apply.
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. Parameter Authentication Encryption 802.1x ESSID Profile Priority Pre Shared Key WEP Key Parameter Authentication Encryption 802.
▪ 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 P_PWRSAVE_CAM P_PWRSAVE_PSP Power consuming state Consumes much power (no power saving effect) Consumes less power (much power saving effect). The BHT may take more time to establish the wireless link or send response messages. [Ex.
▪ 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).
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.
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. (1) The wireless communication device is currently open.
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. Available Barcode Type Default Setting Universal product codes EAN-13 (*1) (JAN-13 (*1)) No national flag specified. EAN-8 (JAN-8) UPC-A (*1), UPC-E No length of read data specified. Interleaved 2of5 (ITF) No check digit.
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 No split code scanning PDF417 PDF417, MicroPDF417 MaxiCode Nothing specified Data Matrix Square Data Matrix, Rectangular Data Matrix Not specified: code no.
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.
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). You can check whether the barcode buffer stores code data, by using the BHT_GetBarNum function.
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. To do it, you should designate desired code types in the read code parameter of the BHT_EnableBar function. 13.2.3.
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. For detailed specifications, refer to the description for the BHT_EnableBar function.
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 "BHT700QWBG-CE User's Manual"). 13.3. Barcode Reading Using the Virtual COM Port 13.3.1. Outline Barcode reading using the virtual COM port is supported on the BHT-700 series. For greater convenience, this function is available for use in conjunction with kbifCE.
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. (For example) Update OS image file named “_B7BWDW0.
Chapter 15. System Functions System functions are used when setting or acquiring system values or when acquiring device information. Function Used to: BHT_SetSysSettingDW Write system parameter values (DWORD). BHT_GetSysSettingDW Read system parameter values (DWORD). BHT_SetSysSettingWCS Write system parameter values (character string). BHT_GetSysSettingWCS Read system parameter values (character string).
15.1. If a System Parameter Value is DWORD BHT_SetSysSettingDW Description Write system parameter values.
BHT_GetSysSettingDW Description Read system parameter values.
15.2. If a System Parameter Value is a Character String BHT_SetSysSettingWCS Description Write system parameter values.
BHT_GetSysSettingWCS Description Read system parameter values.
15.3. System Parameter Values That Can be Set/Obtained Parameter name Type R/W WCS R DW R DW R WCS R WCS R WCS R/W Waiting time to switch to standby mode (in units of 100 ms) Waiting time to auto power OFF when powered by battery (sec.) Waiting time to auto power OFF when placed on CU (sec.
Parameter name Type R/W Backlight ON-duration (sec.) (When battery- driven) DW R/W Backlight ON-duration (sec.
Scanning range marker (*6) DW R/W BHT_BAR_MARKER MARKER_NORMAL : Normal mode MARKER_AHEAD : Maker ahead MARKER_DISABLE : Fixed to OFF 53 MARKER _NORMAL Immediately after setting
Parameter name Type R/W Control code Parameter value Front-back inverted reading (*6) Scan mode (*6) DW R/W BHT_BAR_REVERSE DW R/W Option data (*6) DW R/W Ilumination mode (*6) DW R/W Shift key mode DW R/W Assignment to M1 key DW R/W Assignment to M2 key DW R/W Assignment to M3 key DW R/W Key entry mode DW R/W Enable/disable alphabet entry switching key DW R/W Function mode DW R/W Effective held-down time of power key for suspending (in units of 100 ms) Keypad type DW
Parameter name Battery voltage level icon Software keyboard icon Keypad shift icon Type R/W Control code Parameter value Status indicator related BHT_ICON 0: Hide _BATTERY 1: Display BHT_ICON_SIP 0: Hide 1: Display BHT_ICON 0: Hide _SHIFTKEY 1: Display Default DW R/W DW R/W DW R/W Alphabet input icon (27-key type only) DW R/W BHT_ICON _IN_ALPHA 0: Hide 1: Display 1 Wireless communication state icon DW R/W BHT_ICON _RADIO_INTEN SE 0: Hide 1: Display 1 Standby state icon DW R/W BHT
Parameter name Type R/W Screen rotation DW R/W Screen rotation control key DW R/W Touch screen disabling DW R/W Bluetooth device initial power status DW R/W Voice output from receiver DW R/W Control code Parameter value Display related BHT_DISP DISP_ROTATION_0 _ROTATION : 0° DISP_ROTATION_90 : 90° DISP_ROTATION_180 : 180° DISP_ROTATION_270 : 270° BHT_DISP Key no.
15.4. Device Information Acquisition BHT_GetDeviceInfo Description Acquires the mounted device information.
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 BHT_RF_Open BHT_RF_OpenEx BHT_RF_Close BHT_RF_CloseEx BHT_RF_Synchronize BHT_RF_GetParamInt BHT_RF_SetParamInt BHT_RF_GetParamStr BHT_RF_SetParamStr BHT_RF_GetInfoInt BHT_RF_GetInfoStr BHT_RF_IoControl BHT_RF_GetSiteSurvey BHT_SystemModify BHT_WaitEvent BHT_WaitStandbyEvent BHT_ShutdownSystem BHT_RegStore Used to: Open the wireless LAN device and enable wireless communication. Set the communication format, open the wireless LAN device and enable wireless communication.
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.
■ 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.
■ 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. - You should describe readmode, beepercontrol, and LEDcontrol in this sequence.
□ 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 ≤ max.no.digits If both of mini.no.digits and max.no.digits are omitted, then the default reading range is from the minimum number of digits specified in the system menu (BhtShell.exe) up to 99 digits.
□ 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 ≤ max.no.digits If both of mini.no.digits and max.no.digits are omitted, then the default reading range is from the minimum number of digits specified in the system menu (BhtShell.exe) up to 99 digits.
□ 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 ≤ max.no.digits If both of mini.no.digits and max.no.digits are omitted, then the default reading range is 1 to 99 digits. If only max.no.
□ 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 ≤ max.no.digits If both of mini.no.digits and max.no.digits are omitted, then the default reading range is 1 to 99 digits. If only max.no.
□ 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 ≤ max.no.digits If both of mini.no.digits and max.no.digits are omitted, then the default reading range is 1 to 99 digits. If only max.no.
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 immediately following the start character, to the barcode buffer.
□ 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 ≤ max.no.digits If both of mini.no.digits and max.no.
□ 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 ≤ max.no.digits If both of mini.no.digits and max.no.digits are omitted, then the default reading range is 1 to 99 digits. If only max.no.
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). (For details of readable codes, refer to the Instruction Manual.) □ QR Codes (Q) Syntax Q [: [symbol type[min. code version [−max.
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: Sub-code no No. of sub-codes Parity Read data Sub-code no., No. of sub-codes: 1 byte (hex.) (0 − F) Parity: 2 bytes (hex.
□ MaxiCode(X) Syntax X □ 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 S Square Data Matrix R Rectangular Data Matrix “min code no.” and “max code no.” are the minimum and maximum DataMatrix code numbers that can be read, respectively. The table below shows the allowable range of code numbers by symbol type.
□ Universal product code (A) Syntax A [:[code][1st character [2nd character]] [supplemental]] Specify one of the codes listed below. Code A B C 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. A question mark (?) serves as a wild card. “supplemental” refers to the reading of an add-on code.
□ Interleaved 2of5 (ITF) (I) Syntax I [:[min no. digits [−max no. digits]][CD][;[1st character [2nd 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. digits ≤ max no.
□ 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. digits ≤ max no. digits If you omit both the minimum and maximum numbers of digits, the BHT can read barcodes whose lengths are between the minimum number of digits specified in system mode and 99 (inclusive).
□ Code 39 (M) Syntax M [:[min no. digits [−max no. digits]][CD][;[1st character [2nd 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. digits ≤ max no.
□ CODE-93 (L) Syntax L [: [min.no.digits [-max.no.digits]][;1st digit [-2nd 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. digits ≤ max no. digits If both the min.no.digits and max.no.digits are omitted, then the default reading range is 1 to 99 digits. If only the max.no.
□ Code 128 (K) Syntax K [:[min no. digits [−max no. digits]][;[1st character [2nd 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. digits ≤ max no.
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 buffer.
■ 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 1st row), (code in 2nd row)[, (code in 3rd 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). (1) Multi-line code reading is independent of single-row code reading.
(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.
BHT_DisableBar Description: Close the barcode device file to disable barcode reading.
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.
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.
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.
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. BHT-700Q Read the information on the code read most recently, including the code type and the number of digits in the code.
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.
BHT_GetBarChkDgt Description Calculate a check digit (CD) of the barcode data according to the calculation method specified by dwCDType.
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.
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 13 EAN-13 (JAN-13), UPC-A 8 EAN-8 (JAN-8) 7 UPC-E To check whether the CD is correct: Pass a CD-suffixed barcode data to the BHT_GetBarChkDgt function as shown below.
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. If the returned value is equal to the CD, the CD data is suitable for the barcode data.
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. If the returned value is equal to the CD, the CD data is suitable for the barcode data.
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. If the returned value is equal to the CD, the CD data is suitable for the barcode data.
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. If the returned value is equal to the CD, the CD data is suitable for the barcode data.
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. If the returned value is equal to the CD, the CD data is suitable for the barcode data.
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.
Member name bConvertToUPCA Default FALSE bReportNumsys FALSE bReportChk TRUE Details Used to convert (TRUE) or not convert (FALSE) to UPC-A. Used to add (TRUE) or not add (FALSE) a “0” at the beginning. Used to add (TRUE) or not add (FALSE) a C/D. typedef struct _ST_DCD_UPCA_OPTIONS { BOOL bReportNumsys; BOOL bReportChk; } ST_DCD_UPCA_OPTIONS, *PST_DCD_UPCA_OPTIONS; Member name bReportNumsys Default TRUE bReportChk TRUE Details Used to add (TRUE) or not add (FALSE) a “0” at the beginning.
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. The addresses for the structure are listed below.
Member name bConvertToUPCA Default FALSE bReportNumsys FALSE bReportChk TRUE Details Used to convert (TRUE) or not convert (FALSE) to UPC-A. Used to add (TRUE) or not add (FALSE) a “0” at the beginning. Used to add (TRUE) or not add (FALSE) a C/D. typedef struct _ST_DCD_UPCA_OPTIONS { BOOL bReportNumsys; BOOL bReportChk; } ST_DCD_UPCA_OPTIONS, *PST_DCD_UPCA_OPTIONS; Member name bReportNumsys Default TRUE bReportChk TRUE Details Used to add (TRUE) or not add (FALSE) a “0” at the beginning.
16.2. Backlight API BHT_SetBltStatus Description Control the backlight. Syntax DWORD BHT_SetBltStatus ( DWORD dwStatus ) Parameters dwStatus [in] Backlight status dwStatus Specification BHT_BL_ENABLE_ON(*1) Turn on the backlight. 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.
BHT_GetBltStatus Description Read the backlight status. Syntax DWORD BHT_GetBltStatus ( DWORD* pdwStatus ) Parameters pdwStatus [out] Current backlight status pdwStatus Specification 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.
16.3. Battery API BHT_GetPowerStatus Description Read information about the battery loaded in the BHT body.
BHT_GetPowerStatus2nd Description Read information about the battery loaded in the grip.
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 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 pdwInfo Return value Error code Meaning ERROR_SUCCESS Successful completion ERROR_INVALID_PARAMETER Storage address not specified.
BHT_SetNLedStatus Description Control the indicator LED (red/blue). Syntax DWORD BHT_SetNLedStatus ( DWORD dwStatus ) Parameters dwStatus [in] Controls the LED ON/OFF dwStatus LED_OFF RED_LED_ON GREEN_LED_ON RED_LED_ON | GREEN_LED_ON Specification Turn off both red and blue LEDs Turn on red LED only Turn on blue LED only Turn on both red and blue LEDs Return value Error code Meaning ERROR_SUCCESS Successful completion ERROR_INVALID_PARAMETER Parameter error.
BHT_GetNLedStatusEx Description Read the status of the indicator LED and synchronization LED.
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 dwLedDevice Specification LED_BAR Indicator LED dwLedNum [in] LEDs to be turned on dwLedNum RED_LED GREEN_LED RED_LED | GREEN_LED Specification If dwLedDevice = LED_BAR Red LED Blue LED Red and blue LEDs Return value Error code Meaning ERROR_SUCCESS Successful completion ERROR_INVALID_PARAMETER Parameter error.
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 dwLedDevice Specification LED_BAR Indicator LED dwLedNum [in] LEDs to be turned off dwLedNum RED_LED GREEN_LED RED_LED | GREEN_LED Specification If dwLedDevice = LED_BAR Red LED Blue LED Red and blue LEDs Return value Error code Meaning ERROR_SUCCESS Successful completion ERROR_INVALID_PARAMETER Parameter error.
16.5. Beeper/Vibrator API BHT_StartBeep Description Drive the beeper or vibrator.
Comment: - The system functions allow the beeper volume to be changed. (Refer to Section 5.2. and 5.3.) - Specification of any of 3 through 667 to wFreq 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. - For your reference, the relationship between the frequencies and the musical scale is listed below.
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 [in] Frequency (Hz) , Entry range: 0 to 32767 Specification of 0, 1 or 2 to wFeq produces the special beeper effects as listed below.
Comment: - The system functions allow the beeper volume to be changed. (Refer to Section 5.2. and 5.3.) - Specification of any of 3 through 667 to wFreq 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. - For your reference, the relationship between the frequencies and the musical scale is listed below.
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 Error code Meaning ERROR_SUCCESS Successful completion ERROR_INVALID_PARAMETER Parameter error.
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.
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 dwOpt Specification Wireless communication open COMM_NORMAL COMM_CONTINUOUS Wireless communication continuously open Return value Error code ERROR_SUCCESS ERROR_DEV_NOT_EXIST ERROR_INVALID_PARAMETER ERROR_SHARING_VIOLATION Meaning Successful completion No NIC device found.
BHT_RF_Close Description Close the wireless LAN device and disable wireless communication.
BHT_RF_CloseEx Description Closes the wireless LAN device for the set format and disables wireless communication.
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 Oid , LPVOID lpInBuf , DWORD nInBufSize , LPVOID lpOutBuf , DWORD nOutBufSize , LPVOID lpBytesReturned ) Parameters Oid [in] Control command ID Oid 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.
The details set for each argument differ for each command.
BHT_RF_Synchronize Description Get the association status.
BHT_RF_GetParamInt Description Read integer from the wireless communications parameter.
Return value Error code ERROR_SUCCESS Meaning Successful completion Parameter error ERROR_INVALID_PARAMETER Address for storing data obtained not specified.
BHT_RF_SetParamInt Description Write integer to the wireless communications parameter.
Return value Error code ERROR_SUCCESS Meaning Successful completion Parameter error ERROR_INVALID_PARAMETER Address for storing data obtained not specified.
BHT_RF_GetParamStr Description Read string from the wireless communications parameter.
BHT_RF_SetParamStr Description Write character string to the wireless communications parameter.
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 dwType P_RATE_INFO P_RATE_INFO2 Specification Current communication speeds: No link → P_RATE_NOT_LINK 1Mbps → P_RATE_1MBPS 2Mbps → P_RATE_2MBPS 5.5Mbps → P_RATE_5_5MBPS 11Mbps → P_RATE_11MBPS Above 11Mbps → P_RATE_OVER11MBPS Current communication speeds (Units: 100bps): [Ex.] 5.
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 dwType Specification P_APMAC_INFO MAC address of AP being linked pwchInfo [out] Heading address of the storage buffer for info read Return value Error code ERROR_SUCCESS ERROR_DEV_NOT_EXIST ERROR_NOT_READY Meaning Successful completion No NIC device found. Device not ready.
BHT_RF_GetSiteSurvey Description Get the quality of the communications link.
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 dwMode Specification SYSMDFY_POWEROFF Turn the power off. (Cold-boot the BHT at the next power on) SYSMDFY_REBOOT Perform a cold boot.
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. ERROR_SHARING_VIOLATION Wireless LAN device is opened. Remarks Wireless LAN and Bluetooth device cannot be opened at the same time.
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.
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. pdwStatus Specification BHT_BT_POWER_ON The Bluetooth device power is ON. BHT_BT_POWER_OFF The Bluetooth device power is OFF. Return value Error code Meaning Successful completion The unit is not equipped with a Bluetooth ERROR_DEV_NOT_EXIST device.
16.9. Other APIs BHT_WaitEvent Description Make the system wait until the specified event or timeout occurs.
Return value Error code ERROR_SUCCESS Meaning 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.
BHT_WaitStandbyEvent Description Make the system wait until the specified event occurs.
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. Note that execution of any other active thread will be suspended during execution of this function.
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. The contents in the RAM can be retained. Transfer control to the suspended mode. Pressing the power key BHT_PWR_SUSPEND starts the BHT. The contents in the RAM will be retained as long as the sub-battery is charged.
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.
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. System Requirements (1) BHT-700 Software Development Kit (2) Control files .ocx for the desktop - Scanner700.ocx: For barcode reading (for BHT-700B) - Scanner700Q.ocx: For barcode reading (for BHT-700Q) - FileTransfer700.
(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.
(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 (redcircled). (4) Following ClassWizard, assign a member variable to the inserted control.
17.4. Scanner Control 17.4.1.
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.
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. of digits in the row specified in CodeNo If [the row number specified in CodeNo + 1] is larger than the number of rows actually read, “0” will be returned.
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” will be returned.
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.
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).
17.5. File Transfer Control 17.5.1.
17.5.2. Methods Function AddFile ClearFile GetFile Description Add a file to be transmitted. Clear a file added by AddFile. Acquires the file name of the file to be transmitted or received. At the transmission side, returns the number of transmitted files, and at the GetFileCount receipt side, returns the number of received files, including the file currently being received. GetTransferredCount Returns the number of files for which transmission or receipt is complete.
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 Index [in] Index (1 or greater) Return Value File name of the specified Index (character string with length 0 when the Index lies outside the range).
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.
Send Description Transmit a file specified by AddFile. Syntax Long Send ( void ) Parameters None Return value Error code ERROR_SUCCESS ERROR_ACCESS_DENIED ERROR_FILE_NOT_FOUND ERROR_NO_MORE_FILES ERROR_BAD_PATHNAME Meaning Successful completion Access to COM port denied (e.g., occupied by other tasks) Specified file or device not found No send file found (No file added by AddFile.) Path too long (Path + filename > 260 characters) Receive Description Receive a file.
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.
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.
17.5.3. Event Callback Functions Function Description Done This function is called when the transmission ends as specified. Transferring Get the information about a file being transmitted. Done Description This function is called when the transmission ends as specified.
Transferring Description Get the information about a file being transmitted.
17.5.4.
Appendix A. Keyboard Arrangement, Virtual Key Codes and Character Codes A.1. 27-key pad A.1.1. Keyborard Arrangement (1) Numeric entry mode TAB M1 TAB M1 SCAN SCAN SCAN SCAN M2 M3 M2 M3 F1 F2 F1 SCAN F4 F2 F3 SCAN F4 F3 ESC 1 2 3 SF 4 5 6 FN 7 8 9 AL .
A.1.2.
Function mode Key Virtual key code Constant Value Character code [F1] VK_F5 74 [F2] VK_F6 75 [F3] VK_F7 76 [F4] VK_F8 77 [S] VK_F9 78 [T] VK_F11 7A [W] VK_F10 79 [X] VK_F12 7B [9] DB 5B ( [ ] [8] DE 27 ( ’ ) [7] DC 5C ( \ ) [6] C0 60 ( ` ) [5] BD 2D ( - ) [4] BF 2F ( / ) [3] BB 3D ( = ) [2] BA 3B ( ; ) [1] VK_SPACE 20 20(SPACE) [0] DD 5D ( ) ) [.
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. Depression 1st 2nd [0] ',' '/' [1] [2] [3] [4] [5] [6] [7] [8] [9] [.] ‘.
A.2. 42-key pad A.2.1.
(3) Function mode SEND M1 SCAN SCAN M2 M3 F5 F6 F8 SCAN F7 F9 F12 F10 F11 CAP FN NUM BS SP ESC ENT 165
A.2.2.
Numeric entry mode Normal status Key [F1] [F2] [F3] [F4] [▲] [▼] [◄] [►] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] [Z] [SF] [FN] [NUM] [BS] [SP] [ESC] [ENTER] [TAB] [SCAN] [M1] [M2] [M3] Character code Virtual key code VK_F1 VK_F2 VK_F3 VK_F4 VK_UP VK_DOWN VK_LEFT VK_RIGHT VK_1 VK_2 VK_3 VK_HYPHEN VK_BACKQUOTE VK_4 VK_5 VK_6 VK_BACKSLASH VK_APOSTROPHE VK_LBRACKET VK_RBRACKET VK_7 VK_8 VK_9 VK_EQUAL VK_SLASH VK_SEMICOLON VK_COMMA VK_PERIOD VK_0 V
Function mode Normal status Key [F1] [F2] [F3] [F4] [▲] [▼] [◄] [►] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] [Z] [SF] [FN] [NUM] [BS] [SP] [ESC] [ENTER] [TAB] [SCAN] [M1] [M2] [M3] Character code Virtual key code VK_F5 VK_F6 VK_F7 VK_F8 VK_F9 VK_F10 VK_F11 VK_F12 VK_CAPITAL VK_FUNC VK_NUM VK_BACK VK_SPACE VK_ESCAPE VK_RETURN VK_TAB VK_SCAN VK_M1(*1) VK_M2(*1) VK_M3(*1) 74 75 76 77 26 28 25 27 14 D2 D4 08 20 1B 0d 09 D1 C1(*1) C2(*1) C3(*1) 08
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 information ROM capacity 128MB 64MB Screen display Rotation function Possible Not possible Backlight Key backlight Equipped Not equipped Key backlight illumination trigger Key press Touch panel tap No key backlight Backlight control function assigned to [Fx](x:1-4) key or [SF] + [Fx] keys.
Type Data communication Item BHT-700 BHT-400 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 computer by USB (Default : Allow) Connection of cable connecting BHT with computer (Default : Prohibit) USB-LAN communication Supported Not supported Wireless system Selection from 802.11a, 802.11b, 802.11b/g (Default: 802.11b) 802.
BHT-700-CE API Reference Manual First Edition, October 2007 DENSO WAVE INCORPORATED The purpose of this manual is to provide accurate information in the development of application programs for the 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.