Read data from usb port USB001

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
jairpinho
Posts: 420
Joined: Mon Jul 18, 2011 5:36 pm
Location: Rio Grande do Sul - Brasil
Contact:

Read data from usb port USB001

Post by jairpinho »

Hello, I need to disable the reading of 4 USB barcode reader by keyboard mode reading the data through the USB direct port individually
Reader 1 = USB001
Reader 2= USB002
Reader 3 = USB003
Reader 4 = USB004

With harbour is possible.
Jair Pinho
HMG ALTA REVOLUÇÃO xBASE
HMG xBASE REVOLUTION HIGH
http://www.hmgforum.com.br
User avatar
danielmaximiliano
Posts: 2611
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: Read data from usb port USB001

Post by danielmaximiliano »

Ola Jair : Generalmente los lectores de barra USB se conectan como puerto Com:x en mí caso uso uno y con una.libreria le digo que puerto quiero leer... En el otro puerto está conectado la impresora fiscal...

La librería está en C:\MiniGUI\SAMPLES\Advanced\BarTools
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
jairpinho
Posts: 420
Joined: Mon Jul 18, 2011 5:36 pm
Location: Rio Grande do Sul - Brasil
Contact:

Re: Read data from usb port USB001

Post by jairpinho »

danielmaximiliano wrote: Mon Jun 26, 2017 11:30 pm Ola Jair : Generalmente los lectores de barra USB se conectan como puerto Com:x en mí caso uso uno y con una.libreria le digo que puerto quiero leer... En el otro puerto está conectado la impresora fiscal...

La librería está en C:\MiniGUI\SAMPLES\Advanced\BarTools
ola Daniel meu leitor de codigo de barras nao cria um porta com para cada leitor este e meu problema, se o mesmo criasse uma porta para cada eu iria fazer a leitura de cada porta serial por isso preciso ler direto da porta usb, exite em harbour como criar uma porta virtual para ler a usb do leitor
Jair Pinho
HMG ALTA REVOLUÇÃO xBASE
HMG xBASE REVOLUTION HIGH
http://www.hmgforum.com.br
User avatar
danielmaximiliano
Posts: 2611
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: Read data from usb port USB001

Post by danielmaximiliano »

Ola Jair: que modelo es su lector USB ?

você já resolveu o problema de leitores de código de barras USB? Tenho apenas um teclado e Orro conexão USB, agora eu não tenho cisalhamento luz na área, como não vou tentar o meu ponto de Paea aplicações de venda para ajudá-lo com o seu problema [image][attachment=0]IMG_20170628_1145022472.png[/attachment][/image]
Attachments
IMG_20170628_1145022472.png
IMG_20170628_1145022472.png (1.54 MiB) Viewed 4978 times
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
jairpinho
Posts: 420
Joined: Mon Jul 18, 2011 5:36 pm
Location: Rio Grande do Sul - Brasil
Contact:

Re: Read data from usb port USB001

Post by jairpinho »

keyence hr100
Jair Pinho
HMG ALTA REVOLUÇÃO xBASE
HMG xBASE REVOLUTION HIGH
http://www.hmgforum.com.br
User avatar
danielmaximiliano
Posts: 2611
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: Read data from usb port USB001

Post by danielmaximiliano »

Jair Olá: Este modelo suporta 3 tipos de conexão ...

¹ usb
² RS-232
³ teclado wired "Y"

como eles compraram o leitor com o cabo USB é recomendado o uso de um adaptador USB para aplicação COM
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
edk
Posts: 909
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: Read data from usb port USB001

Post by edk »

jairpinho wrote: Mon Jun 26, 2017 9:25 pm Hello, I need to disable the reading of 4 USB barcode reader by keyboard mode reading the data through the USB direct port individually
Reader 1 = USB001
Reader 2= USB002
Reader 3 = USB003
Reader 4 = USB004

With harbour is possible.
Hi, I'm not sure if the USB barcode reader is recognized as a HID device, I do not have a reader and I have no way of checking it, but I think so.

I made a small application that can turn off and turn on HID devices. It works in the same way as in the Device Manager the "Enable/Disable Device" function.

I tested on Windows 10 only, I checked with two mouses connected to USB and it works fine.

I'm not an expert but it may be useful.
Attachments
usb_hid.7z
(967.73 KiB) Downloaded 248 times
User avatar
danielmaximiliano
Posts: 2611
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: Read data from usb port USB001

Post by danielmaximiliano »

Hello Edk : from WMI you can activate and deactivate HID components in administrator mode.
Bar readers are recognized as keyboards and need to be recognized by their Vid & Pid (vendor & product information) or load their corresponding drivers to answer your real name in the oPNP query: Execquery ()
In my case having the bar reader on a cable "Y" usb recognizes 1 keyboard but ....
HMG USB-HID.png
HMG USB-HID.png (16.88 KiB) Viewed 4821 times
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
edk
Posts: 909
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: Read data from usb port USB001

Post by edk »

Unfortunately, the Win32_PnPEntity class does not return the device name of product.
As I wrote, I'm not an expert. I was looking for solutions to read the names, but it returns me the driver manufacturer's nickname, in this case it's Microsoft.
As you wrote, you can recognize your device through VID & PID but information about product name, if I'm not mistaken, is not on OS.
In your case it will be the first device on the list: Cino FuzzyScan F760-B. Can you disable/enable this device?
To recognize product I use this site: http://www.the-sz.com/products/usbid/

There is also a downloadable utility that reads all connected USB devices and searches for the product name:
http://www.the-sz.com/products/temple/

Regards, Edward.
User avatar
jairpinho
Posts: 420
Joined: Mon Jul 18, 2011 5:36 pm
Location: Rio Grande do Sul - Brasil
Contact:

Re: Read data from usb port USB001

Post by jairpinho »

edk wrote: Thu Jul 06, 2017 1:40 pm Unfortunately, the Win32_PnPEntity class does not return the device name of product.
As I wrote, I'm not an expert. I was looking for solutions to read the names, but it returns me the driver manufacturer's nickname, in this case it's Microsoft.
As you wrote, you can recognize your device through VID & PID but information about product name, if I'm not mistaken, is not on OS.
In your case it will be the first device on the list: Cino FuzzyScan F760-B. Can you disable/enable this device?
To recognize product I use this site: http://www.the-sz.com/products/usbid/

There is also a downloadable utility that reads all connected USB devices and searches for the product name:
http://www.the-sz.com/products/temple/

Regards, Edward.

edk need to read 4 readers direct by usb with the same name because they are of the same brand, so I need to read by name, id or usb port
Jair Pinho
HMG ALTA REVOLUÇÃO xBASE
HMG xBASE REVOLUTION HIGH
http://www.hmgforum.com.br
Post Reply