Home
Host application developing for the RF-family
Contents
1. 73 w nomMM 13 DataArrived event sse trennen serrer serrer eren 73 2005 Nordic ID Oy RF series System Developer Guide v 1 0 6 fer ceo Lo DI ni aT 1 18 5 14 3 12 14 3 13 14 4 14 4 1 14 4 2 14 5 14 5 1 14 5 2 14 5 3 14 5 4 14 5 5 14 5 6 14 5 7 14 5 8 14 5 9 14 5 10 14 5 11 14 6 14 6 1 14 6 2 14 6 3 14 6 4 14 6 5 14 7 14 7 1 14 7 2 14 7 3 14 7 4 14 8 14 8 1 14 8 2 14 9 14 9 1 O NORDICID DataFromHsField event ementi e esc 74 eT NO A cee 15 Sound methods ccc ccccescceeceseceecurevesserevessviseeevissreveretisesesievsrssitetieserenseees 75 z MEMMMEMMX 75 silo 16 Data receiving cecccececesecseceseseesevsecnseevetssresnreeseresereetisessesnrevnieeereeenee 71 C31 DI ire Tf FS EE ire ce PT ST A Dre 78 GetMessaGeNumbe hon cocccccccccecccccccceeccsccecccseveseveseesevessuseveseieverenssveeesitesesivenseeeeereeen 18 Cis ohm ce 78 GetlastEramelD ooo sse eere nennen erstens 79 GetReceiveBU REPRINT TN ovens pnetonee apace deeeenmearegatee EEEIEE EEren 19 GetBatterylevell ooo cececccecccccccsccsecnsecscerevesssssveseveseessessnisvisesisserenissresitesseseenseeen 19 GetCROVAIUG O 80 GetHSlASTUIIG occ ccc ce ccccescceccseceecuscesceevessureverscessessiseesveresissesssitesesitensesrtene
2. Fort Serial Server Connection Serial number of the remote control 28328 iw Say Hello to others Port Connect Close PPT Remote Controls Back Next gt Home gt lt End gt CHthart gt heaps Only one hand terminal can control the PPT slides at the time The hand terminal serial number must be in the Serial number of the remote control edit box Note Slide control program generates key press events to the operating system Therefore all keystrokes from hand terminal Back next app goes always to the currently active application Setting up Slide Control 1 Open Slide Control program 2 Connect to the Base station 3 Type hand terminal serial number to Serial number of the remote control edit box 4 Minimize Slide control 5 Activate PowerPoint program 6 Start using Slide Control with the hand terminal 2005 Nordic ID Oy RF series System Developer Guide v 1 0 52 2 Nordic ID RF series NORDICID 13 5 Software wedge Software wedge program receives data from the hand terminal and sends characters to the active window as if typed at the keyboard Up to 63 characters can be typed or read with scanner to the input field of the hand terminal Nordic ID Software Wedge Sel Nordic ID AF 6x0 driver control v 4 7 1 M Serial Cannectian I StartServer wm j Fart
3. 2005 Nordic ID Oy HF series System Developer Guide v 1 0 83 2 Nordic ID RF series NORDICID 14 6 5 MessageReceiverNotFound event When sending messages with SendMessage method PLServe waits RECEIVER_ACK from the hand terminal If the RECEIVER_ACK does not occur within resendTimes 3 seconds this event is launched event MessageReceiverNotFound long receiverlD long senderlD Parameters given by PLServer receiverlD Hand terminal commlD which does not response senderID Message sender ID defined by SendMsg method See also Receiver IsReceiver SendMso 14 7 The hand terminal serial port methods 14 7 1 DataToSerial Send text string to the serial port of the hand terminal Portable printer card reader or any external device can be connected to the serial port of hand terminals Serial settings are fixed to 19200 n 8 1 BOOL DataToSerial long id LPCTSTR txt Parameters id Hand terminal commlD number txt String to the hand terminal serial port Return value True Command added to the send buffer successfull False Send buffer is full See also WaitSerial GetSerialData BinaryToSerial 2005 Nordic ID Oy HF series System Developer Guide v 1 0 84 2 Nordic ID RF series NORDICID 14 7 2 BinaryToSerial Send raw binary data to the serial port of the hand terminal Portable printer card reader or any external device can be connected to the serial port of hand term
4. This program sends charcters fram the hand m Serial Server Connection terminal initial Field ta the active window as if typed at the keybord TCPAPaddess Port Connect Data will be sent to the host after scanning barcode or pressing OK key Line feed are added automatically to the end of the scanned code Setting up Software Wedge 1 Open Software Wedge program 2 Connect to the Base station 3 Minimize Software Wedge 4 Open and activate any program which wanted to receive keystrokes word excel text editor 5 Start using Software wedge with the hand terminal 2005 Nordic ID Oy RF series System Developer Guide v 1 0 53 2 Nordic ID RF series NORDICID 13 6 PLMultiThread The PLMultithread is a multithreaded application that is made with Visual C 6 0 It demonstrates the long data handling times and the use of the What method Note Set the What behavior as New style The handling of the PLServers DataArrived and What events are at the PLMultiThreadDlg cpp file The actual data from the hand terminal is handled in the other thread DataProcessing cpp PLMultiThread Nordic ID RFEsL driver control v 5 0 0 BS Connections Iw Use Wait Sceen what events Send WHAT between ID 100 Status ID 34184 Status 0 i Sees Simulate Data Processing tine a Seconds Status O No Action
5. event RawDataArrived long connID short FAR data short length Parameters given by PLServer Session number of the connection returned by conniD onnectToSerialServer methoc data Raw Data from the TCP IP connection length Length of the received data See also SendRawData method 2005 Nordic ID Oy HF series System Developer Guide v 1 0 87 2 Nordic ID RF series NORDICID 14 9 General methods 14 9 1 Dataln The data of the base station can be delivered to the driver control by this method When the data from the base station have been delivered to the driver control using the method the data to the base station will be offered by DataOut event void Dataln short FAR data short data len short source_addr Parameters data Data from the base station data len data length source addr User defined data source address See also DataOut 14 9 2 DataOut event When the data from the basestation have been delivered to the driver control using the Dataln method the data to the basestation will be offered by this event event DataOut short FAR data short data len short dest addr Parameters data data to the base station data len data length source addr Destination address Defined in Dataln method source addr See also Dataln 14 10 Sub Station Mode methods SSM SSM is the new operating mode to D05BS 2 type base stations Firmware version 2 0 and later supports SSM mode SSM fu
6. Functions from the Forms example SendMainMenuForm Form creation DataFromMainMenu Data handling sendCalculatorForm DataFromcCalculatorFormi Send utoscanningFormi DataFrom utoscanningFormi SendPasswordFieldForm DataFromPasswordFieldForm i See the source code of the Forms example at Run function in the DataHandlerThread cpp 2005 Nordic ID Oy HF series System Developer Guide v 1 0 27 2 Nordic ID RF series NORDICID 5 2 8 Clearing the UI elements The Ul elements on the form are displayed until the device is resetted or the ClearForm method is called Every time the new form is created in the hand terminals display it is recommended to call ClearForm method If only a part of the Ul element in the form has to be removed ClearCmd method can be used With ClearCmd method it is able to remove text only and or input fields or those content 6 Input fields The maximum number of input field in the form is 20 The length of the input field is can be 1 63 characters If there is no text in the input field in other words it is empty it displays as underline cCharacters __ in the hand terminal Empty input field can be completed either typing with the keyboard or scanning a barcode with a barcode scanner User can activate the desired input field or button by using the arrow buttons to move the cursor on it All the input from the keyboard or the scanner w
7. Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 2005 Nordic ID Oy LI J L C D YC id J C j 1 If this bit is set the hand terminal will emulate the one key press The key is defined in parameter data SpecialCmd 12000 Ox1 0x06 emulates a BAR button press If this bit is set the hand terminal sends keystrokes directly to the HOST The HOST application can define the keys with parameter data that sends the keystrokes to the HOST Example UP and DOWN keys will send keystokes to the HOST SpecialCmd 12000 0x2 0x600 This function is valid as long as user resets the device or HOST send SpecialCmd where Bit 1 is not set When the user presses the key which is defined to send keystroke the hand terminal sends SPC_MSG to the HOST and data can be read by GetSpecialData method Appropriate key value is returned see list below After that the hand terminal will wait a response from the HOST Password style for input field Three input fields can be defined as a password style field The Hand terminal user can only see asterix chars when typing to the input field Example Input fields in position 20 hex 14 and 40 hex 28 will be defined as a password style field SpecialCmd 12000 0x4 0x00FF1428 Heserved Heserved Heserved Heserved Heserved LKI RF series System Developer Guide v 1 0 64 fe ge To3i D ni ET 1 18 5 terminal sends keystrokes Emulates the key Key value decimal Key return value oee be
8. Statue 1 Processing Data Statue z Data ready waiting WHAT fram H5 2005 Nordic ID Oy RF series System Developer Guide v 1 0 54 2 Nordic ID RF series NORDICID 13 7 ScanAndSend This demo software creates 10 input fields in the hand terminal display The data at the input fields is sent to the backend software after the input to the last input field This sends all the data in the input fields to the backend software which displays it on the Listbox of the ScanAndSend application After receiving the data the backend software clears the hand terminal screen and sets the view to the top of the form by using the SetView 0 method ScanAndSend Nordic ID RFEx driver control v 5 0 0 Connect to COM port Che a 024 StartServer This demo creates 10 input fields into the hand terminal hen last input field bottom ix filled with scanner content af all lines are sent same time to HOST 12345675 4078173642392 169032540769 Listhox shows scanned barcodes 10 at the time Hand terminal generates beep and form iz cleared when all 10 barcodes has ua EU been sent ta HOST 1530325407538 CODET283 1PSE 323 I000 ocanAndSend is programmed by using Visual Basic NET 2005 Nordic ID Oy HF series System Developer Guide v 1 0 55 2 Nordic ID RF series NORDICID 14 APPENDIX A PLServer methods and events The Nordic ID RF6xx driver control is a 32 bit Windows ActiveX control PLServer ocx which cont
9. This presentation documents the RF600 communication protocol extensions that support the substation modem SSM mode of the base station It is assumed that the reader is already familiar with the other aspects of the communication protocol see the document RF600 Communication Protocol 16 2 Overview The SSM mode of the RF600 base station allows for asynchronous transfer of arbitrary data between the host and the SSM base station For the host base station the SSM base station looks like a hand terminal and is treated identically The data transmitted to the SSM base station is stripped of the HF600 protocol frame and sent to the serial port as a stream of raw bytes When the device attached to the SSM station sends data to the SSM station the data is encapsulated into a protocol frame and sent to the host system The device connected to the SSM base station need not understand anything about the communication protocol the SSM base station acts as a mediator between the device and the RF600 wireless network Due to the asymmetric nature of parties involved in the data transfer the procedure to send data from the host to the SSM base station is different from the procedure used for the other direction Both are described in detail separately below The traffic to the SSM base station uses the host to hand terminal protocol whereas communication from the SSM base station to the host station uses the hand terminal to host protocol 16 3 Th
10. characters in the hand terminal display After the UserlD and Password fields are sent to the host it replies by using the PopMessage and displays the actual content of the input fields clears the input fields and sets the UserID field active by using the FieldCmd method 13 2 Fastlnventory The Fast Inventory is a simple application for collecting data to the specific text file using the RF6xx hand terminal ocreenshot of Fast Inventory Application Fast Inventory 2005 Nordic ID Oy HF series System Developer Guide v 1 0 49 2 Nordic ID RF series NORDICID When the hand terminal connects first time to the Fastlnventory program following screen appears in to the hand terminal screen Count amp Read Conn Bs Code The hand terminal user can type count and scan code of product After scanning the code data will be transmitted to the host and save to the specific text file Fields are separated by semicolon C for example code count date hand terminal ID 023942874102 15 20 9 1999 9 07 55 3564 Item fields are separated by semicolon which is easy to import to Excel Access etc This information at the input fields is sent to the backend software after successful barcode reading or OK key entry when Code field is active HEADER DEFAULT flag is set to the Code field This means that the information of the barcode scanning is displayed to the Code field even if it is not active The Fastln
11. Description Sets the Hand terminal display view Generally the display view will be set automatically when fields are edited Syntax 13h ROW Top most line number of the row 0 3 If this ROW value is greater than 3 this command will be corrupted 15 1 16 POPMSG Description This command defines a text string which is displayed as long as any key is pressed Syntax 14h L TXT L Length of TXT Text length cursor controls TXT Printable ASCII characters may include SET_ CURSOR VT and CR The text will be displayed from position 0 The cursor can be set from 0 79 Text over this area will be corrupted Only one POPMSG command can be included in the frame 15 1 17 BELL Description Generates a beep Syntax 07h 15 1 18 BELL EX Description Generates a beep sequence with specfic duration of beep and duration of delay Syntax 10h L BEEP ON DURATION BEEP OFF DURATION L Length of ON OFF durations in bytes u BEEP ON DURATION Bod is ON 10 x BEEP ON DURATION milliseconds eg value 100 ds BEEP_OFF_DURATION Beeper is OFF 10 x BEEP_OFF_DURATION milliseconds Example of S O S tone 10h 18 5 10 5 10 5 30 15 10 15 10 15 30 5 10 5 10 5 10 2005 Nordic ID Oy RF series System Developer Guide v 1 0 102 2 Nordic ID RF series NORDICID 15 1 19 DATA_TO_SERIAL Description Sends DATA to the serial port of the hand terminal Portable printer card reader or any external device can be connect
12. l1 l 1 LII 0 System Developer Guide v 1 0 2005 Nordic ID Oy RF series 9 Nordic ID RF series NORDICID 15 1 24 Commands Hand terminal gt HOST Command Table Description Data from the Hand terminal Indicates the position address of the data sent from the fields Syntax 10h POS L DATA 3 L bytes 10h POS L POS Field POS 0 239 DATA L Number of bytes in the DATA part DATA Field data ASCII text 10 FIELD DATA 3 L Text sent from the Hand terminals initial screen or from F keys do not use this command The Hand terminal sends this command 18h when DELAY has expired in SEND_WHAT command Hand terminal has received message from 1Ch the HOST which is sended independently by the HOST If FORM ID is defined Hand Terminal 18 WHAT 1 HECEIVER ACK 1 FORM ID id eed sends it always at beginning of the DATA E block first 3 bytes in data block opecial message from hand terminal Hand terminal sends this message if specific function is defined earlier with SPC CMD OB SPC MSG e DB If TYPE 1 Keystroke from hand terminal D1 contains keystroke number Note The hand terminal requires response dur o 2005 Nordic ID Oy RF series System Developer Guide v 1 0 108 9 Nordic ID RF series NORDICID When the SSM base station receives data from the device attached to its serial port it encapsulates t
13. 2005 Nordic ID Oy HF series System Developer Guide v 1 0 95 2 Nordic ID RF series NORDICID 15 1 3 Initial Display Prompt An initial prompt will always be displayed if no fields have been defined This will usually occur when the Hand terminal is switched on or when the RAM is cleared The initial display uses a user writeable header and a 18 character length input field 15 1 4 Text output on the Hand terminal Display The Hand terminal fills its display buffer with the data from the received frame When no cursor control commands are given SET_CURSOR the string will be displayed starting with position O The SET_CURSOR command moves the starting point to the position given in the command The size of the Virtual Display cannot be exceeded Carriage Return ODh gives a line feed and moves the cursor to the start of the next line TAB 09h moves the cursor forward 4 positions 15 1 5 Commands HOST gt Hand terminal Command Table 06 ACK 1 O6h Acknowledgement from the Host 07 BELL 1 07h Generates a beep Tabulator moves the cursor 4 M ald PEN positions 0A SPC CMD 5 OAh Special command for hand terminal OD CR 1 ODh Carriage Return Line Feed OE SET_CURSOR 2 OEh POS Cursor Control OFh POS L OF NEW FIELD 4 xit Definition of the Input Field 10h L duration Generates a beep sequence with 10 BELL EX Pi specfic duration of beep and delay duration of delay Defines the parameters of the 11 FIELD_CMD 3 11h
14. 5 1 2 Starting the data handler thread In the multi threaded applications the data handling thread is launched in DataArriver handler Only commlD and framelD parameters are passed to the DataHandled thread Then the DataArrived handler is exited immediately This action ensures that data can be simultaneously processed and received from the hand terminal Data rrived event Start data handling thread and return immediately void CFormsDlg Data rrivedPlserverctrli long id short frameid Create thread m DataHandlerThread DataHandlerThread AfxBeginThread RUNTIME CLASS DataHandlerThread THREAD PRIORITY NORMAL O CREATE SUSPENDED This windows object is needed in handling thread m DataHandlerThread SetOwner this Passing data to handling thread m DataHandlerThread gt DataToProcess id frameid Pe RUT GG m DataHandlerThread gt ResumeThread Example of starting the Data Handler thread 5 2 Forms 5 2 1 Hand terminal display area w2w o 01 wu WIL Q Ww 2 wW Pde 2 P 2 ww 2 WP 9 wr Rh A Ta MVw NAVAL Nhu VAL ue VALL Reef Um Deu Re NRI Chel Met RS PULO 220 The Hand terminal has a virtual display page of 12 x 20 characters The actual display size is 8 x 20 characters so that only one third of the virtual page can be viewed at one time All Ul elements are addressed by positions Position O is upper left corner and position 239 is down right corner 2005 Nordic ID
15. POS FCMD Input Field 12h CCMD POS 12 CLEAR CMD Z A MN wires Partially clears the Display 13 SET VIEW 2 13h ROW Sets the Viewing Window 14 POP MSG 22 14h L txt Puts the message in the Display 2005 Nordic ID Oy HF series System Developer Guide v 1 0 96 fer ce Lo D ni ET 1 18 1 16 17 18 19 1A 1B 1C 1D 15 1 6 FLD TXT BUTTON SEND WHAT DATA TO SERIAL WAIT SERIAL NEW FIELD EX RECEIVER FORM ID gt E 16h POS L txt 17h POS L txt 18h DELAY 19 L txt 1A DELAY 1Bh POS L STYLE 1Ch mode 1Dh FID HI FID LO O NORDICID Fills presets the field with the text Definition of the button style input field Send WHAT command to HOST when DELAY has expired Sends txt to the serial port of the hand terminal Waits data from the serial port at specific time Definition of the Input Field Receiver mode on off User defined ID of the form Order of Execution OF Commands The Hand terminal executes commands from the Host in the following order pL Oy OL sen ess a i St a O CELO Ls por ee LE POP MSG CLEAR CMD ACK Text printing and BELLs BUTTON FIELD CMD NEW FIELD NEW FIELD EX FLD TXT SET VIEW SEND WHAT WAIT SERIAL DATA TO SERIAL RECEIVER FORM_ID SPC_CMD 2005 Nordic ID Oy RF series System Developer Guide v 1 0 only 1 allowed per frame only 1 allowed per frame only
16. style Style bits of the input field Bit O Field is sent to HOST by pressing the OK ke Field is not sent if the SND ALL command Bit 1 NO SEND occurs Field will be sent if the field itself gave the SND ALL command All fields in the page except NO SEND fields are PIS sent to the host when the OK key is pressed Field is locked Field cannot be written to used E for button style fields Bit 4 Field is underlined Bit 5 aram can be filled with laser or external scanner Bit 6 Field is cleared if ACK is received Bit 7 Field is active it has a cursor SND ENTER and FLD READER combinations SND ENTER FLD READER FUNCTION 0 Field is not sent by pressing the OK key and cannot be read with a laser scanner Field is not sent by pressing the OK key but it can be filled from the keyboard and with a laser scanner Field is sent by pressing the OK key but cannot be filled with a laser scanner Field is sent by pressing the OK key or by reading 1 with a laser scanner Return value True Command added to the send buffer successfully False send buffer is full 2005 Nordic ID Oy RF series System Developer Guide v 1 0 61 2 Nordic ID RF series NORDICID 14 2 4 NewFieldEx Define a new Input field in to the hand terminal screen NewFieldEx method is same as NewField but style bit s OVR and READER DEFAULT are replaced bit s FLD LINE and FLD ACKCLR Field is underlined automatically A maximum of 20 i
17. the cursor moves Bit 4 OVR to the starting position of the field When the cursor is in the starting position the orevious text will be overwritten by typing Field can be filled with laser or external Bit 5 m If another field is active and it has not FLD READER set laser scanner is activated and data goes to this field Bit 6 READER DEFAULT automatically Only one READER DEFAULT field can be defined per form This bit has no effect if FLD READER bit is VO Bit 7 Field is active it has a cursor SND ENTER and FLD READER combinations SND ENTER FLD READER FUNCTION 0 Field is not sent by jsuis the OK key n nnot r with r nner Field is not sent by aa OK key 1 but it can be filled from the keyboard and with a laser scanner 0 Field is sent by pressing the OK key but cannot be filled with a laser scanner Field is sent by pressing the OK key or by reading with a laser scanner ui Return value True Command added to the send buffer successfully False Send buffer is full 2005 Nordic ID Oy HF series System Developer Guide v 1 0 30 2 Nordic ID RF series NORDICID 6 2 Input field reading to the application The GetData method returns a string from the defined input field However the IsData method should be used to check if the hand terminal has just sent the data from that particular input field The IsData method is no need to use if it i
18. 1 allowed per frame only 1 allowed per frame only 1 allowed per frame only 1 allowed per frame only 1 allowed per frame only 1 allowed per frame 97 2 Nordic ID RF series NORDICID 15 1 7 SET_CURSOR Description Cursor control 2 bytes Syntax OEh POS POS Cursor position 0 239 15 1 8 NEW FIELD Description Defines a new Input field 4 bytes Syntax OFh POS L STYLE POS Starting point of the field 0 239 L Field length 1 63 STYLE Field functions STYLE bits can be set or cleared to enable or disable the function Bit 0 SND ENTER Field is sent to HOST by pressing the OK key Field is not sent if the SND ALL command occurs Field will be sent If the field itself gave the SND ALL command Bit 2 SND ALL All fields in the page except NO SEND fields are sent to the host when the OK key is pressed Bit 3 FLD LOCK _ Field is locked Field cannot be written to used for Button style fields Bit 4 FLD LINE Field is underlined Bit 5 FLD READER Field can be filled with laser or external scanner data Bit 6 FLD CLR Field is cleared if ACK is received Bit 7 FLD ACTIVE Field is active it has a cursor Bit 1 NO SEND SND ENTER and FLD READER combinations SND_ ENTER FLD_READER FUNCTION Field is not sent by pressing the OK key and cannot be read with i a laser scanner l Field is not sent by pressing the OK key but it can be filled from 0 1 the keyboard and w
19. 1100 FAST_INVENTORY 12 4 Format of appList txt 12 4 1 List of Remote host applications APPLICATIONS lt App_1_name gt lt App_2_name gt lt App_3_name gt lt App_4 name e App x name must be same than name when creating remote host connection in connList txt e Up to 6 applications can be routed e Application names are printed in the main menu where the user can select Example APPLICATIONS PLAPP FAST INVENTORY 12 4 2 Hand terminal access right list HS ID ID nro gt lt App number gt e Hand terminal ID which only have access to the system e f no HS ID entries all HS have access to all applications e App number specifies access right to available applications In same order than in APPLICATION section e f HS entries but no correct HS ID in the list then no response from AppRouter 2005 Nordic ID Oy RF series System Developer Guide v 1 0 45 2 Nordic ID RF series NORDICID Example HS ID 12345 1 This HS can only use app1 PLAPP HS ID 44444 12 This HS can use app7 and app2 PLAPP and FAST INVENTORY HS ID 23022 2 This HS can use only app2 FAST INVENTORY 12 4 3 Main menu item text MAIN MENU STHING STRING e When RF6xxAppRouter receives this string the main menu of the applications will be opened e lt STRING gt can be any which comes from the hand terminal initial screen or from F key as a plain string Example MAIN MENU STHRING F10 When HS user sends F10 the main
20. NO data from SSM base station msWaitTime interval has elapsed gt 0 Received length of ssmData in bytes See also sendSSMAck event DataFromSSMY SendSSMASCIllData SendSSMData 14 10 4 SendSSMAck Send an acknowledgement to the SSM base station When the SSM base station has sent a data to the host it waits for an acknowledgement It is the host program s responsibility to send this ack after receiving data If the SSM base station doesn t receive ack it will resend the frame as many times as defined in the SSM base station typically 3 void SendSSMAck long ssmlD Parameters ssmiD SSM base station ID number See also WaitSSMData event DataFromSSM SendSSMASCIIData SendSSMData 2005 Nordic ID Oy RF series System Developer Guide v 1 0 91 2 Nordic ID RF series NORDICID 14 10 5 DataFromSSM event PLServer launches this event when receiving raw data byte values 0 255 from the SSM base station Note After receiving data from SSM host application is responsible to send acknowledgement to the SSM base station with SendSSMAck method event DataFromSSM long ssmlD short FAR data short length Parameters ssmiD data to the base station data Data from the SSM base station length Length of the data in bytes See also DataFromSSMASCII event 14 10 6 DataFromSSMASCII event PL Server launches this event when receiving text string from the SSM base station
21. SSM DATA has the following format 1Fh Len Data The Len field indicates the number of bytes in the data part If the attached device tries to send a string that is longer than the maximum frame size about 250 bytes it is split to two or more frames 2005 Nordic ID Oy RF series System Developer Guide v 1 0 111 2 Nordic ID RF series NORDICID When the SSM base station has sent a frame to the host it waits for an acknowledgement It is the host program s responsibility to send this acknowledgement unlike the SSM base station the host base station will not automatically send an acknowledgement An empty frame serves as an acknowledgement for the SSM base station i e a frame that has length 0 and no data part If the SSM base station receives no acknowledgement it will resend the frame The host program should use the message number field in the message PREFIX A byte to distinguish between new frames and possible superfluous resends 2005 Nordic ID Oy HF series System Developer Guide v 1 0 112 2 Nordic ID RF series NORDICID 2005 Nordic ID Oy RF series System Developer Guide v 1 0 113
22. and cannot be read with a laser scanner Field is not sent by pressing the OK key but it can be filled from the keyboard and with a laser scanner Field is sent by pressing the OK key but cannot 1 be filled with a laser scanner 1 Field is sent by pressing the OK key or by reading with a laser scanner Return value True Command added to the send buffer successfully False Send buffer is full 2005 Nordic ID Oy HF series System Developer Guide v 1 0 29 2 Nordic ID RF series NORDICID NewFieldEx e Defines a new Input field in to the hand terminal screen e NewFieldEx method is same as NewField but style bits OVR and READER DEFAULT are replaced bit s FLD LINE and FLD ACKCLR e Field is underlined automatically e A maximum of 20 input fields can be defined for one form BOOL NewFieldEx long id short pos short field len short style Parameters id Hand terminal commID number os Start position of the input field O 239 field len Field length style Style bits of the input field l Bit 0 SND ENTER Pas is sent to HOST by pressing the OK Field is not sent if the SND ALL command Bit 1 NO SEND occurs Field will be sent if the field itself gave the SND ALL command All fields in the page E NO SEND e fields are sent to ost when the OK key is pressed Bit 3 Reserved Reserved set as 0 Overwrite mode When OVR is set and the field becomes active
23. commands DATA cell sizes are listed in Appendix B Estimate the maximum number of hand terminals and transactions hand terminal in worst case scenario This can occur in e g stock taking situation and there is a danger that radio link or backend software chokes In the RF600 backend system max 3 transactions per second can be achieved if the response time is below 50ms in the backend software Test the system as well as possible before the installing it to the customer E g the software works with one or two hand terminals but how does it work in a 10 hand terminal environment 2005 Nordic ID Oy RF series System Developer Guide v 1 0 13 2 Nordic ID RF series NORDICID Estimate the number of base stations needed If the operating area of the hand terminals can not be covered with one base station the number of base stations needs to be increased Also the base stations have to be connected to the LAN with the Device server 2 3 Character map of the hand terminal The character map of the hand terminals is shown in ASCII table below If no desired characters found please contact NordiclD ELI Fe TYY H 8 8 310 1 7 J at am oA RAeECE E CR 22424 3 5 2 3 Ae sgag iti t oo 2 4 Single or multi threaded application In the RF600 system there can be dozens of hand terminals operating simultaneously with the backend software When the number of hand ter
24. from the hand terminals and relays them to the backend system 2005 Nordic ID Oy RF series System Developer Guide v 1 0 37 2 Nordic ID RF series NORDICID 10 1 Serial port connection The base station connects to the backend software thru the RS232 port Default settings for the RS232 port are 19200 8 n 1 and it is connected to the COM port in PC with the special cable from the Nordic ID The backend software needs to open and connect to the COM port with the PLServers connect method The application is connected to PC serial port by using the Connect method BOOL Connect short com_port Parameters lt com_port gt COM port number of the HOST PC Example Connect 1 Connect to COM 1 Connect 0 Disconnect Return value True if connected successfully False if port not exist or port is already in use The opened COM port can be seen in the PLServer control window Unsuccessful opening of the COM port 2005 Nordic ID Oy RF series System Developer Guide v 1 0 38 2 Nordic ID RF series NORDICID 10 2 Connecting several base stations If the working area cannot be covered with only one base station more base stations can be connected to the backend system by using the Local Area Network LAN 10 2 1 Device servers Devices that transform the serial communication to TCP IP communication are called Device Servers There are several device server brands and manufacturers and those sho
25. host Otherwise to the active input field Return value True Command added to the send buffer successfull False Send buffer is full See also DataToSerial BinaryToSerial GetSerialData 14 7 4 GetSerialData If the hand terminal serial port has been opened with WaitSerial method and delay parameter is 255 the hand terminal sends data from serial port directly to the HOST The HOST can read received data to its buffer with this method Serial settings are fixed to 19200 n 8 1 short GetSerialData long id short FAR serdata Parameters id Hand terminal commlD number Data from the hand terminal serial port serdata Return value length of the serdata in bytes See also WaitSerial DataToSerial Binary ToSerial 2005 Nordic ID Oy HF series System Developer Guide v 1 0 86 2 Nordic ID RF series NORDICID 14 8 Raw data methods 14 8 1 SendRawData Send raw binary data to the TCP IP connection session specified by ConnectToSerialServer method short SendRawData long connID short FAR rawData short length Parameters Session number of the connection returned by conniD SHHE Soari ver eion rawData Binary data values 0 255 length Length of the data in bytes Return value 0 Sending failed connection not established 1 Sending successful See also RawDataArrived event 14 8 2 RawDataArrived event PL Server launches this event when receiving raw data from the TCP IP connection
26. is 1 the oreviously defined frameid is valid Return value True Data are beginning to send to the hand terminal False Data is already under sending framelD 14 3 11 DataArrived event PLServer launches this event when receiving data from the hand terminal Host application handles received data and sends an answer back to the hand terminal with Send method When DataArrived event is handling hand terminal data PLServer cannot launch any other DataArrived event at this time 2005 Nordic ID Oy HF series System Developer Guide v 1 0 79 2 Nordic ID RF series NORDICID Therefore its recommended that Host application creates a separate thread to handle hand terminal data and release DataArrived handling as fast as possible Multithread application is not necessary application gives fast response and only few hand terminals are used at same time event DataArrived long id short frameid Parameters given by PLServer id and terminal commID The number of form defined by the user If the frameid is 1 the frameid data comes from the initial screen or from a function key This value is defined in Send method See also Send method 14 3 12 DataFromHsField event This event offers a string from a specific Hand Terminal from a specific form and from a specific position DataFromHsField is launched as many times as there is input field contents received from the hand terminal After all DataFromHsFie
27. terminal from specific type operation 1 if there is no data received from specific type See also SpecialCmd 14 3 Form and Ul element commands 14 3 1 ClearForm Clears all existing texts and fields from the display and sets view to row O BOOL ClearForm long id Parameters id Hand terminal commlD number Return value True Command added to the send buffer successfully False Send buffer is full 2005 Nordic ID Oy HF series System Developer Guide v 1 0 67 2 Nordic ID RF series NORDICID 14 3 2 ClearCmd Partially clears the display of any text or field BOOL ClearCmd long id short cmd short start short stop Parameters id Hand terminal commlD number BitO CLEAR TXT Removes text from start to stop Bit1 CLEARFLD Removes fields from start to stop cmd B2 CLEAR FLDDATA eas the field data from start to start start position of the display 0 239 stop stop position of the display 0 239 Return value True Command added to the send buffer successfully False Send buffer is full 14 3 3 FieldCmd Changing function of existing input filed BOOL FieldCmd long id short pos short fcmd Parameters id Hand terminal commlD number pos Position of the input filed FLD _ l Bito REMOVE Removes the field Biti FLD CLEAR Clears the field from locked fields also Heserved femd Bit3 FLD LOCK Locks the field cannot be written to Heserved Bit5 _ Reserved
28. 0 35 2 Nordic ID RF series NORDICID 9 1 1 What method What method is used to configure the hand terminal to send the What query at intervals 1 s 99 s to the backend software The What query is a Is there any messages for me like question to the backend software When the hand terminal sends What signal the PLServer triggers What event instead of DataArrived It is recommended but not necessary that the application sends a response to the hand terminal 9 1 2 What The hand terminal sends WHAT command 18h to HOST every time between specified delay seconds BOOL What long id short delay Parameters id Hand terminal commID number dela 0 99 seconds elay DELAY is 0 The hand terminal stops sending WHAT command Return value True Command added to the send buffer successfully False Send buffer is full See also What event Hand terminal send WHAT command to HOST every time between specified delay parameter The hand terminal stops sending WHAT when the hand terminal is reset or delay parameter is 0 Example host command What id 5 set HS to send what code between 5 second When Host gives What id O HS will stop sending what code 9 1 3 Hand terminal behavior when What is sent Hand terminal waits answer from host after WHAT code is sent Wait time is same as Reception time limit parameter in hand terminal Default is 1 sec 2005 Nordic ID Oy
29. 14 5 8 GetBatteryLevel This method allows HOST application to monitor battery level of the hand terminal Example the HOST application can generate the warning messages to the hand terminal if battery level is too low short GetBatteryLevel long id Parameters id Hand terminal commlD number data Data frame from the hand terminal Return value Battery level in 96 8 fixed levels 0 10 20 40 50 70 80 100 2005 Nordic ID Oy HF series System Developer Guide v 1 0 79 2 Nordic ID RF series NORDICID 14 5 9 GetCRCValue Return CRC value of the last received message long GetCRCValue long ic Parameters id Hand terminal commlD number Return value Long value of CRC 0 65535 14 5 10 GetHsldString Return the hand terminal commlD value as a string format Can be used for indicating is hand terminal communicated or not since application startup BSTR GetHsldString long id Parameters id Hand terminal commlD number Return value String value of commID Empty string if HS is not communicated with the application 14 5 11 GetSourcelPAddr Return the IP address of the network source which has received last message from the hand terminal String format like 172 16 32 17 BSTR GetSourcelPAddr long id Parameters id Hand terminal commlD number Return value otring value of source IP address 2005 Nordic ID Oy HF series System Developer Guide v 1 0 80 2 Nordic ID RF seri
30. 3 14 3 4 14 3 5 14 3 6 14 3 7 14 3 8 14 3 9 14 3 10 14 3 11 O NORDICID PLMultiThread sssssssssm nennen nens 54 ScanAndSend 1 T T asserentes ense terrere serrer serrer serrer eren nd 55 APPENDIX A PLServer methods and events sss 56 Base station connection methods 56 eeu 01 MN 56 RN MN TRREE 57 ejrajo ters n 5 OORSEE 57 CONNMECTTOSEVIAISSIVEN ooo cccccesecesececcescecsecusecerecnresrevereverevssesitesstesitenieetresnieentees 58 DISCONNECTSENAISECIVOEN A 58 GetSerlalSvr Status ooo ceececccsccsecesevecccseversvssvsevsseuseveseussvesesievssssisessesivesseseenrenen 59 SerlalServerMessage event 59 User Interface elements sse ens 60 248 EA e TOR 60 PUNON MR 60 NOWEIOI DOODO 61 NGAA mlO gt OOOO 62 aieleccm P 63 A OOE ENE P ee ee ee ee 63 gt 1101 f O16 ATO nce 64 wgeriP uoc nn eee ne ee ey eee 67 Form and Ul element commands sss 67 CLEA FOI POOO 67 NE IN C 68 FG TOV MORS 68 gp 69 SI MM 69 igsimmEEM 70 emen mEME 1 NINA E 71 l un
31. D 14 4 2 Beep Generate a specific length of beep and delay BOOL Beep long id short length short delay Parameters id Hand terminal commID number Beeper is ON 10 x length milliseconds eg value 100 1 seconds dela Beeper is OFF 10 x delay milliseconds Example S O S tone Beep 12000 5 10 Beep 50ms ON and 100 ms OFF Beep 12000 5 10 S Beep 12000 5 30 Beep 12000 15 10 150ms ON and 100ms OFF Beep 12000 15 10 O Beep 12000 15 30 Beep 12000 5 10 Beep 12000 5 10 S Beep 12000 5 10 length m M c c Return value True Command added to the send buffer successfully False send buffer is full 2005 Nordic ID Oy HF series System Developer Guide v 1 0 76 2 Nordic ID RF series NORDICID 14 5 Data receiving 14 5 1 GetData Return a string from the specific input field position 0 239 BSTR GetData long id short pos Parameters id Hand terminal commlD number 00S Position of the input field 0 239 Return value Basic String A pointer to a null terminated Unicode character array that is preceded by a 4 byte length field See also IsData 14 5 2 IsData This method will return TRUE if data is coming from pos BOOL IsData long id short pos Parameters id Hand terminal commlD number 00S Position of the input field 0 239 Return value True Data coming from pos field False No data coming from pos field See als
32. DataFromSSM is launched before DataFromSSMASCIl Note After receiving data from SSM host application is responsible to send acknowledgement to the SSM base station with SendSSMAck method event DataFromSSMASCII long ssmID LPCTSTR dataString short length Parameters ssmiD data to the base station dataStrinc String from the SSM base station ASCII values 32 255 length Length of the data in bytes See also DataFromSSM event 2005 Nordic ID Oy HF series System Developer Guide v 1 0 92 2 Nordic ID RF series NORDICID 14 11 Colors of PLServer ID box e RED DATA IN Hand Terminal is sent data to the PLServer DataArrived event is launched e YELLOW READY TO SEND hardly seen HOST application has processed hand terminal data and Send method is called Then answer to the hand terminal is ready to send e GREEN SENT Answer to the hand terminal has been sent e BLUE WAIT WHAT Host application has built commands to the hand terminal and Send method is called If any hand terminal data is not in processed at the time PL Server will send this answer when hand terminal sends WHAT command e WHAT IN Hand terminal is sent WHAT command but any answer to the hand terminal is not ready WHAT event is launched e WHITE with coloured sides Indicates that hand terminal has a RECEIVER mode ON Installing PLServer and Redisributable DLLs The setup program must install the necessary redistributable DLL files in the W
33. HF series System Developer Guide v 1 0 36 2 Nordic ID RF series NORDICID If no answer from host within Reception time limit WHAT code resends are made as many times specified at Resending time parameter Default 3 times If all resends are used and still no answer from host HS will not generate transaction failure beeps and F sign Then WHAT code is sent to the host next time until x seconds is expired 9 1 4 Using What method instead of Receiver method Some cases RECEIVER mode has been used to keep radio open and listening messages from host However problem of using this method is higher battery consumption and possibility of data loss Also host application developing might be more complicated Using What is more reliable and simple than Receiver mode so it s highly recommended to use What instead of Receiver mode Note What method can operate in two different ways in the hand terminal The old style is that the query is sent only once after a period of time The new style is to send the queries continuously at intervals until the backend software stops the process with What 0 command Behavior of the What is chosen from the menu in the hand terminal Settings gt What Behavior 0 New style 1 Old style 10 Base station connections The base station is needed for communication between the hand terminal and the backend software The base station transmits the signals to and
34. Host application developing for the RF family hand terminals 2 Nordic ID RF series NORDICID Document history 28 9 2005 Version 1 0 by Ari P yh nen Abstract The Nordic ID RF family hand terminals are easy and flexible solution for real time and remote control of database The RF family hand terminals acts like a terminal client for the backend system so there is no need for programming of the hand terminal The backend system runs on a server in which the hand terminal connects through the base station s The backend system is responsible for the User Interface elements such as Text Buttons and Input fields This document is intended for developing the backend system for RF family hand terminals 2005 Nordic ID Oy RF series System Developer Guide v 1 0 2 2 Nordic ID RF series NORDICID Contents Abstract 0e eere eere ee rere 1 System operation eee 1 1 Operation of the Hand terminal 1 2 CALLE TECA i e emere nnns 1 3 Starting transaction LLDD L E EEE E 1 4 How many hand terminals can be used in same system oo 2 Host application 2 1 Host application security 2 1 1 Radio link security RRReRmmmmnemeerrremenen rennes 2 2 Checklist for good quality backend software developing 2 3 Character map of the hand terminal an annn 2 4 Single or multi threaded application osse 2 4 1 Single thread application 2 4 2 Multi threaded application sssssssss
35. Oy HF series System Developer Guide v 1 0 2d 2 Nordic ID RF series NORDICID 5 2 2 Application forms Usually the backend software has several interfaces for the user So the software has to know what kind of form is currently used in the hand terminal The PLServer method SetFormlD can be used to identify every form before it is sent to the hand terminal The FormlD is saved to the memory of the hand terminal In every transaction when the user sends data to the host this FormID is sent also The GetFormlD is used to find out what kind of form user has in the hand terminal 5 2 3 Designing forms Before the writing the code of the backend software there has to be made some planning for the forms FormPlanner xls excel file is helpful tool for that That tool can be also used to create screenshots for the user manual of the backend software 5 2 4 User Interface elements The backend software can use several elements to create forms User Interface elements are e Text Text can be created with TextEx method Input field These fields may be filled by using the keyboard or the laser scanner Fieds are underlined Input field is active when cursor is visible o NEN oome input fields can only be filled by keyboard See more information from NewField and NewFieldEx method Button When active user can only press OK button to send information to the host Active button is completely black Inactive button ma
36. PC with Windows OS W2k or XP Serial port connection for the RF600 Base Station e Visual Studio NET 2003 or later optional RF Family host programming tutorial CD RF family hand terminal RF600 or RF650 RF600 base station or Bluetooth dongle RF650 Windows PC w2k or XP e Physical Serial port RS232 for the RF600 base station e Visual Studio NET 2003 or later optional RF Family host programming tutorial CD 2005 Nordic ID Oy HF series System Developer Guide v 1 0 18 2 Nordic ID RF series NORDICID 3 2 Sample program installation Insert RF Family host programming tutorial CD in to the disk drive and wait until setup starts up Default directory for the sample files Program files gt NordicID gt RF family gt Samples The example software can be launched at Start gt Programs NordicID RF family Samples Setup registers the PLServer automatically 3 3 Installing hardware Follow the instructions with the hand terminal and base station to install the hardware 3 4 Test your hardware Follow the steps below to ensure the communication between the host and the hand terminal Start Hello world application from Start Programs NordiclD RF family Samples oelect correct COM port for the RF600 base station Press OK or any F key from the hand terminal Hello World text should appear in to the hand terminal screen Hello World text disappears when press
37. Reception time limit WHAT code resends are made as many times specified at Resending time parameter Default 3 times If all resends are used and still no answer from host HS will not generate transaction failure beeps and F sign Then WHAT code is sent to the host next time until x seconds is expired Note The What method in Nordic ID RF seriex can be set to work in two different ways The old style RF6xx kasipaatteissa on What metodille kaksi eri toiminta tapaa Aikaisemmin What metodi toimi siten ett kasipaate l hetti What n vain kerran maaratynajan kuluessa Nyt uudella toimintatavalla k sip te l het What n aina m r tynajan v lein kunnes tausta pys ytt What 0 komennolla K sip tteist voidaan valita toiminta tapa sis isest valkiosta The behaviour of What can be set from the build in menu of the hand terminal Settings gt What Behavior 0 New style 1 Old style 2005 Nordic ID Oy HF series System Developer Guide v 1 0 72 2 Nordic ID RF series NORDICID 14 3 9 What event What event is fired when hand terminal sends What code event What long id Parameters given by PLServer id Hand terminal commlD See also What method 14 3 10 Send This method will send the defined commands to the Hand Terminal BOOL Send long id short framelD Parameters id Hand terminal commlD number The number of form defined by the user If frameid
38. Replsll le sl lll n 104 15 1 23 ncmo D ee re 105 15 1 24 Commands Hand terminal gt HOS L ems 108 16 APPENDIX C RF600 SSM mode protocol ome 110 16 1 Purpose of this document seme es 110 16 2 OverviQew ce 110 16 3 The power on configuration mmm ees 110 16 4 Sending data from the host to the SSM base station 111 16 5 Sending data from the SSM base station to the host sss 111 2005 Nordic ID Oy HF series System Developer Guide v 1 0 9 2 Nordic ID RF series NORDICID 1 System operation The system consists of radio hand terminals which are used to communicate wireless with the host system via a receiver device using a very efficient communications protocol The host system can be just a PC or a more complex computer system E HOST SYSTEM Receiver P The application software runs by the host system the handheld appears to it like a wireless keyboard display scanner This eliminates the need for programming the handheld units thus making software development and updating extremely easy and allowing software to be flexible in application And more the communication is rapid because it is real time 1 1 Operation of the Hand terminal The Hand terminal is designed to use application specific forms i e fields in the virtual display This helps to make the user interface of the Hand terminal flexible and easy to use The commands used to generate modify read and write the forms are described late
39. TROKE After that the hand terminal will wait a response from the HOST Password style for input field D1 D2 D3 will define a position of the password input Bit 2 field The Handterminal user can only see asterix chars when typing to the input field Bit 3 Heserved Bit 4 Heserved Bit 5 Heserved Bit 6 Heserved Bit 7 Heserved Bit 0 Bit 1 2005 Nordic ID Oy HF series System Developer Guide v 1 0 105 2 Nordic ID RF series NORDICID FUNC Bit 0 Bit 1 Bit 2 Bit 3 Bit 4 Bit5 Bit6 Bit 7 Hand terminal Password Emulates sends style the key press keystrokes input to the fields HOST Key value decimal F1 EN Fa um 2 FS um ae E Po iut BAR 6 DEL tc Positionof DOT 8 password MINUS 9 input D1 UP De Pad WE DOWN 11 OK 32 255 not 0 13 defined 1 2 19 3 16 ED a ux Ws 6 19 T 20 a x 2 9 22 Bit O TI TI NO Ba Bit 1 Bit 2 F3 3 Bit 3 F4 4 Bit 4 F5 5 Bit 5 password input ield 255 Not defined E vate nine o LE dll S L d lliL L d liL EN 2005 Nordic ID Oy HF series System Developer Guide v 1 0 106 O NORDICID o m o P LL Cc E i oO O c Bto x MNUSQ 0 0 0 0 0 o mi 00
40. Visual C 2 5 Drivers The driver software preprocesses the data from the hand terminals The base station has already checked the CRC and the origin of the data before relaying it to the software driver Functions of the driver e Relays the data to the application e Resends the data e Blocks similar consecutive messages to the application e n a multiple base station system driver sends the response from the host thru the best received signal strength base station 2 5 1 PLServer Nordic ID provides the driver for the Windows environment The PLServer is a Windows ActiveX control PLServer ocx which controls the data communication between the base station and the HOST application HOST Application Windows workstation Example of the application where PLServer control is used 2005 Nordic ID Oy RF series System Developer Guide v 1 0 16 2 Nordic ID RF series NORDICID PLServer control Connected to the base A part of the elation Hand terminal commID application Displayed when communicating first time Fast Inventory Serial Connection StartS erver COM4 v Port Serial Server Connection TCPAP address 7 Add Date and Time Open with Notepad Pott INE The PLServer makes HOST system software development easy by doing all the dirty work for you The use of PLServer provides a lot of functionality and code that you don t have to write or debug All you have to do is to figure o
41. __ Reserved FLD ACTIVE Field is set to active Return value True Command added to the send buffer successfully False Send buffer is full 2005 Nordic ID Oy RF series System Developer Guide v 1 0 68 2 Nordic ID RF series NORDICID 14 3 4 FidTxt Fill presets the field with the text If the length of txt is more than the length of the field the excess txt will be corrupted If the field is already filled with text it will be replaced with new text BOOL FIdTxt long id short pos LPCTSTR txt Parameters id Hand terminal commlD number DOS Position of the input field O 239 txt Text for the field Return value True Command added to the send buffer successfully False Send buffer is full 14 3 5 SetView Sets the display view to be started from specific line This method may need to use in situations where hand terminal screen has been scrolled downwards because only 8 lines are visible in the display at the time and virtual form size is 12 lines BOOL SetView long id short row Parameters id Hand terminal commlD number rau View line number 0 3 i this value is greater than 3 then this method will be gnoreq o IC NANa LeETITIITId Return value True Command added to the send buffer successfully False Send buffer is full 2005 Nordic ID Oy HF series System Developer Guide v 1 0 69 9 Nordic ID RF series NORDICID 14 3 6 SetFormID This method defines a specific ID number which de
42. a laser scanner 0 0 Field is sent by pressing the OK key but 1 0 cannot be filled with a laser scanner 1 1 Field is sent by pressing the OK key or by reading with a laser scanner Return value True Command added to the send buffer successfully False send buffer is full 2005 Nordic ID Oy HF series System Developer Guide v 1 0 62 2 Nordic ID RF series NORDICID 14 2 5 PopMessage Define a message which is displayed in the hand terminal screen as long as any key is pressed Only one PopMessage method call can be included in the send buffer BOOL PopMessage long id short pos LPCTSTR txt Parameters id Hand terminal commlD number pos Start position of the button 0 79 txt Text for the screen May include VT and CR characters Return value True Command added to the send buffer successfully False Send buffer is full 14 2 6 Ack This method adds the Ack command to the send buffer Ack method can be used at NewField command Please see style bits BOOL Ack long id Parameters id Hand terminal commlD number Return value True Command added to the send buffer successfully False Send buffer is full See also NewField 2005 Nordic ID Oy RF series System Developer Guide v 1 0 63 2 Nordic ID RF series NORDICID 14 2 7 SpecialCmd SpecialCmd defines special functionalities to the hand terminal BOOL SpecialCmd long id short type long data Type Bit 0 Bit 1 Bit 2
43. add two lines of code SEE UR Ln m pl PopMessage id 64 Hello World m pl Send id 1 2005 Nordic ID Oy HF series System Developer Guide v 1 0 20 9 Nordic ID RF series NORDICID 16 Add button to dialog 17 Set button caption Connect to COM port 18 Goto button click handler and add one line of code m pl Connect 4 This Connects to COMA Choose correct COM number for your base station 19 Compile executable and run it 20 Press Connect to COM port button 21 Press OK or and F key from the hand terminal 22 Hello World PopMessage appears to the hand terminal screen HelloWorld esimerkki koodit l ytyv t Samples hakemistosta HelloWorld_VC Visual C HelloWorld_VB Visual Basic 5 Handling hand terminal messages When user starts a transaction by sending a data to the host the PLServer sends a DataArrived event to the backend software The application handles the data and sends a response The response can be a new form or some supplementary information to the excising form in the hand terminal The backend software has almost unlimited possibilities choosing which data is sent to the hand terminal Note The backend software has always to send a response to the hand terminal Except if the hand terminal is not authorized Then the response should not be submitted see chapter Host application security 5 1 DataArrived event PLServer triggers this event wh
44. ber and the checksum from it and passes only the actual data to the serial port in the exact order and format given in the frame Frame Data 1 Header number or more Checksum 1 byte bytes When the SSM base station receives a frame that is not itself an acknowledgement see below it sends back an acknowledgement frame This frame contains only the RECEIVER_ACK character 1Ch It is the host program s responsibility to wait for the acknowledgement and manage resends if no acknowledgement is received Header 1Ch Checksum In case the acknowledgement sent by the SSM base station is lost or the SSM base station receives a duplicate data frame for some other reason the frame number byte is used to distinguish between resends of a previous frame and completely new frames Therefore it should be different for every new frame but remain the same on every resend It is the host programs responsibility to ensure that this convention is followed Note that there is no inherent meaning to the frame numbers as long as the rules laid out above are followed any convenient numbering convention may be adopted for example sequential frame numbering or simply numbers alternating between one and zero 16 5 Sending data from the SSM base station to the host When the SSM base station receives data from the device attached to its serial port it encapsulates the data into an SSM DATA command and sends it to the host The
45. ce server e Serial Server Connection if the Device server is configured to host Type the TCP IP address and port in the Serial Server Connection dialogue This method allows to connect several Device server 2005 Nordic ID Oy RF series System Developer Guide v 1 0 47 2 Nordic ID RF series NORDICID 13 1 Forms sample In the main menu of the Forms sample application the user can choose the desired function by using the arrow keys This main menu looks like typical main menu of the backend software Forms sample is a multithreaded application and it is created with Visual C The basic structure of this program can be used when creating the actual backend software 13 1 1 Calculator This is simple two input calculator The user input value1 and value2 with the keyboard and then chooses the operand below the values The result is shown after the character This demonstrates different types of input fields Value1 and Value2 input fields does not send data when the user presses the ok key When the user chooses the operand by activating it and pressing the ok key the input text of the Value1 and Value 2 input fields are sent to the backend software The operation buttons x and are created by using the NewFieldEx and FldTxt methods with SND ALL flag ON This is because of the content of the Value1 and Value2 input fields has to be sent simultaneously with the operand to the host 13 1 2 Auto Scanni
46. e nens 44 12 3 1 Serial Port Connection o oo cece cccecescesecscescesevscvseveevesvesvrsveevsevetvesververeresveseereeseereen 44 12 3 2 elk MNENENMEMRMMREE A m 44 12 3 3 Client connection eren EIEEE KEEKEEKE EEEn 44 12 3 4 HOST Application connections eene 45 12 4 Format of APPLIST EK sse r rane narea 45 12 4 1 List of Remote host applications ssssssssssssssse nn 45 12 4 2 Hand terminal access right list sssssssssssssss nes 45 12 4 3 Main menuitem text nennen terrere sensere sensn 46 12 4 4 Main menu header text terere nni 46 12 4 5 Host down notification text eene nennen 47 13 Host application samples on the CD oo sss 47 13 1 Forms SAMPIO ooo ccccccceccccescccesecetecessecesseversecereeverecvetesersestsestteversestieestreens 48 13 1 1 OX 1010 F116 AOIN 48 13 1 2 PANG C0 R 10r 1 010110 0 ce 48 13 1 3 User authorization form sse eene 49 13 2 FastlMVemtory A 49 13 3 NS 50 13 4 0 1 O10 A 1KO nn 52 13 5 Software WEUGO ooo ccccececeseceseveesveecvssevseecresuresuiteiesrevrevrsvsuevrevireneeenetene 53 2005 Nordic ID Oy RF series System Developer Guide v 1 0 5 A Colgo Lo D ni ET 1 18 1 13 6 13 7 14 14 1 14 1 1 14 1 2 14 1 3 14 1 4 14 1 5 14 1 6 14 1 7 14 2 14 2 1 18 2 2 14 2 3 14 2 4 14 2 5 14 2 6 14 2 7 14 2 8 14 3 14 3 1 14 3 2 14 3
47. e power on configuration In SSM mode the base station supports arbitrary serial port configurations between transfer rates of 1200 to 19200 bps However to configure the base station with the Piccopla program the serial port must in a known configuration Therefore when the base station that has been set to function in the SSM mode is powered it sets the serial port into 19200 8 n 1 mode and waits a certain period for configuration commands If no commands are received before the period set to 10 seconds as a factory setting expires the base station initializes its serial port to the user configured mode During the configuration period both lights on the base station will be lit When the base station goes to normal operation and is ready to receive data the transmit light will go out 2005 Nordic ID Oy HF series System Developer Guide v 1 0 110 2 Nordic ID RF series NORDICID 16 4 Sending data from the host to the SSM base station The SSM base stations are addressed by their serial numbers in the same way hand terminals are The frame sent to the SSM base station should contain a frame number in the first byte of the data part and immediately after that the data as a sequence of raw bytes Note that there is no special command character before the actual data part everything after the frame number sent to an SSM base station is assumed to be data When the SSM base station receives the frame it strips the header frame num
48. ections e Filters received messages that only one message is passed to the remote host e Controlling the hand terminal access rights Possible to define that the specific hand terminal can use only the specific host applications e Main menu of the Application Router can be opened by pressing defined hot key Like F10 e Up to six 6 remote host applications can be defined e Notifies the hand terminal user when the remote host application is not available e Supports the RF600 and RF650Direct hand terminals e connList txt Connection list file for defining the base station and the remote host connections e appList txt Application list file for specifying remote host applications and the hand terminal access rights 12 2 System operation The RF6xxAppRouter program can be set to start automatically when PC is started While starting the RF6xxAppRouter reads connList txt file and opens the connections of the base station and the remote hosts After connections the RF6xxAppRouter opens appList txt file which specifies remote host applications and hand terminal access rights The appList txt consist also the text for the hand terminal display when main menu is opening and text when remote host is not available When the hand terminal user connects first time to the AppRouter main menu of the available host applications will be appear in to the hand terminal screen The hand terminal user can select the application to use When s
49. ed If field is already filled with text it will be replaced with the new text Syntax 16h POS L TXT POS Field POS L Length of text TXT Text for the field 15 1 12 BUTTON Description Creates a button style field 3 TXT bits The BUTTON command will create a locked field filled with text Field text TXT will be sent to the HOST by pressing the OK key Syntax 17h POS L TXT POS Button position 0 239 L Length of button TXT Text for a button 2005 Nordic ID Oy RF series System Developer Guide v 1 0 100 2 Nordic ID RF series NORDICID This command is suitable for menu creation SND ALL and NO SEND functions are disabled To create a button field with SND ALL and NO SEND functions use the NEW FIELD and FLD TXT commands instead of the BUTTON command 15 1 13 CLEAR CMD Description Partially clears the display of any text or field Syntax 12h CCMD POS START POS STOP CCMD Clearing flags CCMD Bit 0 CLEAR TXT Removes text from POS START to POS STOP Bit 1 CLEAR FLD Removes fields from POS START to POS STOP Bit 2 CLEAR FLDDATA Clears the field data from POS START to POS STOP Bit KKKKK 3 7 Reserved 15 1 14 SEND_WHAT Description Hand terminal send WHAT command 18h to HOST when DELAY has expired Syntax 18h DELAY DELAY 1 99 seconds 2005 Nordic ID Oy RF series System Developer Guide v 1 0 101 2 Nordic ID RF series NORDICID 15 1 15 SET_VIEW
50. ed to the serial port of hand terminals and thus are able to receive the DATA sent by HOST Serial settings are fixed to 19200 n 8 1 Syntax 19h L DATA L DATA length DATA Any ASCII characters 0 255 15 1 20 WAIT SERIAL Description Open the serial port of the hand terminal for specific time This command can be used to receive data from the external device such as card reader Serial port of the hand terminal cannot be open all the time because current consumption then is higher Any data from the serial port goes directly to the active input field of the hand terminal It depends on the style bits of the input field whether the data is sent to the HOST or not after reading from the serial port Serial settings are fixed to 19200 n 8 1 Syntax 1Ah DELAY DELAY 31 99 seconds New function since version 4 0 When DELAY parameter is 255 hand terminal will send all received serial data to the HOST directly Command 11h L DATA Serial port of the hand terminal will stay open 30 seconds Note RECEIVER command cannot be used same time with this command 2005 Nordic ID Oy HF series System Developer Guide v 1 0 103 2 Nordic ID RF series NORDICID 15 1 21 RECEIVER Description This command makes the hand terminal to listen transmissions continuously The RECEIVER function can be set ON OFF by keyboard as well SHIFT F1 After a hand terminal has received the message and the HOST has sent it independent
51. eeen 80 GetSoureel PAG GE recsacsntdaccinnucetdonseennseisuctonnevacon veerdeandosiondeuetiad eounseesdiguwstunaawononseesentawcennarnsuney dees 80 Receiver mode s cece ccc kararka s ariana anan EAEE AEEA E EAE EE KEEKEEKE EEEE EEE EEEE Earran 81 FN E E 81 Isis 21 5 RIP 82 w Inee MMERRRTRRH 83 WaitRecelverAck ooo ccc ccc cccccccseccscccecccesecsecnsecesssveeeeneesesseesisenseesisesnisenieesesenieeniteneens 83 MessageReceiverNotFound event 84 The hand terminal serial port methods 84 Data TOSeria U 84 Binary TOSI al ooo ccc ccscesececceecescvssveevescsserevescesserssreveseesievisveseersssesitvrensenieseteen 85 AIC LES sl Beene an ee net ne enw On eT 85 Geter Data WES 86 Raw data methods sse serene eere renes 87 SXTATO I a fa AVi DFe IKs DOSSO 87 RawDataArrived OVONE ooo ccc cccceccsccsecesecseceseveecereverevivssesisvrssrssersvsrenievstenievsreniees 87 General methods seems eene 88 Bri m 88 2005 Nordic ID Oy RF series System Developer Guide v 1 0 7 2 Nordic ID RF series NORDICID 14 9 2 DataQut QVEMT OOO 88 14 10 Sub Station Mode methods SSM sssssssss es 88 14 10 1 erijewsP u E 89 14 10 2 SendSSsMAGSCGIIData ssssssssssssseeemee eee eene nn 90 14 10 3 WaitS9SMbDoata ssssssss
52. een Note Text and TextEx methods are same Use TextEx instead of Text in VB NET applications BOOL TextEx long id short pos LPCTSTR txt Parameters id Hand terminal commlD number 00S Start position of the text 0 239 txt Text string to be displayed Return value True Command added to the send buffer successfully False Send buffer is full 18 2 2 Button Create a button style field The Button method will create a locked field filled with text Field text will be sent to the HOST by pressing the OK key This method is suitable for menu creation SND_ALL and NO SEND functions are disabled Please see NewField method To create a button field with SND ALL and NO SEND functions use the NewField and FldTxt methods instead of the Button method BOOL Button long id short pos LPCTSTR txt Parameters id Hand terminal commlD number os Start position of the button O 239 txt Text for the button Return value True Command added to the send buffer successfully False Send buffer is full 2005 Nordic ID Oy HF series System Developer Guide v 1 0 60 2 Nordic ID RF series NORDICID 14 2 3 NewField Define a new Input field in to the hand terminal screen A maximum of 20 input fields can be defined for one form BOOL NewField long id short pos short field_len short style Parameters id Hand terminal commID number os Start position of the input field O 239 field len Field lenath
53. elected the hand terminal goes to the initial state Next sending with the hand terminal will be routed to the remote host The AppRouter will remember routing path as long as the user presses main menu key Like F10 Note When making changes to the connList txt and appList txt RF6xxAppRouter program must be restarted 2005 Nordic ID Oy HF series System Developer Guide v 1 0 43 2 Nordic ID RF series NORDICID 12 3 Format of connList txt 12 3 1 Serial Port Connection Open the serial port connection for the RF600 base station Only one serial port connection at the time is possible COM port number gt Example COM 1 Opens COM1 12 3 2 Start server Listen client TCP IP connections to the specific port SERVER port to listen Example SERVER 1200 12 3 3 Client connection Create TCP IP connection to the specific address and port CLIENT tcp ip addr or name port Example CLIENT 194 100 186 39 10101 CLIENT DemoPC 7001 2005 Nordic ID Oy HF series System Developer Guide v 1 0 44 2 Nordic ID RF series NORDICID 12 3 4 HOST application connections Create connection to the remote host The remote host must be in TCP IP server mode for listening incoming connections to the specific port HOST lt tcp ip addr or name port lt App name gt NOTE App name must be same than specified in appList txt APPLICATIONS section Example HOST 127 0 0 1 500 PLAPP HOST DemoPC
54. en receiving data from the hand terminal Host application handles received data and sends an answer back to the hand terminal with Send method 2005 Nordic ID Oy HF series System Developer Guide v 1 0 21 2 Nordic ID RF series NORDICID 5 1 1 DataArrived event PLServer launches this event when receiving data from the hand terminal Host application handles received data and sends an answer back to the hand terminal with Send method While DataArrived event is handling hand terminal data PLServer cannot launch any other DataArrived event at this time Therefore its recommended that Host application creates a separate thread to handle hand terminal data and release DataArrived handling as fast as possible Multithread application is not necessary application gives fast response and only few hand terminals are used at same time event DataArrived long id short frameid Parameters given by PLServer id Hand terminal commID The number of form defined by the user If the frameid is 1 the data comes from the initial screen or from a function key This value is defined in Send method frameid See also Send method Note During the DataArrived event is handled any other data cannot be handled at the same event So it is highly recommended to free the DataArrived handler as quick as possible 2005 Nordic ID Oy HF series System Developer Guide v 1 0 22 2 Nordic ID RF series NORDICID
55. ent active at the time oee the using of FieldCmd method at the Forms sample source code BOOL FieldCmd long id short pos short fcmd Parameters id Hand terminal commlD number pos Position of the input filed FLD _ Bit O REMOVE Removes the field Bit 1 FLD CLEAR Clears the field from locked fields also Bit 2 Reserved fcmd Bit3 FLD LOCK Locks the field cannot be written to Bit 4 Reserved Bit5 Reserved Bit6 Reserved Bit 7 FLD ACTIVE Field is set to active Return value True Command added to the send buffer successfully False send buffer is full 6 3 2 Password style input fields It is recommended to authorise the user of the hand terminal before the access is granted to the system Below is an example form from the Forms sample application The input fields where the user inputs the user ID and the password are shown to the user as characters ee E s nm N un ee ec ee cs ee 8o xx ee a ee ee So Samt m amm uam Enti m PDA Co miami m D P m D m i01 2 34 5 6 7 8 901 2 34 56 7 8 9 01 23 4516 7890123456789 U User authentication 0 User authentication 20 20 40 Ner ID _____ 40 User ID xzxxx 60 Password 60 Password sxzxsxsxsxsxxs a0 80 100 lt Close gt 100 lt Close gt 120 120 140 140 2005 Nordic ID Oy RF series System Developer Guide v 1 0 33 2 Nordic ID RF series NORDICID The backend software handles the content of the input fields as normally SpecialCmd method is used to set max 3
56. es NORDICID 14 6 Receiver mode 14 6 1 Receiver This command makes the hand terminal to listen transmissions continuously The RECEIVER function can be set ON OFF by keyboard as well SHIFT F1 After a hand terminal has received the message and the HOST has sent it independently and when RECEIVER is ON the hand terminal answers to the HOST by RECEIVER_ACK command 1Ch In practice the commands to the hand terminal are PopMessages or Bells Sending other commands can disturb the already existing works in the hand terminals This is not however prevented so the HOST application has a responsibility for sending the commands When the RECEIVER is ON PopMessages will be acknowledged as read by a DEL key This prevents the accidentally key press before reading the PopMessage PLServer is not able to know if the RECEIVER is switched ON OFF by the user in the hand terminal Note WaitSerial and What methods cannot be used same time with this method Note Problem of this method is higher battery consumption and possibility of data loss Also host application developing might be quite complicate Consider to use What method instead of Receive method 2005 Nordic ID Oy RF series System Developer Guide v 1 0 81 9 Nordic ID RF series NORDICID BOOL Receiver long id short mode Parameters id Hand terminal commID number mode 0 HECEIVER mode OFF Receiver cycle of listening messages from the HOST Radio
57. he data into an SSM_ DATA command and sends it to the host L Number of bytes in the DATA part If the attached device tries to send a string that is longer than the maximum frame size about 250 bytes it is split to two or more frames When the SSM base station has sent a frame to the host it waits for an acknowledgement It is the host program s responsibility to send this acknowledgement unlike the SSM base station the host base station will not 1F SSM_DATA EE 1Fh L DATA automatically send an acknowledgement An empty frame serves as an acknowledgement for the SSM base station ie a frame that has length 0 and no data part SOH 0 PREFIX_A ID_H ID_L CRC H CRC_L If the SSM base station receives no acknowledgement it will resend the frame The host program should use the message number field in the message prefix A byte to distinguish between new frames and possible superfluous resends 2 L Data from serial port of the hand terminal 11 SERIAL_DATA When HOST has defined WAIT_SERIAL command and delay parameter is 255 2005 Nordic ID Oy RF series System Developer Guide v 1 0 109 hand terminal sends serial port data directly to the HOST with this command 11h L DATA L Length of DATA DATA data from serial port Note The hand terminal requires response 2 Nordic ID RF series NORDICID 16 APPENDIX C RF600 SSM mode protocol 16 1 Purpose of this document
58. he form and then application can determine the actions of data Upto 65535 different form ID s can be defined The FORMID value is stored in the Hand Terminal memory The Hand Terminal sends this value everytime to the HOST If FORMID is defined to 0 or Hand Terminal is resetted then Hand Terminal does not send FORMID value to the HOST 2005 Nordic ID Oy HF series System Developer Guide v 1 0 104 2 Nordic ID RF series NORDICID Syntax 1D FID_HI FID_LO FID_HI High byte of form ID FID LO Low byte of form ID FORM ID is not sent by hand terminal if e FORM ID is not defined e FID HI O0and FID LO 0 e Hand Terminal is resetted 15 1 23 SPC CMD Description SPC_CMD defines special functionalities to the hand terminal Syntax OA FUNC D1 D2 D3 FUNC If this bit is set the hand terminal will emulate the one key press The key is defined in parameter D1 Example OA 01 06 O 0 BAR emulates a BAR button press If this bit is set the hand terminal sends keystrokes directly to the HOST The HOST application can define the keys with parameter D1 D3 that sends the keystrokes to the HOST Example UP and DOWN keys will send keystokes to the HOST hex values oA 02 0 6 0 This function is valid as long as user resets the device or HOST send SPC_CMD where Bit 1 is not set When the user presses the key which is defined to send keystroke the hand terminal sends SPC_MSG to the HOST 0A 01 KEYS
59. ialServer method This function returns the device ID Example Creating TCP IP connection to receive GPS data The PLServer RawDataArrived event with parameters connID received data and data length is triggered when data is sent by the third party hardware SendRawData method can be used to sent raw data to third party device 2005 Nordic ID Oy RF series System Developer Guide v 1 0 41 2 Nordic ID RF series NORDICID 12 RF6xx Application Router The RF6xx Application Router is a Windows application which handles several functions that system integrator doesn t have to implement in the host application It helps system developers who don t want to use PLServer in their business application Usually it is quite hard programming job for the non PLServer developer to implement roaming resend handling CRC checking and other functionalities that RF6xxAppRouter PLServer already has RF 6xx Application Router In some cases there is need to use several separate host applications but still use same base stations The user of the hand terminal can select host application from the menu The Application Router and the remote host applications are connected together by using a TCP IP connection 17 ae YOO aD 2005 Nordic ID Oy RF series System Developer Guide v 1 0 42 2 Nordic ID RF series NORDICID 12 1 The RF6xx Application Router features e Handling the base stations and the remote host conn
60. ication this method can be called in handle of DataArrived event FORM ID is not sent by the Hand Terminal if e FORM ID is defined to 0 e Hand Terminal is resettled short GetFormID long id Parameters id Hand terminal commlD number formiD User defined value 0 65535 0 not used Return value The number of the form defined by SetFormID method See also SetformID 14 3 8 What The hand terminal sends WHAT command 18h to HOST every time between specified delay seconds BOOL What long id short delay Parameters id Hand terminal commlD number dela 0 99 seconds y If DELAY is 0 The hand terminal stops sending WHAT commands Return value True Command added to the send buffer successfully False send buffer is full See also What event 2005 Nordic ID Oy HF series System Developer Guide v 1 0 T1 2 Nordic ID RF series NORDICID What functionality HS Hand Set When the host gives WHAT command to the HS HS will send What code every time between specified time For example host command What 5 set HS to send WHAT code between 5 second What event fires in PLServer every time When Host gives What 0 then HS will stop sending what code Hand terminal behavior when WHAT code is sent Hand terminal waits answer from host after WHAT code is sent Wait time is same as Reception time limit parameter Default 1 sec If no answer from host within
61. ill be displayed in the active input field Exception to this rule is the NewFieldEx methods READER DEFAULT feature By using this feature it is possible to display characters to the non active input field The input fields can be defined so that it can not be filled with the barcode reader 6 1 Creating an input field Input fields to the form are created with NewField and NewFieldEx methods The behavior of the input field can be set in the parameters of these methods 2005 Nordic ID Oy HF series System Developer Guide v 1 0 28 2 Nordic ID RF series NORDICID BOOL NewField long id short pos short field_len short style Parameters id Hand terminal commlD number pos Start position of the input field O 239 field len Field length style otyle bits of the input field Bit O Field is sent to HOST by pressing the OK key Field is not sent if the SND ALL command Bit 1 NO SEND occurs Field will be sent if the field itself gave the SND ALL command All fields in the page except NO_SEND fields are a sent to the host when the OK key is pressed Ba Field is locked Field cannot be written to used for button style fields Bit 4 Field is underlined BIS he can be filled with laser or external scanner Bit 6 Field is cleared if ACK is received Bit 7 FLD_ACTIVE Field is active it has a cursor SND ENTER and FLD READER combinations SND ENTER FUNCTION 0 Field is not sent by pressing the OK key
62. inals Serial settings are fixed to 19200 n 8 1 BOOL BinaryToSerial long id short FAR buffer short length Parameters id Hand terminal commlD number buffer Binary data values 0 255 length Length of the data in bytes Return value True Command added to the send buffer successfully False Send buffer is full See also WaitSerial DataToSerial GetSerialData 14 7 3 WaitSerial Open the serial port of the hand terminal for specific time This command can be used to receive data from the external device such as card reader Serial port of the hand terminal cannot be open all the time because current consumption then is higher Any data from the serial port goes directly to the active input field of the hand terminal It depends on the style bits of the input field whether the data is sent to the HOST or not after reading from the serial port If delay value is 255 then the hand terminal sends serial port data directly to the HOST The HOST can read data with GetSerialData method By default the hand terminal keeps serial port open 30 seconds after receiving this command where delay value is 255 Serial settings are fixed to 19200 n 8 1 2005 Nordic ID Oy HF series System Developer Guide v 1 0 85 9 Nordic ID RF series NORDICID BOOL WaitSerial long id int delay Parameters id Hand terminal commID number dela time to keep serial port open 1 99 seconds y 255 Data goes directly to the
63. indows system directory If any of the DLLs are already present on the user s machine the setup program should compare their versions with the versions you are installing Reinstall a file only if its version number is higher than the file already installed Before PLServer can be used it must be register to Windows registration database You may want your setup program to register the PLServer when it is installed RegSvr32 exe can be used to register PL Server ocx PLServer uses Microsoft Foundation Classes MFC version 7 1 2005 Nordic ID Oy HF series System Developer Guide v 1 0 93 2 Nordic ID RF series NORDICID 15 APPENDIX B RF6xx Communication protocol 15 1 Message Frame Structure The communication between the RF6xx hand terminal and the HOST unit uses following message structure Direction Hand terminal to HOST Direction HOST to hand terminal Start Of Header ASCII 01H LENGTH The number of bytes in the DATA field bito 1 indicates that the message is repeated by a repeater bit1 0 indicates the message direction RF600 gt Host 1 indicates the message direction Host gt RF600 bit2 O RECEIVER ON 1 RECEIVER OFF direction PREFIX A RF600 gt Host bit3 O Normal msg transaction has started from the hand terminal 1 HOST has sent message independently direction HOS T gt RF600 bit 4 7 RSSI level This value indicates the field strength of the sig
64. ing any key from the hand terminal 0O A O N Hello World 2005 Nordic ID Oy RF series System Developer Guide v 1 0 19 2 Nordic ID RF series NORDICID Possible reasons for failure No batteries in the hand terminal No serial cable connected between the base station and the PC COM port No power in the base station The Base station and the hand terminal are in different channel The base station has been connected to wrong COM port The COM port is already used by another device Create file error in PLServer screen 4 My first host application Follow instructions in this chapter to create Hello World type application with Visual C 4 1 Creating Hello World Visual C project otart Visual Studio NET 2003 Select from File menu New Project Select project type as MFC and template MFC application Set Name and Location and press OK MFC application wizard starts Set application type Dialog based Press Finnish button Open Main dialog from the Resource view Right mouse click over dialog and select Insert ActiveX control Select PLServer control from the list 10 Place PLServer control to proper place in to the dialog 11 Right mouse click over PLServer and select Add variable 12 oet PLServer control variable like m pl 13 Right mouse click over PLServer and select Add Event Handler 14 At Event handler wizard select DataArrived 15 Goto edit DataArrived handler and
65. input fields to Password style input fields See at the Forms sample source code and at definition of SpecialCmd method how to create Password style input fields Note Input fields are created normally with the NewField or NewFieldEx methods and after that they are set to Password style input fields by using the SpecialCmd method 7 PopMessage The PopMessage method is used to send informative text to the hand terminal screen without destroying the Ul elements on the form All Ul elements on the hand terminal screen are hidden when the PopMessage is displayed The PopMessage disappears by pressing any key of the keyboard and the previous Ul elements appears on the display PopMessage is an efficient way to inform the user in various situations e g if the user input is not in the allowed range BOOL PopMessage long id short pos LPCTSTR txt Parameters id Hand terminal commlD number 00S Start position of the button O 79 txt Text for the screen May include VT and CR characters Return value True Command added to the send buffer successfully False Send buffer is full 2005 Nordic ID Oy HF series System Developer Guide v 1 0 34 2 Nordic ID RF series NORDICID 8 Sounds The backend software can use Bell and Beep methods to play sound on a hand terminal Most common situations where sounds are used is to signal a warning or a failure to the user It is recommended that PopMessage is used i
66. ion is not so confidential that data encryption is really needed The encryption of data is recommended if data includes pin codes or social security numbers The RF600 devices are operated with 434MHz radio The radiolink encryption is not very complicated but it takes a lot of technical and special knowledge to decode it The RF600 hand terminals include a data encryption feature The data is encrypted by using a 24 bit encryption key The same encryption key has to be entered in both hand terminal and the base station in order them to get work together By default the data scrambling feature is disabled but if needed it can be enabled with the RF600 configuration software Piccopla The RF650 Bluetooth radio is secure enough to transfer confidential data 2 2 Checklist for good quality backend software developing Keep response times as fast as possible Ignore the requests from unidentified hand terminals Always answer to requests except those from the unidentified hand terminals Validate the data from the hand terminal and responce to that Develop application as multithread type Do not resend the Ul control if the hand terminal has it already Use a different radio channel than in adjacent companies e Do not overrun the send buffer The maximum size of transmitted data to the hand terminal is 255 bytes If the send buffer is full the PLServer Ul elements creation functions return FALSE The RF6XX protocol
67. is 1 sec on and 2 sec off to save battery power RECEIVER ACK 1 is sent to the HOST after receiving message When sending messages with SendMessage method then parameter resendTimes should be O Heceiver cycle of listening messages from the HOST Radio is 2 sec on and 1 sec off to save battery power RECEIVER 2 ACK is not sent to the HOST after receiving message When sending messages with SendMessage method then parameter esend Times should be C Listening Continuously messages from HOST RECEIVER ACK is sent to the HOST after receiving message When sending messages with SendMessage method then parameter esendTimes should be gt C Listening Continuously messages from HOST RECEIVER A ACK is not sent to the HOST after receiving message When sending messages with SendMessage method then parameter esend Times should be 0 Return value True Command added to the send buffer successfully False Send buffer is full See also What IsReceiver SendMsg MessageReceiverNotFound event 14 6 2 IsReceiver Determines if RECEIVER mode is ON or OFF in the hand terminal BOOL IsReceiver long id Parameter IC Hand terminal commlD number True Receiver mode has been set on the hand terminal False Not Receiver mode set ee also Receiver SendMso MessageReceiverNotFound 2005 Nordic ID Oy HF series System Developer Guide v 1 0 82 2 Nordic ID RF series NORDICID 14 6 3 SendMsg Similar to Send meth
68. ith a laser scanner 1 0 Field is sent by pressing the OK key but cannot be filled with a laser scanner 1 1 Field is sent by pressing the OK key or by reading with a laser scanner A maximum of 20 input fields can be defined for one form 2005 Nordic ID Oy HF series System Developer Guide v 1 0 98 2 Nordic ID RF series NORDICID 15 1 9 NEW_FIELD_EX Description Defines a new Input field 4 bytes Syntax 1Bh POS L STYLE POS Starting point of the field 0 239 L Field length 1 63 STYLE Field functions STYLE bits can be set or cleared to enable or disable the function BitO SND ENTER Field is sent to HOST by pressing the OK key Bit1 NO SEND Field is not sent if the SND ALL command occurs Field will be sent If the field itself gave the SND ALL command All fields in the page except NO SEND fields are sent to the host when the OK key is pressed Bit 3 Reserved Reserved Overwrite mode When OVR is set and the field becomes active the cursor moves to the starting position of the field When the cursor is in the starting position the previous text will be overwritten by typing Bit5 FLD READER Field can be filled with laser or external scanner data If another field is active and it has not FLD READER set laser READER scanner is activated and data goes to this field automatically Only DEFAULT one READER DEFAULT field can be defined per form This bit has no effect if FLD READER bit is no
69. ld handles DataArrived event is launched Note that this event is launched only if SetNotify TRUE is called Note For the integrity of the backend system it is recommended to use only DataArriver event for data handling Parameters given by PLServer id Hand terminal commID The number of form defined by the user If the frameid is 1 frameid the data comes from the initial screen or from a function key alue is defined in Send methoc Pos Position of the input field 0 239 data Text string from the input field data len Length of the string in bytes See also SetNotify event DataArrived 2005 Nordic ID Oy HF series System Developer Guide v 1 0 74 2 Nordic ID RF series NORDICID 14 3 13 SetNotify SetNotify allows DataFromHsField event to launch when hand terminal sends an input field data void SetNotify BOOL bNewValue Parameters bNewValue TRUE allows DataFromHsField to launch See also event DataFromHsField 14 4 Sound methods 14 4 1 Bell Generates a single beep When hand terminal receives message from host it will beep as default Adding Bell method will give extra beep BOOL Bell long id Parameters id Hand terminal commlD number Seealso Beep MEM Return value True Command added to the send buffer successfully False Send buffer is full 2005 Nordic ID Oy HF series System Developer Guide v 1 0 T9 2 Nordic ID RF series NORDICI
70. lds osse 28 6 1 Creating an input field 28 6 2 Input field reading to the application RR 31 6 2 1 The validation of the input field contents 31 6 3 Sending the text to the input field ccc ooooocccccccccceccceccececeeeeecettttteeeesee 32 6 3 1 Modifying the existing input field sss ee 32 6 3 2 Password style input fields RR ees 33 7 PopMessage cca 34 8 Sounds 1 1 1 eeeeeeeeeeeee eee rre rr rd 35 9 Sending a message to hand terminal sss 35 9 1 Application example sss eemneneee re ns 35 9 1 1 What method esRRRRRH em meme e eene nennen eene 36 9 1 2 lj 36 9 1 3 Hand terminal behavior when What is Seb me 36 9 1 4 Using What method instead of Receiver method see 37 2005 Nordic ID Oy RF series System Developer Guide v 1 0 4 2 Nordic ID RF series NORDICID 10 Base Station connections osse 37 10 1 Serial port connection sssssssssssseeemeeeeeeeeeeeere eene eren 38 10 2 Connecting several base stations 39 10 2 1 BIONIE RINMEEEMD 39 10 2 2 eis d he AV OEO 41 11 Receiving and Transmitting RAW data 41 12 RF6xx Application Router 42 12 1 The RF6xx Application Router features 43 12 2 System operation teneret rsen eene 43 12 3 Format of connList txt ss
71. low bits Bit 2 tae Bit 3 FAM Bit 4 SB Bit 5 BAR Bit 6 EL Bit 7 DOT 2005 Nordic ID Oy RF series System Developer Guide v 1 0 O NORDICID Password style input fields Positions of thepassword input fields Og defined Password input X field position Oxff not defined 65 fer ceo Lo DI ni aT 1 18 5 O NORDICID Bit 8 MINUS 9 Bit 9 UP 1tQ Second Bit 10 DOWN 11 Password Bit 11 OK 2 j input field Bit 12 O0 13 position Bit 13 0 104 Oxff Bit 14 0 205 Bit 15 8309 Biti CT Bit 17 0 J Bit 18 6 9 Password Bit 19 7O input field Bit20 80 position Bt2t 992 Bit 22 dK defined Bit23 Bt24 x Bt25 x Bt26 o o x Bt27 x Bt28 x Bit29 Bt30 x Bt31 x xcmtued TT Return value True Command added to the send buffer successfull False Send buffer is full See also GetSpecialData 2005 Nordic ID Oy HF series System Developer Guide v 1 0 66 2 Nordic ID RF series NORDICID 14 2 8 GetSpecialData This method reads special data sent by the hand terminal short GetSpecialData long id short type Parameters id Hand terminal commlD number tvpe Type of the special data Return value Value 0 255 from the hand
72. ly and when RECEIVER is ON the hand terminal answers to the HOST by RECEIVER_ACK command 1Ch In practise the commands to the hand terminal are PopMessages or Bells Sending other commands can disturb the already existing works in the hand terminals This is not however prevented so the HOST application has a responsibility for sending the commands When the RECEIVER is ON PopMessages will be acknowledged as read by a DEL key This prevents the accidentally key press before reading the PopMessage Syntax 1Ch mode mode 0O RECEIVER mode OFF Receiver cycle of listening messages from the HOST Radio is 1 sec on and 2 sec off to save battery power RECEIVER ACK is sent to the HOST after receiving message Heceiver cycle of listening messages from the HOST Radio is 2 sec on and 1 sec 2 offto save battery power RECEIVER ACK is not sent to the HOST after receiving message Listening Continuously messages from HOST RECEIVER ACK is sent to the HOST after receiving message Listening Continuously messages from HOST RECEIVER ACK is not sent to the HOST after receiving message 1 Note WAIT SERIAL command cannot be used same time with this command 15 1 22 FORM ID Description This command defines a specific ID number which describes the form This command is useful if the HOST application uses several different forms on the hand terminal After the data has sent from the hand terminal the HOST application receives the ID number of t
73. menu will be opened 12 4 4 Main menu header text MAIN MENU HEADER Header string This string will be displayed in the main menu form as a header text Max 20 char Example MAIN_MENU_HEADER RF600 Demos 2005 Nordic ID Oy RF series System Developer Guide v 1 0 46 2 Nordic ID RF series NORDICID 12 4 5 Host down notification text HOST_DOWN_TEXT lt Host down text gt Host down text will be displayed as a PopMessage in the hand terminal screen when connection to the specific host has been lost Example HOST DOWN TEXT Host down Try again later 13 Host application samples on the CD The product manual CD contains the demo applications with source codes The applications demonstrate different functionalities of the PLServer The examples are made with VB6 0 VC 6 0 VB NET 2003 or VC 2003 The source codes with working solutions are offered to study for the application developer Most of the applications offer three alternatives for connecting to the base station StatServer COM4 x Port Sena Server Connection TCPAP addes SS Post Connect Choose e Serial Connection if the base station is connected to the COM port of the PC e StartServer if the base station is connected to the DeviceServer that is configured to client mode Type the port number and press StartServer button There has to be TCP IP address and port of the PLServer computer configured in the Devi
74. minals increase the backend software has to be able to handle them all The hand terminal users may simultaneously send data to the backend software 2005 Nordic ID Oy RF series System Developer Guide v 1 0 14 2 Nordic ID RF series NORDICID 2 4 1 Single thread application The single thread application the messages are handled in a queue If the handling of the message takes seconds all other hand terminals are not able to receive any information from the backend software at the time The single threaded application can be used in the system where the hand terminals are not at very intensive use Fast data handling can prevent the delays in hand terminal Recening HS data Mess agehanding Arewering to HS 2 4 2 Multi threaded application In the multi threaded application the messages are handled simultaneously at separate processes The response is sent after the message is handled regardless the other processes states The multithreaded application is recommended to use if there are several hand terminals in the system and the use of them is intensive Visual Basic does not offer appropriate tools for multithreaded applications All multithreaded Receiving HS data HS 3 Data HS 1 Data Ei Message handling Message handling Message handling 2005 Nordic ID Oy RF series System Developer Guide v 1 0 15 2 Nordic ID RF series NORDICID examples in this document are made with
75. n parallel with sounds for detailed info The Bell method is used to create a short sound With the Beep method it is able to play a short sequence of sounds with different pitch and duration 9 Sending a message to hand terminal The hand terminal is not able to receive data from the backend software if the user of the hand terminal hasn t started a transaction This feature saves the battery Usually the transaction begins with pressing the OK or F keys The radio of the hand terminal stays on until the response from the backend software However it is possible to set the hand terminal so that in the defined time intervals it keeps asking if the backend software wants to send data to the hand terminal 9 1 Application example The hand terminals are used in the store warehouse environment The clerk in the store counts the items in the shelves and sends an order to the warehouse if needed The clerk scans the barcode from the item inputs a quantity and sends an order to the backend software The hand terminal in the warehouse is configured to ask data from the backend software So next time the hand terminal in the warehouse asks the data from the application by using the WHAT command the backend software relays the order to the hand terminal The hand terminal receives the order and signals the user with a beeping sound to notify of an incoming request In the display 2005 Nordic ID Oy HF series System Developer Guide v 1
76. nal received at the Base Station Hand terminal gt gt Host only bit 0 3 Message number 0 15 This is incremented by 1 after PREFIX_B a successful transaction bit 4 6 Battery Level since version 4 0 bit 7 Reserved H High byte of the Hand terminal serial number Low byte of the Hand terminal serial number Extra ID A byte that can be set by the user DATA This field includes the actual data and the commands ASCII om U U o cocci ved IO Lic CO alu c aliu LI n n CRC H High byte of the Checksum CRC L Low byte of the Checksum 2005 Nordic ID Oy HF series System Developer Guide v 1 0 94 2 Nordic ID RF series NORDICID 15 1 1 Calculating CRC The 16 bit CRC CCITT Checksum is calculated from ID_H to the last databyte See C source example function as follows unsigned short crc crc 0 calc crc ID_H j calc crc ID L calc crc last databyte gt CRC H unsigned char crc 8 CRC L unsigned char crc void calc crc unsigned char character unsigned short crc tmp crc tmp crc character amp OxOF crc crc gt gt 4 crc tmp 4225 crc tmp crc character gt gt 4 amp OxOF crc crc gt gt 4 crc tmp 4225 j 15 1 2 Hand terminal Display The RF600 Hand terminal has a virtual display page of 12 x 20 characters The actual display size is 8 x 20 characters so that only one third of the virtual page can be viewed at one time
77. nctionality of the base station type DO5BS 2 allows for asynchronous transfer of arbitrary data wirelessly between the host and the any device which is provided with the RS232 serial interface 2005 Nordic ID Oy HF series System Developer Guide v 1 0 88 2 Nordic ID RF series NORDICID 14 10 1 SendSSMData This method will send data to SSM mode base station and waits acknowledgement from the SSM base station Function wait acks from SSM 250 retries milliseconds The function returns when data ack received from SSM or the 250 retries milliseconds interval elapses 2005 Nordic ID Oy RF series System Developer Guide v 1 0 89 2 Nordic ID RF series NORDICID BOOL SendSSMData long ssmID short msgNum short FAR data short length short retrie Parameters ssmID SSM base station ID number msgNum SSM device requires different message numbers for each data SSM device passes data to it s serialport only if msgNumber data data to TE SSM base station Allows byte values from 0 255 length length of data buffer in bytes retries if no ack from SSM within 250 ms then resend is made max Return value TRUE Data is sent to the SSM base station successfully FALSE No acknowledgement from SSM base station See also WaitSSMData sendSSMAck event DataFromSSM SendSSMASCIIData 14 10 2 SendSSMASCIIData This method works same as SendSSMData except data is in string format It sends string to SSM m
78. ned by ConnectToSerialServer method See also ConnectToSerialServer SerialServerMessage event 2005 Nordic ID Oy HF series System Developer Guide v 1 0 58 9 Nordic ID RF series NORDICID 14 1 6 GetSerialSvrStatus Return current status of the connection short GetSerialSvrStatus short connlD Parameters connID oession number returned by ConnectToSerialServer method Return value 0 Not in use 1 Trying connect 2 Connected See also ConnectToSerialServer SerialServerMessage event 14 1 7 SerialServerMessage event PLServer launches SerialServerMessage event which includes text information about the specific session PLServer uses Windows sockets and therefore msg might contain error codes of windows sockets See Appendix C of Windows socket error codes event SerialServerMessage short ss id LPCTSTR mso Parameters given by PLServer Session number of the connection Returned by ConnectToSerialServer method msg String buffer which contains the text description about the message Return value gt Return value indicates the session number If 1 All 255 servers has been used See also ConnectToSerialServer DisconnectSerialServer ss id 2005 Nordic ID Oy HF series System Developer Guide v 1 0 59 2 Nordic ID RF series NORDICID 14 2 User Interface elements 14 2 1 Text and TextEx Define a text string to specific position in to the hand terminal scr
79. ng The backend software can press the button in the hand terminal By using the SpecialCmd method it is able to define the key which is pressed immediately after the hand terminal has received response from the backend software The example application is meant for user to read barcodes continuously and quick When the application receives the code it immediately sends command which activates the barcode reader again The user doesn t need to press scan key to activate scanner The READER_DEFAULT flag of the NewFieldEx method allows activating the barcode scanner even if the input field is not active E g if the Start button in the application is active the reader activates with the scan key 2005 Nordic ID Oy RF series System Developer Guide v 1 0 48 2 Nordic ID RF series NORDICID After the hand terminal has read the barcode it is sent to the application The application reply activates the barcode scanner without a user entry If the barcode scanner is held in front of the barcode it is read continuously until the barcode is removed or the user presses any key The number of successful scans is also displayed Note If more than one hand terminal is using the same form simultaneously the displayed number is sum of the all hand terminals scans 13 1 3 User authorization form This form is example of input fields that are defined with SpecialCmd method The characters of the password are displayed as
80. nother RF system is being used in the same rf channel In this case there is possibility that the user interface of the other backend systems is displayed in the hand terminal screen To avoid this situation follow the instruction below 1 Always use different channel than the other system uses The co operation with the other systems operator has to be made so that there are no same channels used in both systems Also it is strongly recommended that the consecutive channels are not used 2 Do not set the backend software so that it can communicate with the unauthorized hand terminals The backend system has to keep a log of the hand terminals commlD which have right to access the system If the unauthorized hand terminal is trying to communicate with the server the queries has to be rejected and NO information to the hand held has to be transmited In the backend system the DataArrived event at the PLServer event handler should always first authorize the hand terminal before the requests are transmitted any further 3 Even if the hand terminal is authorized User login and password authorization scheme has to be used to confirm that the user of the hand terminal has access to the backend software 2005 Nordic ID Oy HF series System Developer Guide v 1 0 12 2 Nordic ID RF series NORDICID 2 1 1 Radio link security The system developer has to estimate the importance of the secured radio pathway Often the transferred informat
81. nput fields can be defined for one form BOOL NewFieldEx long id short pos short field len short style Parameters id Hand terminal commlD number pos otart position of the input field O 239 field len Field length style Style bits of the input field Bit 0 SND ENTER pes is sent to HOST by pressing the OK Field is not sent if the SND ALL command Bit 1 NO SEND occurs Field will be sent if the field itself gave the SND ALL command All fields in the page except NO SEND Bit 2 SND ALL fields are sent to the host when the OK key is pressed Bit 3 Reserved Reserved set as 0 Overwrite mode When OVR is set and the field becomes active the cursor moves Bit 4 OVR to the starting position of the field When the cursor is in the starting position the previous text will be overwritten by typing Field can be filled with laser or external scanner data If another field is active and it has not FLD READER set laser scanner is activated l and data goes to this field automaticall Bit 6 READER DEFAULT Only one READER DEFAULT field can be defined per form This bit has no effect if FLD READER bit is not set Bit 5 FLD READER Bit 7 FLD ACTIVE Field is active it has a cursor SND ENTER and FLD READER SUAE SND ENTER FLD READER FUNC Field i is not sent by pressing the OK key and cannot be read with a laser scanner Field is not sent by pressing the OK key but 0 1 it can be filled from the keyboard and with
82. o GetData 2005 Nordic ID Oy HF series System Developer Guide v 1 0 f 2 Nordic ID RF series NORDICID 14 5 3 GetExtralD This method returns Extra ID of the Hand Terminal Extra ID value can be defined in to the hand terminals Parameters id Hand terminal commlD number Return value Extra ID number 0 255 14 5 4 GetMessageNumber This method returns Message Number of the Hand Terminal short GetMessageNumber long id Parameters id Hand terminal commlD number Return value Message number 0 15 14 5 5 GetRSSI This method returns received signal strength of message short GetRSSI long id Parameters id Hand terminal commlD number Return value RSSI level of the last received message 70 140 2005 Nordic ID Oy HF series System Developer Guide v 1 0 78 2 Nordic ID RF series NORDICID 14 5 6 GetLastFramelD This method returns frame id from the last received message short GetLastFramelD long id Parameters id Hand terminal commlD number Return value This method returns last sended frameid Send method parameter 2 14 5 7 GetReceiveBuffer This method allows HOST application to get raw data frame sent by hand terminal short GetReceiveBuffer long id short FAR data Parameters id Hand terminal commlD number data Data frame from the hand terminal Return value Length of the data in bytes See also RF6xx communication protocol
83. od Application can sends messages to the specific hand terminal where receiver mode is ON BOOL SendMsg long receiverlD long senderlD short framelD short resendTimes Parameters receiverID Hand terminal commlD which receives the messages senderID User defined ID which describes the sender The number of form defined by the user Id framelD 1 the framelD oreviously defined framelD Defines how many ResendTimes cycles the message is sent to the hand terminal if no answer is received If the PLServer cannot get RECEIVER_ACK from the hand terminal and all the resendTimes have been used a MessageReceiverNotFound event is launched The cycle length is about 3 second For example if resendTimes is two and the hand terminal has not responded within 2 3 sec 6sec MessageReceiverNotFound event is launced Return value True Returns always True See also Receiver IsReceiver MessageReceiverNotFound resendTimes 14 6 4 WaitReceiverAck After message has been sent to the hand terminal using SendMsg application can use WaitReceiverAck method to check is hand terminal received message or not Waiting time is max 2 second This method returns immediately if ack received Receiver mode 1 or 3 must be used BOOL WaitReceiverAck long id Parameters id Hand terminal commlD number Return value True Ack received from the hand terminal False Ack not received See also SendMso MessageReceiverNotFound
84. ode base station and waits acknowledgement from the SSM base station Function waits ack from SSM 250 retries milliseconds The function returns when data ack received from SSM or the 250 retries milliseconds interval elapses Parameters ssmID SSM base station ID number SSM device requires different message numbers for each mean data g SSM device passes data to its serial port only if msgNumber ANOS dataString String to the SSM base station Allows byte values from 32 length length of data buffer in bytes i If no ack from SSM within 250 ms then resend is made retries Box CBS TN Return value TRUE Data is sent to the SSM base station successfully FALSE No acknowledgement from SSM base station See also WaitSSMData sendSSMAck event DataFromSSM SendSSMData 2005 Nordic ID Oy RF series System Developer Guide v 1 0 90 2 Nordic ID RF series NORDICID 14 10 3 WaitSSMData This method waits data from SSM device at specific time The function returns when data is received from SSM or the ms_waitTime interval elapses Note After receiving data from SSM host application is responsible to send acknoledgement to the SSM base station with SendSSMAck method short WaitSSMData long ssmID short FAR ssmData short msWaitTime Parameters ssmiD SSM base station ID number ssmData Data from SSM device e Time how long function waits data from the SSM device in msWaitTime i milliseconds Return value 1
85. r 60 Auto scanning o0 Password field 100 120 140 160 180 200 220 TE pp a Pmg a mgl na mp a 33m Oa pg a a HP9m sw 2005 Nordic ID Oy HF series System Developer Guide v 1 0 25 2 Nordic ID RF series NORDICID The main menu creation function void DataHandlerThread SendMainMenu Let s make sure that screen is empty from texts and fields m dlg 1r pl ClearForm id m dlg gt m_ pl TextEx id 0 Forms sample Create menu buttons m dlg m pl Button id CALCBUT POS Calculator m dlg m pl Button id AUTOSCANBUT POS uto scanning m dlg m pl Button id PASSWORDBUT POS Password field Set form id m dlg m pl SetFormID id MAIN MENU FORM Send to HS immediately m dlg m pl Send id MAIN MENU FORM Set form identification to frameid also Position defines the Button UI element displacement on the form MAIN MENU FORM is the unique ID number which is saved to the hand terminal with the SetFormlD method Following constants are found in PLConst h file Main menu constants idefine MAIN MENU FORM Hdefine CALCBUT POS define AUTOSCANBUT POS define PASSWORDBUT POS 5 2 6 Handling data from Main menu form The user of the hand terminal starts the transaction by choosing one of the input fields in the Main menu with the arrow buttons and confirms the selection with the OK key From the data received the backend software has to identify the Button pressed void Da
86. r in this document 1 2 Initial state After the batteries have been plugged in to the hand terminal initial screen appears to the display Also when no forms are used the initial screen prompts The hand terminal shows as a prompt a user writeable header and an input field This field can Nordic ID RF600 be filled with data from the keyboard or from a laser scanner Any text sent by the Host Computer will clear the screen and show the text that was sent Any user input from the keyboard or a laser scanner will clear the text and the initial screen will be displayed again 2005 Nordic ID Oy RF series System Developer Guide v 1 0 10 2 Nordic ID RF series NORDICID 1 3 Starting transaction The user starts a transaction by using the Hand terminal keyboard to make an entry or by reading a barcode The Hand terminal then sends this data to the Host Computer via the receiver device and waits for a message from the Host If it does not receive a correct check summed message within the specified time out period it will resend the original data as many times as it has been instructed By default the hand terminal sends 3 times between 1 second If no answer during that time transaction failure will be generated on the hand terminal Note When no entry is made on the Hand terminal by the user it will remain in a standby state and will not be able to receive data from the Host Computer There are some exceptions to this
87. rols the data communication between the base station and the HOST application PLServer makes HOST system software development easy because it does all the dirty work for you The use of PLServer provides a lot of functionality and code that you don t have to write or debug All you have to do is to figure out the entry points and how to use them You can use PLServer control in applications that are developed with Visual Basic Visual C Excel Access FoxPro Delphi and many more products who support ActiveX controls Note There are some undocumented methods that are not useful for software developers It is recommended to use only methods documented in this manual 14 1 Base station connection methods 14 1 1 Connect Serial port connection for the RF600 base station BOOL Connect short com port Parameters com port COM port number of the HOST PC Example Connect 1 Connect to COM 1 Connect 0 Disconnect Return value True if connected successfully False if port not exist or port is already in use 2005 Nordic ID Oy HF series System Developer Guide v 1 0 56 2 Nordic ID RF series NORDICID 14 1 2 StartServer Starts to listen client connections to the specified TCP IP port BOOL StartServer short port Parameters lt port gt Port number where Clients connects Example StartServer 1024 Starting server and allow connections to 1024 Return value True If server started
88. s already known that the only data the hand terminal can send is from that particular input field In this example GetData returns the string of the input field in position 47 E O8 pg 8 B 8 LN p py 10 2 0 8 8 0 DI FT Cree Rew Ce el Ce Ree De Bee eS Reel Creed Reed De Mod Be Reel Ds 20 40 codseHtiZsaseeeee 60 80 CString codeData If m pl IsData id 47 TRUE codeData m pl GetData id 47 codeDatazz 12345 6 2 1 The validation of the input field contents The user input to the input field can be any character in the characters set So the validation of the input data is very important The input field cannot validate the data input E g if the input has to be between 1 and 100 the backend software has to do the validation of the data If the data is not within the range the Popmessage can be sent to the hand terminal The data validation example Int value COSOLLEIDngGUbXb If m pl IsData id 47 TRUE txt m pl GetData id 47 value atoi txt 2 if value lt 1 value gt 100 Wrong range m pl PopMessage id 21 Type between 1 1007 m pl FldClear id 47 FLD CLR m pl Send id 1 return Don t go further DATA ok Continue data handling normally 2005 Nordic ID Oy RF series System Developer Guide v 1 0 31 2 Nordic ID RF series NORDICID 6 3 Sending the text to the input field The application can send text to the input field by using FldTxt method if the inp
89. scribes the form This method is useful if the HOST application uses several different forms on the hand terminal Up to 65535 different form ID s can be defined The formlD value is stored in the Hand Terminal memory The Hand Terminal sends this value every time to the HOST If formID is defined to O or Hand Terminal is resettled then Hand Terminal doesn t send formlID value to the HOST Other technique for identifying different forms is frameid which is defined in Send method DataArrived event passes frameid value to the application Advantage of using SetFormlD instead of frameid is that Function key press actions can be connected to the specific form In the HOST application this method can be called just before Send method FORM ID is not sent by the Hand Terminal if e FORM ID is defined to 0 e Hand Terminal is resettled BOOL SetFormID long id short formlD Parameters id Hand terminal commlD number formiD User defined value 0 65535 0 not used Return value True Command added to the send buffer successfully False Send buffer is full See also GetformlD 2005 Nordic ID Oy HF series System Developer Guide v 1 0 70 2 Nordic ID RF series NORDICID 14 3 7 GetFormID If form ID has been defined by SetFormID method and after the data has sent from the hand terminal the HOST application can read received form ID using this method and then application can determine the actions of data In the HOST appl
90. seRRRR e RRRRRRRRRRRRmmm ees 2 5 Drivers ee 2 5 1 eg l A RR eee rers e ener r ln eere Perdre ee d nds 2 5 2 Drivers fOr non windows environment 3 Building development environment 3 1 System requirements sse eed 3 2 Sample program installation anaa aaaea LEELEE EEEE eee 3 3 Installing hardware emm 3 4 Test your hardware eR e eee eene s 4 My first host application 4 1 Creating Hello World Visual C project eR 2005 Nordic ID Oy RF series System Developer Guide v 1 0 10 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 18 18 19 19 19 20 20 3 2 Nordic ID RF series NORDICID 5 Handling hand terminal MESSAGES sss 21 5 1 DataArrived event sse HIR eene nene n s 21 5 1 1 DataArrived OVEN cccccccccccccccccccecccccecesecceeteceseeessescvereesstessescceteisstsssesetttttstsstesertretees 22 5 1 2 Starting the data handler thread mens 23 5 2 Forms n emere ee ee nee v ep PP PP PEDE P P PR e rd 23 5 2 1 Hand terminal display area ooo aaa aa ALALE EEEE A LEELEE L EEEE E a nnan 23 5 2 2 PRTC AIO iio 0o WONO 24 5 2 3 Designing MIO Aaoi 24 5 2 4 User Interface elements RR Heeememem eeeem eee ens 24 5 2 5 EANA O O 25 5 2 6 Handling data from Main menu form sssssseRRRRRRRRRHm ees 26 5 2 7 The branching of the program sssssssssseRRemeeemeeee eene EE n nan 27 5 2 8 Clearing the Ul eeM LANS nana RR A LAEE ALLEE EELE een 28 6 Input fie
91. ssseeeeeeeeeeemenenene erstes serene ersten serrer eren cnd 91 14 10 4 wee MEEHNMT 91 14 10 5 DataFrom99M event tese err serrer sere eres n 92 14 10 6 DataFromSSMASCUII event 92 14 11 Colors of PLServer ID box 93 15 APPENDIX B RF6xx Communication protocol sess 94 15 1 Message Frame Structure eren 94 15 1 1 Calculating O n OSR 95 15 1 2 Hand terminal Display ssssssssssseeeeeeeereereeeee nennen nens 95 15 1 3 Initial Display Prompt eene enn 96 15 1 4 Text output on the Hand terminal Display 96 15 1 5 Commands HOST 2 Hand terminal sss 96 15 1 6 Order of Execution OF Commands 97 15 1 7 SET CP S S 98 15 1 8 AA i e D nennen eene eren ner eene nennt 98 15 1 9 AISA m 5 DIE C 99 15 1 10 miS DIKO DE 100 15 1 11 epope E E A seit ereeveieeeecte 100 15 1 12 siDIHLO MEN E EE E EE N EETA 100 15 1 13 SELON D OS 101 15 1 14 SIENI DTA Am aT O 101 15 1 15 SIEA I tonesoressecnen vacooeccteareraieed gue eeeeptead rete tana teeneraaseoeneatenienens 102 15 1 16 PORMA c NEEENRTEE 102 15 1 17 A ES A E E A EE EEE 102 15 1 18 s e O 102 15 1 19 DOIS TO IKS nia nn ne ne even aCe 103 15 1 20 USES moli EE 103 15 1 21 RECEIVER MN 104 2005 Nordic ID Oy RF series System Developer Guide v 1 0 8 2 Nordic ID RF series NORDICID 15 1 22 O iNY ID eee eemememememememememememememevevenvv
92. succesfully False If the server cannot be started See also otopServer 14 1 3 StopServer Disconnect all client connections This is done automatically when host application closed void StopServer 2005 Nordic ID Oy HF series System Developer Guide v 1 0 5r 2 Nordic ID RF series NORDICID 14 1 4 ConnectToSerialServer Create a network session between device server and PLServer Up to 255 server connections can be made simultaneously This method starts connection procedure and returns immediately If network adapter is not available PLServer tries to reconnect in to it automatically between 10 seconds until DisconnectSerialServer has been called or application closes short ConnectToSerialServer L PCTSTHR addr short port Parameters addr otring value of TCP IP address of the device server port Port number of the network adapter short value Example retval ConnectToSerialServer 192 168 0 1 7001 if retval 1 Cannot connect to serial server else connection succesful Save retval as a session number Return value Return value indicates the session number If 1 All 255 servers have been used See also DisconnectSerialServer SerialServerMessage event 14 1 5 DisconnectSerialServer Disconnect the network adapter session When application closes all TCP IP connections are closed automatically void DisconnectSerialServer short ss id Parameters ss id Session number retur
93. t set Bit7 FLD ACTIVE Field is active it has a cursor Bit2 SND ALL Bit4 OVR Bit 6 SND ENTER and FLD READER combinations SND ENTER FLD READER FUNCTION Field is not sent by pressing the OK key and cannot be read with a laser scanner 0 1 Field is not sent by pressing the OK key but it can be filled from the keyboard and with a laser scanner 1 0 Field is sent by pressing the OK key but cannot be filled with a laser scanner 1 1 Field is sent by pressing the OK key or by reading with a laser scanner NEW FIELD EX is same as NEW FIELD command but style bit s OVR and READER DEFAULT are replaced bit s LINE and FLD CLR Field is underlined automatically A maximum of 20 input fields can be defined for one form 2005 Nordic ID Oy HF series System Developer Guide v 1 0 99 2 Nordic ID RF series NORDICID 15 1 10 FIELD CMD Description Definition of the field function Syntax 11h POS FCMD POS Field position 0 239 FCMD Commands of the field FCMD Bit O FLD REMOVE Removes the field Bit 1 FLD_CLEAR Clears the field also locked fields Bit 2 Ki Heserved Bit 3 FLD LOCK Locks the field cannot be written to Bit 4 Lead Heserved Bit 5 oes Heserved Bit 6 aid Heserved Bit 7 FLD ACTIVE Field is set to active 15 1 11 FLD TXT Description Fills presets the field with the text 3 TXT bytes If the length of TXT is more than the length of field the excess TXT will be corrupt
94. taHandlerThread DataFromMainMenu f we know now that one of the Main menu items has been selected Let s finds out which one using IsData method if m dlg m pl IsData id CALCBUT POS SendCalculatorFormi if m dlg m pl IsData id AUTOSCANBUT POS Send utoscanningForni if m dlg m pl IsData id PASSWORDBUT POS SendPasswordFieldFormi return 2005 Nordic ID Oy HF series System Developer Guide v 1 0 26 2 Nordic ID RF series NORDICID In the transaction the contents of the ALL input fields are not necessary sent to the backend software In the Main menu example application there are 3 locked input fields where the user cannot type text with the keyboard The only thing that the user can do is to activate the input field by choosing it and pressing the OK key to send the content of the particular input field to the backend software IsData function of the PLServer can be used to check which button is pressed IsData returns TRUE if the data is from the particular input field BOOL IsData long id short pos Parameters id Hand terminal commlD number pos Position of the input field 0 239 Return value True Data coming from pos field False No data coming from pos field See also GetData 5 2 7 The branching of the program Because of the integrity of the backend software it is recommended that the creation and the data handling of the form are coded in the separate functions
95. uld also work with the HF600 base station Usually those are server type of devices which means that backend software creates the TCP IP connection to the device In some cases the device server may work as client type which mean that they make the connection to the backend software Network The backend software creates the TCP IP connection by using the PLServer method This method creates a network session between device server and PLServer Up to 255 server connections can be made simultaneously This method starts connection procedure and returns immediately If network adapter is not available PLServer tries to reconnect in to it automatically between 10 seconds until DisconnectSerialServer has been called or application closes 2005 Nordic ID Oy HF series System Developer Guide v 1 0 39 2 Nordic ID RF series NORDICID short ConnectToSerialServer L PCTSTHR addr short port Parameters addr String value of TCP IP address of the device server ort Port number of the network adapter short value Example retval ConnectToSerialServer 192 168 0 1 7001 if retval 1 Cannot connect to serial server else connection succesful Save retval as a session number Return value Return value indicates the session number If 1 All 255 servers has been used See also DisconnectSerialServer SerialServerMessage event The successful connection to the Device server is indicated with a red te
96. ut field is already created with NewField or NewFieldEx functions The input field creation function can be sent at the same time than text input method If the input field contains text it will be overwritten define POS 1 25 define LENGTH 10 Create field m pl NewFieldEx id POS 1 LENGTH SND ENTER Fill it m pl FldTxt id POS 1 1234 m pl Send id 1 RESULT f 556771879 BOOL FidTxt long id short pos LPCTSTR txt Parameters id Hand terminal commlD number 00S Position of the input field O 239 txt Text for the field Return value True Command added to the send buffer successfully False Send buffer is full 6 3 1 Modifying the existing input field The backend software can modify the parameters of the existing input field The application should be designed so that the user of the hand terminal has to make as few keystrokes as possible The FieldCmd function can activate the certain input field so that the user has no need to use the arrow keys for navigation With the FieldCmd function following commands are available Remove the input field Clear the input field Lock the input field Activate the input field 2005 Nordic ID Oy HF series System Developer Guide v 1 0 32 2 Nordic ID RF series NORDICID Note There can be only one FieldCmd command with FLD ACTIVE flag on at the transmission to the hand terminal This is because of in the form there can be only one UI elem
97. ut the entry points and how to use them Note Latest PLServer version can be downloaded from http www nordicid co 2 5 2 Drivers for non windows environment If the backend software is executed in the non windows environments UNIX Linux AS400 the driver software must be developed to the environment also see RF family communication protocol Appendix B However it is possible to create a backend system where the business logic is executed in non windows environment e g AS400 or UNIX In this case the PLServer runs in the windows based computer and communicates in a network with an actual backend system Windows workstation 2005 Nordic ID Oy HF series System Developer Guide v 1 0 17 2 Nordic ID RF series NORDICID The advantage of this procedure is that there is no need for developing drivers to the non windows operating system So the actual application developing time is faster See also Chapter RF6XX Application Router from this document This document describes the application development to the Windows OS with PLServer Activex component 3 Building development environment The RF family host programming tutorial cd includes example programs in Visual basic and Visual C All examples use the PLServer ActiveX component 3 1 System requirements System requirements for the application developing e HF family hand terminal RF600 or RF650 RF600 Base Station Bluetooth dongle RF650
98. ventory example application is made with Visual Basic 6 0 13 3 WhatTest This is a simple What method example By using the What method the hand terminal is configured to send What event in 5 second intervals The response is the content of the edit box and is sent to the input field on the hand terminals display The hand terminal enters to the sleep mode after 30 seconds of inactivity However it keeps on sending the What event as in normal mode If the Send Bell is checked at the display of the hand terminal it signals with a beep and turns on the display while on sleep 2005 Nordic ID Oy HF series System Developer Guide v 1 0 50 9 Nordic ID RF series NORDICID Note Set the What behavior to O New style at the settings menu of the hand terminal w Whatlest Nordic ID AF60 diver control w 5 0 0 Com Cornet A Come Como Comes Com Hello RFEx4 Iv Send B ell Counting V HAT s from hand terminal C Reset Total seconds AF 01233345678901234567 8 9 WhatTest is a Visual Basic 6 0 application 2005 Nordic ID Oy HF series System Developer Guide v 1 0 51 9 Nordic ID RF series NORDICID 13 4 SlideControl The Slide control application makes hand terminal to work as a remote control of the power point presentation program 7 Slide Control PIE Nordic ID AFEx0 driver control v 4 7 1 Seral Connection COM Starts erver LITT COMS
99. which will be described later 1 4 How many hand terminals can be used in same system In theory up to 65536 hand terminals can communicate with the host But in practice it depends a lot on the radio traffic In theory one transaction takes max of 300 ms on the air when using in RF600 system In the RF600 system the backend software receives circa three transactions per second depending on the backend system response time is quick enough 50ms In the RF650 system the backend software can receive 21 transactions per second if the backend system is multithreaded and the response time is quick enough lt 50ms 2005 Nordic ID Oy HF series System Developer Guide v 1 0 11 2 Nordic ID RF series NORDICID 2 Host application The backend software can be executed in which ever computer and operating system in use The RF family hand terminals are not equipment and or operating system dependent What the backend software does is simply to receive data from the hand terminal handle it and give response to terminal After the hand terminal begins the transaction by sending a data it always waits for a response from the backend software For that reason it is very important to send a response from the backend software as quick as possible The user can not operate with the hand terminal before the response Is received 2 1 Host application security Sometimes the signal of the hand terminal overlaps with the area where a
100. xt shown below The number after the Serial Servers text indicates how many PLServers are connected to the application Usually the TCP IP connections are created when the application starts up The PLServer automatically closes the connection when the application shuts down The PLServer can act like a server and wait for connections from clients When the Device server has configured to act like a client it has to be configured also to contact to the PLServer 2005 Nordic ID Oy RF series System Developer Guide v 1 0 40 2 Nordic ID RF series NORDICID 10 2 2 StartServer Starts to listen client connections to the specified TCP IP port BOOL StartServer short port Parameters lt port gt Port number where Clients connects Example StartServer 1024 Starting server and allow connections to 1024 Return value True If server started succesfully False If the server cannot be started See also StopServer Green clients text is shown in the PLServer window when the StarServer method is called The number after the Clients states the number of clients connected Nordic ID RFExXO driver control v 5 0 0 CET 11 Receiving and Transmitting RAW data PLServer contains the functions of receiving and sending raw data over the TCP IP network The raw data can be used with third party hardware e g network printer or GPS receiver First thing is to create TCP IP connection by using the ConnectToSer
101. y look like a plain text so it would be useful to add extra characters to beginning and end like lt gt or in order to separate texts and buttons Button method creates Button element to the form 2005 Nordic ID Oy HF series System Developer Guide v 1 0 24 2 Nordic ID RF series NORDICID The Ul elements are displayed on the form until one of the following events occurs User resets device batteries out and back in or keys SHIFT DEL Host sends ClearForm method Host sends ClearCmd method Set of Ul elements in the form T 1 5 x E un a Z a E a E o Tt ua T a EB a E al 01234567890123456789 Batch no 24ULaEle code APart type mmpmsmmsmm 140 e e o o o SS SS SS Se SS d 180 DONE 200 220 There is always one active Ul element on the hand terminal The user can activate the desired Ul element by pressing the arrow buttons or the active Ul element can be set from the backend software Tip There is no need to create the form if it is already at the hand terminal This action reduces the radio traffic and simplifies the backend software 5 2 5 Main menu First screen in the hand terminal is usually the main menu which is displayed after the hand terminal connects for the first time to the backend software Main menu of Forms sample application T 0111234 5161718191012134 51671819 Foras samplesxsxsx 20 AU Calculato
Download Pdf Manuals
Related Search
Related Contents
Epson 580 Printer User Manual FR Mextra Superabsorbent.indd Samsung GT-S5230N Brugervejledning Porter-Cable CLFRP350 User's Manual TE21 Mode d`emploi Model PA-420C - AutoMobility 低温・高湿度サウナから生まれる 新しい入浴スタイル Copyright © All rights reserved.
Failed to retrieve file