11 Replies Latest reply on Jun 27, 2014 9:37 AM by livio.daneluzzi

    SCRIPT PROBLEM ABOUT RFID

    Rookie

      I’m a programmer who is working on your Wavelink Telnet CE product and I would to ask you about a problem in scripting code.

       

      My customer own some Motorola MC319Z handhelds and asked me to configure a connection to their As400 and read some RFID Tags and put the datas in a blank field of their program.

       

      I did the connection without any problem, as a 3477-FC emulator and entered in the emulation parameters to enable RFID functions, in ENABLE RFID key with Yes, in ENABLE KEY with <0x79> the F10 key in hexadecimal, in INSERT MODE with Auto-Detect, and USE TRIGGER with Yes.

       

      I tried using it and when I arrive at the right screen of the program I press F10 on the keyboard of the handheld (not the keyboard of the emulator) and RFID start to read when I push the handheld read button, passing to my screen the tags read. It works correctly!

       

      I also tried to create a script that, when reached the right screen of the program, it press automatically F10 using the code KEYPRESS_KEY <0x79> my F10 key but, it don’t works, this don’t enable the RFID reader.

       

      When I did it manually it works perfectly and I receive a message on the screen that told me the number of tags read and put the tags on the field I use, but if I try to use the script, when KEYPRESS-KEY work, it do only a beep but no one message about RFID enable and create problems about the use of the emulator keyboard.

       

      My script is a simple:

       

      Script( RFID_MAN )

      Profile( As400 )

      Activate( From_Menu )

          Keypress_Key( 0x79 )

          Return

       

      But it don’t press the F10 like I could do on the handheld keyboard. There’s something wrong in my code?

      I would to enable RFID reader by script code and after the tags read end disable it.

       

      Thanks for all and I hope you can help me as soon as possible.

       

      Cordially

        • 1. Re: SCRIPT PROBLEM ABOUT RFID
          cachilli SupportEmployee

          Hello.. in reading through your post it appears you want to use the On_key functionality.. below is a sample of the On_Key..

           

          Activate( On_Key, 0x79, None )

           

          i hope this helps..

          1 of 1 people found this helpful
          • 2. Re: SCRIPT PROBLEM ABOUT RFID
            Rookie

            Hi Cachilli...

            the problem is that I want to enable RFID from a script.

            I enabled RFID with F10 key, but if I press F10 on the keyboard of the handheld (FUNCT+F10) it works and read the tags, and if I use it in a script as a Keypress_Key(0x79), it don't works.

            I need to enable RFID from a script.

            Thanks

            • 3. Re: SCRIPT PROBLEM ABOUT RFID
              cachilli SupportEmployee

              Are you saying that you want the script automated? To fire off the RFID automatically on a certain screen?

              • 4. Re: SCRIPT PROBLEM ABOUT RFID
                Rookie

                Yes! I need to fire off or on the RFID automatically on a certain screen.

                If in the screen appears an X in a certain position I need to enable RFID. Else disable it.

                • 5. Re: SCRIPT PROBLEM ABOUT RFID
                  cachilli SupportEmployee

                  In order for a script to fire off on certain screens, you will first need to verify what on that screen is unique from the other screens.. be low is an example of a verify.. you can also use the Reformatter ,that is free with the 7.3 Telnet clients, to complete alot of this as well.

                   

                  Verify Example:

                  Activate( Screen_Update )

                      If_Not( String_Equal( Get_Screen_Text_Length( 1, 36, 7 ), "Sign On", 0, FALSE ) )

                          Return

                      End_If

                         Set_Cursor_Position( 6, 53 )

                   

                  In order to fire off the RFID reader you will need to use a custom escape sequence. Below is a link to a community article that discusses how to do this..This article will give the format needed for the script

                   

                  http://community.landesk.com/support/docs/DOC-27684

                   

                   

                  You will also you will need the enable and disable functions for the RFID, which are below..

                   

                  Example:

                  ESC $ Pe ; Pr R

                  Enable/Disable the RFID reader

                   

                  Pe=0 Disable RFID

                  Pe=1 Enable RFID

                  Pe=2 Don’t change RFID state

                   

                  Pr=0 Don’t return new state

                  Pr=1 Return new state

                   

                  If Pr=1, it returns:

                            ESC $ Pe R

                   

                  Where Pe=0 if the RFID reader is disabled, or Pe=1 if the RFID reader is enabled.

                  • 6. Re: SCRIPT PROBLEM ABOUT RFID
                    cachilli SupportEmployee

                    I should also add that RFID in some situtions does need to be tweaked a bit.. Below are some further examples of that..

                     

                     

                    RFID Attenuation (Transmit Power)

                    (Telnet 7.2.40 or later only)

                    ESC $ 1 ; Po A

                    ESC $ 0 A

                    Set the RFID attenuation (transmit power) to the desired level.

                     

                    Po = Power Level.  A value between 0 and 255, where 0 is the maximum power and 255 is the minimum power.

                     

                    Get the current RFID attenuation.

                     

                    The returned format is:

                              ESC $ 0 ; Po A

                     

                     

                    Clear RFID Tags

                    ESC $ C

                    Erase all the RFID tags stored by the RFID reader.  This will allow future scanning to return tags that have already been reported.

                     

                     

                    RFID Filter

                    ESC $ 1 ; 0 F

                    ESC $ 1 ; Pl ; Po ; Pm F

                    ESC $ 0 F

                    Clear (disable) the filter for the RFID reader.

                     

                    Set the filter for the RFID reader.

                     

                    Pl = Length (in bits) of the mask Pm.

                    Po = Starting bit offset of the filter mask.

                    Pm = Filter mask as a lower-case hexadecimal string.

                     

                    EXAMPLE:  ESC $ 1 ; 24 ; 32 ; 37d2a9 F

                                        (Sets the filter to test that the 4th – 6th bytes match

                                        37h, D2h and A9h respectively.)

                     

                    Get the current filter for the RFID reader.

                     

                    The returned format is:

                              ESC $ 0 ; Pl ; Po ; Pm F

                    if a filter is set, or

                              ESC $ 0 ; 0 F

                    if filtering is not enabled.

                    • 7. Re: SCRIPT PROBLEM ABOUT RFID
                      Rookie

                      Really I don't know how to thank you...this is the thing I need! THANKS

                      • 8. Re: SCRIPT PROBLEM ABOUT RFID
                        Rookie

                        I'm sorry Cachilli but I tried in these days and I noticed that don't works...I don't know if I'm wrong.

                        I tried a simple:

                         

                        Script( RFID_ON )

                        Activate( From_Menu )

                            Escape_Sequence( "$1" )

                            Return

                         

                        I went on mine right screen with an input field and called manually the script I created, but without success.

                        It seems to launch it, but when I push the trigger it don't read and start the laser scanner reader, not the RFID reader.

                         

                        Can you help me?

                        • 9. Re: SCRIPT PROBLEM ABOUT RFID
                          Rookie

                          Hi Cachilli, it did not work for me also, i am using TelnetCE 7.3.172 version and Motorola 919Z. The pop-up says 'Attempting to Enable RFID reader' and screen stucks there.

                           

                          It actually worked in older Motorola Handheld models 909Z models.

                           

                          Can you please help.

                           

                          Thanks.

                          • 10. Re: SCRIPT PROBLEM ABOUT RFID
                            Rookie

                            found the root cause-

                             

                            we have emulation parameter 'Enable RFID' as YES and also we have the above script that enables it when session connects.

                            so these 2 settings are overlapping eachother and failing to activate it.

                             

                            so, I put a delay of 10sec before starting the script and the problem solved.

                             

                             

                            Script( RFID_Scanner_Auto_Enable )

                            Activate( Connection )

                                Delay( 10000 )

                                Escape_Sequence( "$1;1R" )

                                Return

                            • 11. Re: SCRIPT PROBLEM ABOUT RFID
                              Rookie

                              Hi...thanks for the idea!

                              I'll try it in the next days!!!