NI Home > Community > NI Discussion Forums

Instrument Control (GPIB, Serial, VISA, IVI)

Showing results for 
Search instead for 
Do you mean 
Reply
Member
Stefano Moret
Posts: 30
0 Kudos

usb HID to serial emulation

Hi,

 

I have to connect an USB instrument to the PC in order to acquire data in LV.

My problem is that the instrument is seen from the pc as a HID keyboard, and I already have a bar code reader (another keyboard).

 

Is there any possibility of using a virtual serial port to acquire the data??

Trusted Enthusiast
Albert.Geven
Posts: 3,328

Re: usb HID to serial emulation

That completely depends on the driver delivered with your usb device.

What is it and maybe there is an alternative driver.

greetings from the Netherlands
Member
Stefano Moret
Posts: 30
0 Kudos

Re: usb HID to serial emulation

Consider I'm using a normal keyboard. My idea was to find out a sw able to create a virtual COM port, and let the computer see the data input by the keyboard as they are input from the serial port.

 

Is it possible?

 

I found out a post written some years ago in the topic "using multiple HID (Keyboard)":

 

"...One Month Later... Thanks for the advice guys. For the barcode scanner, I reconfigured it to emulate a serial port and used VISA to send trigger commands to the device. (I didn't notice this capability before.) Thanks again!
-Adam "

 

that's exaxtly what I need! But no further information on that topic :smileysad:

 

Any idea??

 

thanks in advance

Knight of NI
Dennis_Knutson
Posts: 33,687

Re: usb HID to serial emulation

As Albert said, it depends on the driver that the vendor provides. Unless you want to use VISA and write your own USB driver, you really need to be asking the vendor whether they have an alternate driver.

 

I'm a little confused about the keyboard emulation, though. Does this instrument constantly stream data? If it's truly a keyboard and not some other HID device, you would be getting data if you simply opened a program like notepad.

Active Participant
JasonSmith
Posts: 550
0 Kudos

Re: usb HID to serial emulation


Stefano Moret wrote:

 

I found out a post written some years ago in the topic "using multiple HID (Keyboard)":

 

"...One Month Later... Thanks for the advice guys. For the barcode scanner, I reconfigured it to emulate a serial port and used VISA to send trigger commands to the device. (I didn't notice this capability before.) Thanks again!
-Adam "

 

that's exaxtly what I need! But no further information on that topic :smileysad:


 
I have seen some barcode scanners that come with a sheet of barcodes you can scan to reprogram the scanner. One of these barcodes probably instructs the scanner to identify itself as a keyboard, and another to identify itself as a serial device. This is all very vendor-specific.
 
-Jason 

 

Member
gidbiudhiuhdiuh
Posts: 1
0 Kudos

Re: usb HID to serial emulation

hey i am trying to emulate mouse and keyboard both.i have done it successfully on a windows xp machine but there is some problem for windows 7.

 

has anyone tried ???? the difference between both is i think only the SDP service request.

 

in XP,it is SDP service search request

but in windows 7 it is service search attribute request.

 

i checked my data with the real mouse. everything i am sending is same as that of the real mouse.

 

 

the thing is that after there is disconnection from the SDP channel,the host is not sending any connection request with psm = hidcontrol channel.

 

and it automatically disconnects....

 

please help me.....

Member
lxkarthi
Posts: 26
0 Kudos

Re: usb HID to serial emulation

Here it is 

http://shtrih-center.ru/TKP_3274.pdf

 

Download Link

http://www.zbaus.com/downloads.php?id=77

 

Hope this Helps.