C# - Open And Use A TCP Port?
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
ADVERTISEMENT
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
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
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
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
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
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
Jul 9, 2009
I was wondering if its possible for VB to display all available COM ports that are open. he reason that I ask this is because this program will be run on various computers where the COM port will not always be the same. I have a text box now that the user can choose which com number he/she wants but if the wrong one is entered, the program crashes rather than displaying an error message. It would also be nice for the system to show which available com numbers there are
View 5 Replies
Sep 9, 2010
I have things set up so that the program is ready to start logging ,only when Recieving=true.This is controlled with Button1. So I click button1,Serial port is open and waiting for some signals from the Dyno.When 1 signal come it put a "1" in TextBox1 ,and for the second a "2" and so on. Thing is sometimes it starts right away, like I want it to,and sometimes it lags a fraction of a second, even though the Port is open.When it lags there are already 5 to 10 signals gone by before it starts logging 1,2,3,...and so on. Sometimes it don't start at all.Then I have to close and re-open the form and it works,but with lagging on the first "set"
"Textbox1 > 0 then" triggers a timer (not seen in this code)that samples Textbox1 once pre interval and writes the value to a listbox. On the upside as soon as a "1" is displayed in textbox1 the timer starts like it's supposed to.I noticed this behaviour before I added the timer and besides the timer has nothing to do with the signals coming from the SerialPort. I have my form setup so I can run "sets".Run one "set"...save...reset...run another "set" ...and compare.It's always the first "set" thats off.If I run multiple "sets" the first one is completely "whacked", and the rest are consistent.
Think this could be the SerialPort lagging,or code problems?
Public Class Form1
Dim resetValues As Boolean = False
Dim RPM As Double
[CODE]...
View 19 Replies
Nov 27, 2010
I'm mohammed from Oman ,I'm visual studio.net programmer How I can Read the Data From Barcode Weight scales By Serial port and TcpIp port
View 7 Replies
Jul 25, 2011
I have a Windows form.in windows form have a combo box that give me a list of available port serial with it code (Dim ports As String() =SerialPort.GetPortNames())for example( Com1,Com8,Com15,...).but I want to give me fullname of serial port in device manager for example in dvice manager is these (Comunication Port(COM1) - Printer Port(LPT1) And USB Serial Port(COM8)).how to Get it?
View 2 Replies
Jun 9, 2010
I would like to detect the Address and Port number of the Parallel Port in computer.
View 4 Replies
Aug 2, 2011
If I uninstall the COM1 and reboot, it works. If I shut down (power off) and restart, I get the message below. If I uninstall then click on Scan for Hardware Changes,The given port name does not start with COM/com or does not resolve to a valid serial port. Parameter name:portName
View 8 Replies
Oct 20, 2011
I am trying to get my 4 port USB relay board to work in VB.net using the COM PORT. I found some code from a poster who has the 16 port USB relay version. When trying his code i can only get it to turn on relays 1-3 all at the same time. The product can be found here: USB 4 port relay
"01+//" - Relay 1 is switched ON
"01-//" - Relay 1 is switched OFF
"02+//" - Relay 2 is switched ON
"02-//" - Relay 2 is switched OFF
[code].....
So i am confused as to how to separate each relay out with that code above and just be able to turn on any number 1-4 relay on or off independently from each other!
View 1 Replies
Oct 20, 2011
I am trying to get my 4 port USB relay board to work in VB.net using the COM PORT. I found some code from a poster who has the 16 port USB relay version. When trying his code i can only get it to turn on relays 1-3 all at the same time. The product can be found here: USB 4 port relay I was following what the guy in the post was doing to turn his on:
[Code]...
View 6 Replies
Oct 15, 2008
Im having problem with the Serial Port. When i run my program, "Access to the port 'COM1' is denied". What does that mean? Im not sure whats happening because theres no error in my code. Someone suggest me to use 'COM2'. Which is also the same result. I have a microcontroller, programmed and run it. And i need to capture the data onto my vb, which is on a multiline textbox. How to i do that?Just to double check my code?
[code]...
View 1 Replies
Aug 16, 2011
i am a absolute beginner and i want to use vb to receive data from micro controller through serial port using rs232 standards, i found this code to receive the data serially, can any one tell me where should i paste this code, so that the data received will be displayed in message box.Private Sub DataReceived(ByVal sender As System.Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) HandlesSerialPort1.DataReceived
[Code]...
View 9 Replies