9 Replies Latest reply on Jun 20, 2013 9:27 AM by Adam Henrickson

    Comm on CE Device

    Adam Henrickson

      I'm trying to use a scanner connected via serial on a Windows CE tablet.  I looked at the API and tried to even just get the sample code to work but I can't get the scanner to initialize.  If I use a wedge app the scanner will work but the data doesn't populate into the Rho app.  I've also built the app as a Win32 app and installed on a PC with the same results.  I've tried both Rho 2.2 and Rho 4 beta with no luck.  What am I missing? 

        • Re: Comm on CE Device
          Kutir Mobility

          Can you post the code you are using and the error message you are receiving?

           

          Thanks

          Javier

          Kutir Mobility

            • Re: Comm on CE Device
              Adam Henrickson

              Just trying to use the sample off of the API page just to verify it works before actually developing an app.  Here is the code I used:

               

              <HTML>

                 <HEAD>

                 <!-- Setup the port -->

                 <META HTTP-Equiv="Comm" Content="Port:COM1">

                 <META HTTP-Equiv="Comm" Content="BaudRate:9600">

                 <META HTTP-Equiv="Comm" Content="DataBits:8">

                 <META HTTP-Equiv="Comm" Content="StopBits:1">

                 <META HTTP-Equiv="Comm" Content="Parity:'No Parity'">

                 <META HTTP-Equiv="Comm" Content="HandShake:None">

                 <META HTTP-Equiv="Comm" Content="Time:250">

                 <META HTTP-Equiv="Comm" Content="CommEvent:url('JavaScript:ProcessData('%s');')">

                 <META HTTP-Equiv="Comm" Content="Open">

               

                 <!-- Function called when data received from the port -->

                 <SCRIPT TYPE="text/javascript">

                    function ProcessData(data)

                    {

                       alert(data);

                    }

                 </SCRIPT>

                 </HEAD>

               

                 <BODY>

                 <!-- Your page goes here -->

                 </BODY>

              </HTML>

                • Re: Comm on CE Device
                  Glenn Sayer

                  The Comm command is only valid on Motorola devices.  Windows CE tablet sounds like a non Moto device.

                    • Re: Comm on CE Device
                      Adam Henrickson

                      Glenn,

                       

                      Can you give me an idea of a model it would work on?  I was trying a VC5090 running CE5 which didn't work and will be getting a VC70 early next week which I was told runs CE7. 

                        • Re: Comm on CE Device
                          Glenn Sayer

                          it should work on all of these devices.

                           

                          have you tried connectin the scanner to your pc via Hyperterm and see if it connect this way?  first validate that the scanner is working with the above com settings.

                           

                          when you run the code above and connect the scanner what is the error you are seeing?  what is the scanner doing?

                            • Re: Comm on CE Device
                              Adam Henrickson

                              I did get it working via Hyperterm and I'm not seeing any error.  The scanner scans but the window never pops up with the data.  Would this happen if the app isn't licensed and running in demo mode?

                                • Re: Comm on CE Device
                                  Glenn Sayer

                                  not lic is not your issue.  Odds are the event is not being fired becasue you have not met one of the three conditions "Chars", "Time" or EndChar"

                                   

                                  This event is used to read data from the COM port and is triggered in response to a port event. Port events can be one of ‘Chars’, ‘EndChar’ or ‘Time’ as described in the Parameters section. If no CommEvent is defined the associated data is output as keystrokes.

                          • Re: Comm on CE Device
                            Kutir Mobility

                            Your timeout value might be too low:

                             

                               <META HTTP-Equiv="Comm" Content="Time:250">

                             

                            250 milliseconds may not be enough for the scanner to read the barcode and send it to the application. Can you try increasing it to, for example, 5000, and seeing if that makes any difference?

                             

                            Thanks,

                            Javier

                            Kutir Mobility

                        • Re: Comm on CE Device
                          Adam Henrickson

                          Sorry for no responses on this but I'm caught up in several different projects right now and this was more for personal testing.  I'll update when I get a chance to try your suggestions.  Thanks.