TCP Protocols - Sending Command To Specific Port On Same Computer

Mar 10, 2011

I am working on writing a program that needs to send a command to a specific port on the same computer, I have that working fine. There is another piece of software running that is listening to that port for some commands (read on).
Dim myTcpClient As New TcpClient
myTcpClient.Connect("127.0.0.1", 61225)
Dim networkStream As NetworkStream = myTcpClient.GetStream()

However when I try to send a command I get no response...
Dim outStream As Byte() = System.Text.Encoding.ASCII.GetBytes("0x33")
networkStream.Write(outStream, 0, outStream.Length)
networkStream.Flush()

I have been given a list of protocols that I need to send to that port. What I have been told is that the size (in byes) is 1 and the value is "0x33" with no parameters. I am completely new to sockets and sending data through tcp.

View 7 Replies


ADVERTISEMENT

Sending Data Into VB Through A Serial Port On Computer?

May 2, 2009

I am sending data into VB through a serial port on my computer, from a microcontroller. The data enters VB in an ASCII form, but I need it as a number. I can use the Asc command to convert numbers 0-127 however after this it dosent work. I believe this is becaus the ascii character map only goes through 127. So how can I convert the rest of the data (128-256) to a numbers?

View 3 Replies

Open The Specific Port Of A Windows Computer?

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

Detect The Address And Port Number Of The Parallel Port In Computer?

Jun 9, 2010

I would like to detect the Address and Port number of the Parallel Port in computer.

View 4 Replies

VS 2005 : Dial A Computer From Another Computer Using Modem For Sending Files And Message?

Jul 11, 2009

I am trying to dial a computer from another computer using Modem for sending files and messge.Follwoing is the code done in dialing computer

Text1.Text = "Test string from App1 "
Number$ = InputBox$("Enter phone number:", "Number$")
If Number$ = "" Then Exit Sub
Temp$ = Status

[code].....

But after the dial tone, i am getting the exception "CTL_E_GETNOTSUPPORTED " at the line MSComm1.Output = Text1.Text?

View 6 Replies

Lookup For A Specific Computer Given Ip Or Computer Name ... Retrieve The User Logged On

May 21, 2010

how can i look up for a specific computer given ip or computer name ...retrieve the user logged on..

View 2 Replies

Sending A File Via COM PORT?

Jun 10, 2010

I have only finished about sending string via COM.

View 3 Replies

Specifying Port When Sending E-mail?

May 2, 2011

I'm writing a simple application that can send e-mail;

Must I specify the Port, along with my username and password for the message to sent?

View 4 Replies

Access Com Port And Sending Data

Nov 9, 2011

have gps constantly sending data but can read it from the com port

View 5 Replies

Sending Bytes From The Serial Port?

Aug 30, 2010

I'm working with a device using the serial port and i am sending a command from the pc to the device like this:

1. I Change the parity to mark

2. then send a byte

3. then Change the parity to space (here is the problem)

4. Send a lot of bytes

but the device just ignores all the last bytes, im pretty sure its a timing problems, so a timeout occurred attempting to send a command, how can i change the parity without losing time?

View 24 Replies

Sending Data From A VB Program To USB Port?

Apr 23, 2009

I'm working on a project that involves sending information through a GSM module, this module is connected to the system through a USB port. the information to be sent is gathered from a database using VB, now I need to send the information from my VB program to the USB port for onward delivery to the GSM module.

View 2 Replies

Sending Data To Serial Port?

May 1, 2010

i am doing a project in vb 2008 .net.during execution of the code, a different number is generated every second. the numbers are either 0,1,2,3,4, or 5. how do i send this number every second to the serial port. at the serial port i have a microcontroller connected which should accept this number and light up an LED coresponding to the number received.

View 1 Replies

Sending Hex Data Through Serial Port?

Mar 1, 2010

I am trying to send a command through my serial port to a external device. The format of the command frame is, more or less, like this:

