Virtual COM Port Fails To Open?
Jan 10, 2011
I have a few USB devices that use standard Microsoft Virtual COM Port drivers. More specifically, I believe they use the "Usbser.sys" driver. Whenever I plug my USB devices in, they always shows up in the Device Manager as a COM port, however, sometimes I am unable to open that COM port. This problem occurs on both Windows XP SP3 and windows 7 machines (The only operating systems I have tested this on).
To be a little clearer, I can plug my USB device in, and then successfully open the COM port. I unplug my USB device, then plug it back in, and I am unable to open the COM port. The only solution to this problem is to restart my PC. Is there any solution in VB.net to reset any entrees made to the Windows system when the USB device is plugged in? Has anyone come across this problem and resolved it via a VB.Net solution?
View 10 Replies
ADVERTISEMENT
Feb 25, 2009
I wrote a program that uses the following class from that site: VB.NET Tutorials - Serial Port Communication In VB.Net. The problem is that I cannot open a virtual serial port, and the second is that I want to make the communication asynchronous.
This is the subroutine which reads from the port:
#Region "comPort_DataReceived"
''' <summary>
''' method that will be called when theres data waiting in the buffer
''' </summary>
''' <param name="sender"></param>
[Code] .....
View 10 Replies
Aug 19, 2010
How do you create a virtual serial port using vb.net
View 1 Replies
Jan 23, 2011
I need to communicate with a BlackBerry cell phone, so that I can query the current signal strength using Hayes AT commands, and store is into a file, along with my current GPS position.
I already got it to work perfectly using HyperTerminal:
- I installed BlackBerry Desktop Manager and I leave it running on the PC (otherwise it does not work!)
- I connect my BlackBerry Bold cell phone to the PC using a USB cable.
-The cell phone appears on the PC as a Virtual Com port, in my case it shows up as "COM13".
- I open HyperTerminal and connect to COM13 at 115200 bauds, 8 bits, 1 stop bit, hardware flow control
- If I type "AT" + ENTER, the phone answers "OK"
- If I type "ATI1" + ENTER, the phone answers with its model number "Platform: X.X.X.X, App version: X.X.X.X, PIN: XXXXXXXX"
- If I type "AT+CSQ" + ENTER, the phone answers with the current signal quality value "+CSQ: 21,99".
In theory it should be a piece of cake to query my phone using a serial port routine in VB.NET. The problem I have is that VB.NET allows me to read data from a REAL COM PORT, but refuses to read anything from a VIRTUAL COM PORT. When opening "COM13", I get "The given port name does not start with COM/com or does not resolve to a valid serial port. Parameter name: portName".
I did a lot a searching on Virtual Com Port on the WEB, but everything I see allows me to create a virtual com port. I only want to read an existing VIRTUAL COM PORT, not create a new one.So, I do I actually open a VIRTUAL SERIAL PORT, so that I can send the "AT+CSQ" command and receive my cell phone signal strength value using VB.NET?
View 5 Replies
Jul 4, 2008
I'm writing an app with takes 3 readings off LCD displays via serial ports. The module which scans the serial ports is getting stuck in a loop for around 1.5 seconds. I need it to be much quicker than that. Is there a way I can setup a virtual serial port so I can run test it on my PC. Its very tedious and time consuming of making changes and visiting the machine its for.
View 1 Replies
Mar 26, 2009
I've been struggling with writing my own Ethernet to serial program and just about to give up since I'm down to the wire on this project. I keep getting intermittent errors and I just can't get around them.
View 3 Replies
Oct 25, 2010
Trying to read data through the virtual COM port created by bluetooth.
The original console program (and the trimmed version below) was designed to read data from serial port COM1 and output the data to notepad. The program works; hook the bar code reader to COM1, activate bar code reader, swipe card, bar code reader beeps, data input collected from COM1 and sent out to notepad.
The problem: Bluetooth is wanted instead of serial cable.
We disconnected the serial cable, we connected a USB bluetooth receiving device onto the XP. XP installed the bluetooth device drivers 'Generic Bluetooth Radio' and 'MS Bluetooth Enumerator'. Bluetooth detected the bar code reader device and created COM5 outgoing SPP slave and created COM6 incoming.
But now; activate bar code reader, swipe card, bar code reader beeps, NO data input collected from COM5.
[Code]....
View 7 Replies
Aug 13, 2010
I am writing a small app that is retrieving data from a device connected to a virtual com-port. I connect without problems to the device using the settings 9600-8-N-1.
I need to send the command <esc>MS , the device then sends back the data to a computer. I have tried this using Hyperterminal with success. I also did this with Excel and VBA. I used the MSComm32 Active X control:
MSComm1.Output = Chr$(27) + "M" + "S" + Chr$(13)
Msgbox(MSComm1.Input)
This made the data from the device pop up in a messagebox. I am writing a winforms app in vb.net, using VS2005. I have a form, on which I have a Placed a SerialPort control, named sp. My sample code is as follows:
Private Sub Form1_Load(ByVal
sender As System.Object,
ByVal e
[CODE]...
This returns the error message "Error: expecting a command". I have done som tests in HyperTerminal, and have concluded with:
-If I dont send <esc>, I get error "Expecting a command"
-If I send wrong command (ie MD instead of MS) i get error "Bad command"
Based on this, I suspect that I don't pass the escape character correctly to my device. So I wonder how to do this?
View 5 Replies
Jun 8, 2011
I'm using the zxing C# port to decode a QR barcode.The code is simple and based on an example I found online (see below).The problem is, it always throws an "Index was outside the bounds of the array" exception.My code sample happen to be in VB.NET, but the zxing library is implemented in C#
Dim re As qrcode.QRCodeReader
re = New qrcode.QRCodeReader()
Dim Img As New Bitmap("<image file path here>")
[code]....
View 1 Replies
Dec 30, 2009
Using VB.Net I've added a CTRL-C handler:
AddHandler Console.CancelKeyPress, AddressOf QuitHandler
Which does the following:
Private Sub QuitHandler(ByVal sender As Object, ByVal args As ConsoleCancelEventArgs)
Console.WriteLine("Quitting...")
[Code]....
I then have a main loop which just runs until Quit=True.
This all works until I start reading from the serial port:
Private Sub port_DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles Port.DataReceived
at which point the CTRL-C handler gets ignored for about 30secs at which point the console app just terminates without going through the cleanup code.
View 2 Replies
Sep 23, 2009
i am making a virtual os with the ability to open up a calendar and add appointments on it i created to setting as strings to save the text put into the text boxes it saves them and opens them up but it will open the form and show the appointment but it shows the same appointment on whatever date you click on. also i need help on deleting a appointment here is the code:
[Code]...
View 1 Replies
Oct 8, 2009
is there any open source library able to add virtual instruments to VS ? NI has the Measurement Studio able to do that but it's a costly option..
View 1 Replies
Dec 28, 2010
I'm making a Visual Basic GUI application to display whether a number of my ports are open for people to know whether things like my website and my Minecraft server are open.My problem is I have absolutely no idea how to do this in Visual Basic.Basically, I'm asking for something which sends a signal to an IP with a specific port, if it is open then return true, if it's closed, return false. Similar to: http:[url]....
View 1 Replies
Jan 17, 2012
I need to transfer data between several computers in a network using my app. I thought of using TCP ports. how to open and use them? I only want to make a file transfer and chat app that works offline.
View 3 Replies
Jun 9, 2011
how to open all serial port in vb.net? i know how to open by getportname..but how to open all??can we do it?
View 2 Replies
Apr 1, 2010
how can i open port 433 in my windows
i don't want any code just i want to open open it
View 2 Replies
Sep 1, 2010
Public Class my_class Dim WithEvents COMPort As New System.IO.Ports.SerialPort
Public Sub FindReader()
Dim ports As String() = IO.Ports.SerialPort.GetPortNames()
Dim port As String
For Each port In ports
[Code3]...
When it runs, it shows a single COM port "COM1". I am assured that the device attached to it is a standard 8,n,1 and uses 9,600 baud. The exception is "Acess to the port 'COM1' is denied".
View 1 Replies
Aug 10, 2009
I am trying to open a GPS device on a serial port but no matter what I try I just keep getting an IOException. This is on a pocket PC BTW.
[Code]...
View 2 Replies
Nov 24, 2011
I have an application which need to send data to particular system on specific port. But the application gets hang if the target system port is closed.
I Want to know if a particular Port is open on a specific IP address so that i can continue my next task. PBL (Visual Studio 2010 Ultimate)
View 11 Replies
Feb 16, 2010
I have written some code to check if a port is open. I'm currently trying to work with the system.net.sockets name space.I know that the easy way out would be to use AxWinsock, but I don't think the AxWinSock is very cool, nor do I think it's very professional when trying to make network applications in VB.NET.
I've got this Error message : Socket Exception Was unhandled, No connection could be made because the target machine actively refused it 127.0.0.1:1 IDK, Like I said, I'm new to the System.net.sockets namespace, I'm pretty good with other stuff in VB.NET, but when it comes to the serious stuff like the system.net.sockets namespace, I'm not so great.look at this code and tell me what I am doing wrong, I've manged to get this far, and I don't want to just give up and continue watching my movie.
[Code]....
View 3 Replies
Aug 6, 2009
I have this problem says that "the portName cannot be set while the port is open". When this errors occurred, my application on sending sms could not work. Before I edit the application can work but after making some changes and ask help in this forum, the application does not work and gives errors and it says "the portName cannot be set while the port is open".
Imports System.Windows.Forms.Form
Imports System.Text.Encoding
Imports System.Threading
Imports System.IO.Ports
[code]....
View 4 Replies
Feb 13, 2009
How to open/Read/Write in USB Port
View 3 Replies
Jul 20, 2010
In VB6 I had to always check if the port was open or not. But with VB.NET and the new Serial Port control I don't see any.If SerailPort1.Open then statements. In fact when I tried to use the code I got Expression does not produce a value.So does this mean that we no longer have to check to make sure the port closed?Is there a way to check if the port is open or not?
View 1 Replies
Mar 2, 2010
I have a class that inherits from the TcpListener, this class Shadows the Start method just to call the base Start() and the base BeginAccept Tcp Client(). From time to time the method is called but the port is not opened (netstat does not show the port open).[code]The class that uses the ExtendedTcpListener implements the IDisposable pattern and inside the Dispose the ExtendedTcpListener.Stop is called.The stop text is not present at the logs when the problems happens.
View 4 Replies
Jul 8, 2008
I have a programme that accepts data from a serial port. If I close the port and then the form no problem. However if I try to close the form with out closing the port it appears to hang. I have tried closing the port in the forms close event but this did not solve the problem.The data recieved event is as below and UseData is the private sub which actually handles the data. Usedata contains the code line Dim InputText As String = SerialPort1.ReadLine
Private Sub SerialPort1_DataReceived(ByVal sender As System.Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived
Me.Invoke(New myDelegate(AddressOf UseData), New Object() {})
End SubI am aware that this event runs on another thread and I have seen but cannot now find information about closing multiple active threads.or do I have to "uninvoke" the delegate
View 1 Replies
Jan 15, 2010
I tried to make a winsock program.But when i run, i have a SocketException "No connection could be made because the target machine actively refuse it."Any suggestions on what i should do? Im using 17477 port.By the way Im using my own computer to test it. So i have no idea why.How should I open this specific port in my own computer?
Is it possible that I could include it to could into my program so that i don't need to open the ports of each computer? Below is my code.
[Code]...
View 6 Replies
Aug 14, 2009
I'm having this problem with a networked app in vb.net. If the program exits normally the port closes fine, however, if it crashes sometimes it remains open and I am unable to close it. The next time I run the program it is unable to open the port because it is already in use. Here's the exception: 10048: Only one usage of each socket address (protocol/network address/port) is normally permitted on how I can reclaim this port, or how I can close it? I tried using the reuse address socket option
[Code]...
View 7 Replies
Jul 13, 2010
I want to check if a specific TCP Port of an IP address is open.
How can I realise that?
View 12 Replies
Jun 11, 2011
I need to simple code in Vb.Net for Open / close USB Port (Windows 7) ...
View 7 Replies
May 16, 2011
I know how to open a communications port and read data from a wired usb device.
How can I open a communications port to read data from a wireless bluetooth device?
View 5 Replies