3 Replies Latest reply on May 13, 2015 10:45 AM by Intel_Alvarado

    Read data USB

    ricovi

      @

      Hello.

       

      I have an Intel Galileo Gen2 and I want to read a bar code with a bar code reader I bought me.

      Does anyone know how could I?

       

      I have used the USBHost librarty, with the example "KeyboardController" , but I get a keypad code. I would like to show the bar code and not a code keypad.

       

       

      This is what I get to pass a bar code whose number is 78-16262-03



      "

      Program started
      Pressed: key:8 mod:1 => L-Ctrl e
      Released: key:8 mod:0 => e
      Pressed: key:9 mod:1 => L-Ctrl f
      Released: key:9 mod:0 => f
      Pressed: key:2 mod:1 => L-Ctrl
      Released: key:2 mod:0 =>
      Pressed: key:7 mod:1 => L-Ctrl d
      Released: key:7 mod:0 => d
      Pressed: key:3 mod:1 => L-Ctrl
      Released: key:3 mod:0 =>
      Pressed: key:7 mod:1 => L-Ctrl d
      Released: key:7 mod:0 => d
      Pressed: key:3 mod:1 => L-Ctrl
      Released: key:3 mod:0 =>
      Pressed: key:11 mod:1 => L-Ctrl h
      Released: key:11 mod:0 => h
      Pressed: key:4 mod:1 => L-Ctrl a
      Released: key:4 mod:0 => a
      Pressed: key:28 mod:1 => L-Ctrl y
      Released: key:28 mod:0 => y

      "


      Thank you very much!

        • 1. Re: Read data USB
          Intel_Alvarado

          Hi,

           

          What bar code reader are you using? If you are connecting through USB then it probably behaves as a generic USB keyboard, are you able to detect it? What is the output of lsusb? What is the code you are using?

           

          Also, have you already seen Re: USB Barcode scanner? ?

           

          Sergio

          • 2. Re: Read data USB
            ricovi

            Hi!

             

            Thank you very much for your answer.

             

            I am using Datalogic Gryphon GFS440.

             

            I have created a sketch that read the code keypad, but this I think that is not correct.

            Configuration to do this is: USB-KBD "To siulate a Keyboard, scan the bar code below".

            (I can send the sketch, if you want to see).

             

            I would like to read with the mode USB-COM "To simulate a serial interface, scan the bar code below".

            This mode can be set in the barcode reader.

             

            A greeting, Ricardo.

            Thank you!

            • 3. Re: Read data USB
              Intel_Alvarado

              Hi,

               

              What do you think is not correct? Is there an error with a library or is the code running but not displaying the correct values?

              Yes, please attach the code.

               

              Sergio