'0x0A 0x03 0x20 0x00 Checksum'

What I've written on my code is just this:

VB code
num_dec = &HA + &H3 + &H20 + &H0
checksum = DecToHex(num_dec) '2D
data=&HA & &H3 & &H20 & &H0
SerialPort_RFID.Write(data & checksum)

The problem is that when I stop the program on the Serial...Write line, I see that the data I sent is on integer format instead of Hex format.

View 8 Replies

Serial Port VB Net Error Sending &HBB

Sep 9, 2009

When i try to send the &HBB value through it just sends a &H3F value i think is an error character i use this code:

SerialPort1.Write(System.Convert.ToChar(&HBB))

I am able to send other ascii character using this but i really need to send this &HBB value through serial port.

View 2 Replies

Sending Messages From 1 Computer To Another?

Dec 9, 2011

I am trying to add functionality to an existing program that can send a message from a Windows XP and Windows 7 computer to a group of computers that are running XP and Windows 7. Previously I was doing this with Net Send but as we are no purchasing
Windows 7 machines when we need to replace old computers, that is no longer an option.

I would prefer to have the message appear as a popup on the receiving computers as this is for calling for assistance from a supervisor or the QC department and they will not have to send a response.

View 3 Replies

Sending / Receiving Data To Serial Port

Aug 13, 2009

I'm trying to control a serial port device that both send and receives data. I can receive data quite happily from the serial port but I don't appear to be able to send data to the device. The device works perfectly as I can test it using putty, I open putty select serial and select 1200 baud, the device immediately lights up and can send and receive. However when the port is set up and opened in VB the device doesn't light up so I can't send data to it but can receive data from it. According to the instructions I need to send either ASCII 'X' Hex '$58' or Decimal '88' to make the device ready.

Code (VB Studio 2005) :-
Public Sub New(ByVal synchronisingObject As ISynchronizeInvoke)
ComPortUsed = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINESoftwareNJB", "COMUSED", Nothing)
PricePerTrack = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINESoftwareNJB", "PRICETRACK", Nothing)
Me.synchronisingObject = synchronisingObject
[Code] .....

View 11 Replies

Sending Binary Code To Parrarel Port?

Jul 31, 2010

im interested on electronic and i working on my final project i not to experienced at VB so can anyone figuring this out i really need this , if there was any advance from this forum.

View 2 Replies

Sending/receiving Serial Port Data?

Feb 22, 2011

Opening and closing the port works fine, and as far as i can tell, the serial.write("blahblah") should be writing to the output buffer, but I am unable to test or verify this by reading it in. the commented "Receive data from serial port" and subsequent DoUpdate() function are where i am having trouble. It doesnt seem to actually be reading in the data if it is in fact writing it correctly.

[Code]...

View 9 Replies

Serial Port Sending Numbers As Bytes?

Mar 10, 2010

I'm using 2008 Express and I'm trying to send 1 byte of data on the serial port.

Serialport1.write(123) Sends 3 bytes with the ascii codes representing 1 2 and 3.

I want to send 1 byte that contains 123.

View 2 Replies

VS 2008 Sending And Receiving Data Via Com Port?

Aug 16, 2010

I have a very basic knowledge of coding, just enough to understand some PicBASIC Pro and program a microchip to send the values of some variables to a PC via the com port. I've used a terminal utility like Hyperterm to confirm the right variables are being sent, so I thought it would be cool to have a custom application on the PC to display these variables, and possible set them via the application by writing the new one back to the PIC. So I downloaded VB express 2008 - and whilst it was "simple" to draw a box and add a few text boxes I'm lost at how to actually do anything practical with it

[Code]...

Could someone advise me in laymens terms exactly what I need to do inorder to populate the text boxes with the data from the PIC micro. Whilst I understand the basics about BASIC, I have no idea on things like classes etc

View 5 Replies

IDE :: Sending Messages To Other Applications On The Same Computer

Dec 5, 2009

