MR350MKII Data Collection Terminal Programming Reference Manual Unitech Electronics Co., Ltd. September 2001 V1.2
1-91.7. Bar code / Magnetic stripe / Proximity / ICC The MR350MKII has two ports for connecting different reader Internal reader and External reader
1-10 Displays all of the files which are stored in the MR350MKII ( Program as well as data file) ? MS-Kermit>REMOTE DEL <file name> D
1-11 6) Then, the screen will display: V2.1 COM2 Address: ESC=1 NAK=3 PARA=9600,1,8,NONE 0.Send 1.Poll A.Stop B.BarT C.ComT D.DIR E.Del F
1-12 N). Set beeper's volume. O). Set a executable object program to be started up automatically after power-up. Q). Inquire Uplo
1-1310) Select item 1) to start getting data, PC screen will appear "…." indicating there is no data collected. If any of those terminals
2-14Chapter 2. Data Structure 2. Data Structure MR350MKII system control data structures are outlined in the following diagram. The system kernel u
2-15 'M' = enable badge port for magnetic card reader 'D' = disable badge port lcd_backlight: 'N' = s
2-16 'F' = Disable barcode decoding of Code 128 2.4. Communication Control Table of Host port The communication control table is ap
2-17 'O' = Odd parity 'E' = Even parity protocol: 'M' = Multipoint (default) 'F' = None proto
2-18 BYTE pageterm;/* page terminator */ } TERM_CONFIG; Each MR350MKII "terminal" is identified by an ASCII string. There can
1-1Introduction This manual is a hand book for whom intend to develop an application program on MR350MKII and Host computer or MS-DOS based PC. It w
2-19 lineterm: designates the termination character of line block mode (default = null) pageterm: designates the termination character of
3-20Chapter 3. I/O Function Calls 3. I/O Function Calls The operating system of the MR350MKII supports BIOS/DOS Function to control LCD display, Ke
3-21void TL_gotoxy(int x,int y) { regs.h.ah = 2; regs.h.dh = (unsigned char)y; regs.h.dl = (unsigned char)x; int86(0x10,®s,&re
3-22 int86(0x21,®s,®s); } 3.2. Communication Environment Setup Before placing MR350MKII into the communication environment, you hav
3-23void TC_select_host(int status) { regs.h.ah = 0x1C; regs.h.al = (unsigned char)status; regs.h.bh = 0; int86(0x21,®s,®s)
3-24} 19 Set COM1 port as RS485 or modem This function call is used to set COM1 port as RS485 serial port or modem when you have the internal modem
3-25{ regs.h.ah= 0x1C; regs.h.al= status; regs.h.bh= 9; int86(0x21,®s,®s); } 5F Read host port Entry Parameters: AH = 0x
3-26Returned Values: AL = 0 ;port is available 1 ;port is busy int TC_ready(int wait) { int i; do { regs
3-2702 Output data Entry Parameters: AH = 2 AL = Data character Returned Values: None void TC_232_char_O(unsigned char ch) { regs.h.ah =
3-28 0001xxxx 150 baud rate 0010xxxx 300 baud rate 0011xxxx 600 baud rate 0100xxxx 1200 baud rate
1-2Table of Contents Table of Contents...
3-29 } regs.h.ah = 0; regs.h.al = cc; int86(0x34,®s,®s); } 05 Set RTS signal of RS-232 port Entry Parameters: AH = 5
3-30 AH = 0 AL = Data character 2) if no character received AH = 1 AL = undefined unsigned char TC_485_c
3-31 int86(0x33,®s,®s); } 00 Set Communication parameters Entry Parameters: AH = 0 BIT # 76543210 AL = bit 0 xx
3-32 default: cc=0x70; break; } switch (parity) { case 0 : break; case 1 : cc=cc|0x04; break; case 2 : cc=cc|0x0c; brea
3-3306 Close RS-485 multi-bus (release RS-485 bus) Entry Parameters: AH = 6 Returned Values: None void TC_485_close() { regs.h.ah = 6; int86
3-343.5. Relay Output / Digit Input / Buzzer / LED Indicator Set LED indicator ON/OFF INT 09H Entry Parameters: AH = 2 Bit# 76543210
3-35 regs.h.ah = (unsigned char)port; regs.h.al = (unsigned char)type; int86(0x08,®s,®s); return((int)regs.h.al); } Activat
3-361A Set buzzer volume INT 21H Entry Parameters: AH = 0x1A BH = 3 AL = 0 ;set LOW volume 1 ;set MEDIUM volume
3-37 regs.h.bh = 8; int86(0x21,®s,®s); } 54 Buzzer volume control with user-defined frequency and time INT 21H Entry Parameter
3-383.6. Internal/ External reader Port: INT 21H There are two readers can be connected to MR350 MKII --- Internal Reader and External Reader. In
1-303 Enable RS-232 port... 3-27 04 Disable RS-232 p
3-3950 Read data from external reader(only available for Barcode and Magnetic reader) Entry Parameters: AH = 0x50 Returned Values: DS:DX = buffer
3-400x13 : EAN-13 0x14 : EAN-8 CH = 1 :Magnetic data CL = 0 ;from right to left 2 ;from left to right BL = 0x01 : Tra
3-41 BH = 5 BL = 0 ; for both 26- and 36-bit formats 26 ; for 26-bit only 36 ; for 36-bit only 0xff ; for un-formatted data
3-42 AL = 0 ;assign barcode input 1 ;assign magnetic stripe input Returned Values: None void TD_set_internal_type(int statu
3-43Returned Values: AL = 1 ; Lithium battery low 0 ; Normal int TS_lithium_battery() { regs.h.ah= 0x1A; regs.h.bh= 9; int86(0x21,&r
3-44void TS_get_interrupt_vector(int vect,unsigned int *es,unsigned int *bx) { regs.h.ah= 0x35; regs.h.al= (unsigned char)vect; int86x(0x21,
3-45DS:DX = keyboard map with 128 bytes corresponded to numeric and alphabetic ASCII code table; a NULL for defining unused key.
3-46 ASCII code corresponded to scan code in Alphabetic mode Alphabetic mode keyboard layout ASCII code, ASCII code, ASCII code [Scan code, Scan c
3-47 DL = 8-bit data Returned Values: None void TS_stdout(unsigned char ch) { regs.h.ah= 2; regs.h.dl= ch; int86(0x21,®
3-48 if char not ready, Zero = set unsigned char TS_stdin_out(unsigned char ch) { regs.h.ah= 6; regs.h.dl= ch; int86(0x21,®s,&
1-42B Set System date... 3-50 2C Get System cl
3-49void TS_stdout_string(unsigned char *str) { segregs.ds = FP_SEG(str); regs.x.dx = FP_OFF(str); regs.h.ah= 9; int86x(0x21,®s,&a
3-50CX = year (1980..2099) DH = month (1..12) DL = day (1..31) void TS_get_date(int *year,int *month,int *day,int *week) { TD_int_
3-51 2D Set System clock Entry Parameters: AH = 2D CH = hour (0..23) CL = min (0..59) DH = sec (0..59) Returned Values:
3-52 if ((regs.x.cflag & 0x01) == 1) return(-1); else return(regs.x.ax); } 3D Open file The file must exist in the file table. This f
3-533F Read file Copy (CX) bytes from current address to DS:DX. Advance the current address (CX) number of bytes. Entry Parameters: AH = 3F
3-54 if ((regs.x.cflag & 0x01) == 0) return(regs.x.ax); else return(-1); } 41 Delete file Entry Parameters: AH = 41 DS:DX = seg
3-55long TS_seek_file(int hdl,int type,long loc) { union LONG_III aa; regs.h.ah=0x42; regs.h.al=(unsigned char)type; regs.x.bx=hdl; a
3-56 segregs.ds = FP_SEG(inf); regs.x.dx = FP_OFF(inf); segregs.es = FP_SEG(outf); regs.x.di = FP_OFF(outf); regs.h.ah=0x56; int86x(
3-57This page is blank.
4-58Chapter 4. Host ESC Commands 4. Host ESC Commands There are three classes of host communication activities: (1) Host Sends Control/Configurat
1-54.5. ESC Commands Added for MV1100 Fingerprint Module ... 4-72 4.5.1. Get Template List (ESC $D).
4-59restored from the Flash ROM.The hard reset command will not purge the program files that stored on Flash ROM The hard reset command does not hav
4-606. Autoboot ( ESC O program name ) This command defines an autoboot program name in the MR350MKII. The autoboot program will be executed automa
4-6115. Buzzer Volume (ESC N) This command can remote changing MR350MKII's buzzer sound. 16. Supervisor password (ESC P) This command
4-62The new communication control table takes effect immediately after the ESC C command has been successfully received. The MR350MKII will reinitial
4-63For example, command ESC M 199009262345 will initialize the MR350MKII clock to September 26, 1990. The time is 11:45 PM. The MR350MKII reconfigur
4-64 ADDR Terminal address (A-Y,0-6) + 80H CMD Network command to terminal, 2 bytes, A-F,0-9 CS1 Checksum, first byte CS2 Checksum, s
4-65 \ convert to \\ 00 hex -- 1F hex convert to \ 80 hex -- \ 9F hex A0 hex -- FF hex convert to \ 20 hex -- \ 7F hex (excl
4-66 => ACK - if data is received correctly, or NAK - if an error has occurred * The host sends a command to and receives a re
4-67ESC 5 - Set multipoint address => STX ESC '5' <addr> CS1 CS2 ADDR where <addr> = 'A'~
4-68 ESC D - Read directory of RAM disk to host => STX ESC D CS1 CS2 ADDR <= STX ESC D <directory data> CS1 CS2 ETX (or NAK)
1-6Chapter 1. System Kernel 1. System Kernel This chapter is used to introduce the system kernel of MR350MKII. Where the system kernel is divided in
4-69 ESC G/ROM - Get MR350MKII's Flash ROM size => STX ESC G/ROM CS1 CS2 ADDR <= STX ESC G/ROM <xxx> <zzz> CS1 CS2 ET
4-70 ESC K - Set keyboard locking => STX ESC K <state> CS1 CS2 ADDR where state = '0' set keyboard LOCK = '1&apo
4-71 ESC O/ROM - Set auto-execution program on ROM => STX ESC O <program name>/ROM CS1 CS2 ADDR <= STX ESC O <Retcode>/ROM
4-72 => ACK or NAK ESC v - Get Terminal ID and version no => STX ESC V <devtable> CS1 CS2 ADDR <= STX ESC V &
4-73of $Txxxxxxxxxx.yyy, where xxxxxxxxx is the template ID and yyy is the template index. ==> STX ESC $D CS1 CS2 ADDR <== STX ESC $D
4-74 ESC $E Erase Template The command erases the specified template on MV1100. ==> STX ESC $E xxxxxxxxxx.yyy CS1 CS2 ADDR <== ST
4-75 ESC $G Enroll and Store Template on MV1100 () The command enrolls and stores the template with the specified ID on MV1100. ==> STX ES
4-76SCORE is an integer that has a range of ‘000’ – ‘100’ NAK means command format error or checksum error. For the host to verify against the tem
4-77 = ‘1’ ;fail = ‘2’ ;busy = ‘3’ ;timeout NAK means command format error or checksum error. For the host to download the templat
4-78 THRESH = ‘1’ ,very high security = ‘2’ ;high security = ‘3’ ;medium security = ‘4’ ;low security = ‘5’ ;v
1-71.2. Keypad Subsystem The keypad subsystem scans the key matrix, converts the scan code to its associated key value, and stores the value in the
4-79If RESULT = ‘0’, MR350MKII will response with the version field: Kx.xxxx Ay.yyyy where x.xxxx represents the version of the kernal and y.yy
5-80Chapter 5. How to programning ? 5. How to to programming There are two major parts for programming – 1. Programming MR350 MKII and 2. Programmi
5-81 5.1.1. Programming by JobGen PRO The JOB GENerator PROfessional (JobGenPRO) is an MS-DOS based software for developing applications for MR350MK
5-82with all MR350MKII? input/output devices. All detailed calling convention and source code are listed behind each BIOS/DOS call in Chapter 3. For
5-835.3. Contains of the Demo Disk Below table show whole content of Demo disk C function library for MR350 MKII programming 1) 350LIB.C/OBJ/H C l
5-84Appendix A. Standard C Libraries Routine for MR350MKII 1. Buffer Manipulation memccpy() memchr() memcmp() memicmp() memmove() memcpy()
5-859. Memory Allocation alloca() calloc() free() halloc() hfree() malloc() msize() realloc() sbrk() stackavail() 10. Porcess C
1-81.4. Communication Subsystem The MR350MKII terminal communication subsystem consists of 1) point-to-point connection mode and 2) multi-point co
Comments to this Manuals