|
| ||||||||||
| Tags: usb port, vb dot net |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| How to communicate with USB port with VB.NET program?
I want to know how can i communicate with the USP port of my computer with the application so that i can read or write etc with using this USB port & a device connected to it! Any help? |
|
#2
| |||
| |||
| Re: How to communicate with USB port with VB.NET program?
Have you tried going through the sample which communicates with the COM Port. You can use the same logic to connect to the USB Ports too. Take a look at this sample: http://www.microsoft.com/downloads/d...DisplayLang=en Here is one more in C# http://www.icsharpcode.net/opensource/sharpusblib/ |
|
#3
| ||||
| ||||
| Re: How to communicate with USB port with VB.NET program?
There isn't a single method for using USB -- every device provides its own API. These either are standard Windows APIs, or ones specific to the device that the device manufacturer provides you. Also, depending what you are communicating with you will need to know the manufacturer's info on the hardware. One other thing you can do is use a MSDN subscription to get the driver development kit, so, you can write your own inf files too. Maybe you don't need the subscription now, but you did 3 years ago when I was doing a lot of USB/VB programming for different devices. |
|
#4
| ||||
| ||||
| Re: How to communicate with USB port with VB.NET program?
Hello there I think you need to understand the concept of USB port in VB.net that will enable you to communicate with the device attached to the USB port from your Vb.net application! http://www.codeproject.com/KB/IP/ser...mmunicate.aspx I hope this helps you! |
|
#5
| ||||
| ||||
| Re: How to communicate with USB port with VB.NET program?
I have found that some USB devices not only add themselves as a HID Device (see your Windows Device Manager) but ALSO add themselves as a COM Device (see you Windows Device Manager) a little further down the list under Ports. Note that not all USB device do this it would seem and I am unsure if it is possible to force this. Upon finding this and which COM port the USB is assigned to you can access the USB device by using standard COM port settings. Remember to Set a baud rate of 57600 for Bluetooth though. My code for VB 6.0 is below, there seems to be an abundance of examples on how to get COM port access using .net so I will try that soon. Code: Private Sub btnexit_Click() End End Sub Private Sub btnReceive_Click() 'rx txtReceive.Text = MSComm1.Input End Sub Private Sub btnSend_Click() 'send MSComm1.Output = txtSend.Text & vbCr End Sub Private Sub Form_Load() ' Config and open the COM port With MSComm1 .CommPort = 6 .Settings = "57600,N,8,1" .PortOpen = True End With End Sub |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "How to communicate with USB port with VB.NET program?" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to Write a program to communicate between two processes using the pipe{ This is urgent so please help me} | huyleuit | Software Development | 1 | 11-11-2011 03:46 AM |
| How to Communicate with other Applets? | PsYcHo 1 | Software Development | 4 | 18-02-2010 03:17 AM |
| Could not communicate with gps on HTC Sprint | Markesh | Portable Devices | 2 | 28-07-2009 10:47 AM |
| cannot communicate with DNS server | Pratim | Windows Vista Network | 2 | 18-05-2009 05:07 PM |
| Missing port types : local port and Standard TCP/IP port | NIcaBoy | Windows XP Support | 3 | 28-12-2006 06:38 PM |