I was looking for an easy way to send Messages to other Applications on the same computer. Something simple like "SendMessage("MySecondApplication",WMI_USERS,"MESSAGE").

View 1 Replies

Sending Data Via Internet To Another Computer

Oct 14, 2009

I was recently working on a project involving data transfer(transferring of a text file) from my pc to another pc via the internet. I've already created a site but I don't know how to transfer the file.

View 4 Replies

Dead Simple Example Of Sending Hex Data To A Serial Port?

Jul 6, 2011

I ran into this problem while trying to write a Pan/Tilt/Zoom controller program. I found some very complicated examples, but managed to put the pieces together into this simple test program.I first import System.IO.Portsthen I define a new serial port and give it the required parametersI open the com port when the form loadsI have two working buttons, one to pan left, one to stop panning. The hex commands are pre-configured.The one for Stop is A0 00 00 00 00 00 AF 0FThe one for Pan Left is A0 00 00 04 14 00 AF 1FI declare a byte array to contain the command bytes and put them into the correct position.

Code below:
Imports System.IO.Ports
Public Class Form1

[code].....

View 13 Replies

Find Out Port From Switch Of Computer

May 26, 2010

ok i got a hard question I have diferent computers, lets say 200 cps with all known mac address. i got 3 switches with 24 ports each. i want to know if i can be able to know the port No. and switch of a given computer given the mac address... some computer arent in the domain. how could i start puttin this into code

View 1 Replies

Sending Data To MIDI Device On Computer

Jul 1, 2009

I need some sample code for sending data to the MIDI device on the computer? I'm not quite sure what the hardware's address is though.

View 2 Replies

Find Out What Port Of What Switch Its The Remote Computer

Jun 22, 2010

I have different computers, lets say 200 cps with all known mac address. i got 3 switches with 24 ports each. i want to know if i can be able to know the port No. and switch of a given computer given the mac address. some computer aren't in the domain. how could i start putting this into code.

View 1 Replies

VS 2008 Sending Command To Website?

Mar 23, 2012

I am connecting to a website using a Httpwebrequest command... this is going good as far as I can tell but to test it I want to send a command to the website that presses a button on the website... of course this will not be a physical push as I do not have a browser but I just want to use the "submit" button on the site...So when it sends the request to the website it will also send a command to "press" the submit button and do the same action that the submit button normally would if I had pressed it through a web browser...y code is as follows:

Dim r As New Random
Dim s As New Random
Dim l As New Random

[code].....

View 1 Replies

VS 2010 Sending A Command To Telnet?

Apr 14, 2010

I have wrote a nice little app in VB.Net to connect to an IP device via telnet and send a command, then write the reply to this command into a text file.I have everything working appart from the command.I need to send "Ctrl+a I2100" so if I was doing it manually in a dos box with telnet I would connect, then hold down Ctrl key and a then release, then type I2100 How do I do the Ctrl+a bit in VB. The line of code I have at the moment, is

client.SendCommand("Ctrl testing")

Now this obviously sends the word Ctrl testing to the telnet device.

View 1 Replies

VS 2008 Find Out What Port Of What Switch Its The Remote Computer?

May 25, 2010

ok i got a hard question I have diferent computers, lets say 200 cps with all known mac address.

i got 3 switches with 24 ports each. i want to know if i can be able to know the port No. and switch of a given computer given the mac address.some computer arent in the domain.

how could i start puttin this into code

View 9 Replies

Updating A Text Box After A Com Port Command?

Jan 7, 2011

I created a form which I communicate with a Programmable logic controller through the Com Port. I have successfully sent commands to it and it has responded with the correct response. For example if i send the command CR through the Com port It comes back CC.I have put a timer that checks the text box for the com port response The problem is that the check box ticks if CC is put in manually into the textbox but once it is sent from the com port it don't automatically do it when the textbox refreshs. How can I refresh the textbox so that it ticks the box after a automatic change of text. I have also tried the textchanged method.

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved