Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to write to a COM port using VB.Net

Posted on 2011-03-24
8
581 Views
Last Modified: 2012-05-11
Help!!!!
 
  I am trying to write to a COM Port using VB.Net and to establlish a TCP/IP Connection..

Appreciate the Help!!

Thanks
0
Comment
Question by:shahjagat
  • 4
  • 3
8 Comments
 
LVL 5

Expert Comment

by:soujanya_g
ID: 35207127
0
 
LVL 7

Expert Comment

by:kemi67
ID: 35207200
I see that you mix COM port and TCP/IP communication: they are two completely different things.

Here you can find a good tutorial about COM serial ports
http://www.dreamincode.net/forums/topic/37361-serial-port-communication-in-vbnet/
and a short example here
http://www.codeproject.com/KB/vb/Comport_made_simple.aspx

In your question you ask even for TCP/IP comunication. Port in TCP are not the same of the COM port, so you need different tutorial:
http://vb.net-informations.com/communications/vb.net_socket_programming.htm
0
 

Author Comment

by:shahjagat
ID: 35207258
Thank you Soujanya..:)

Thanks Kemi67
 I think i have to establish a TCP/IP Connection first  and write in to that Port. Could you please provide me the example,How to write in to a TCP port..

Thanks
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 7

Accepted Solution

by:
kemi67 earned 500 total points
ID: 35207332
0
 

Author Comment

by:shahjagat
ID: 35207431
Thanks for you Help..:)
0
 

Author Comment

by:shahjagat
ID: 35207680
Hello Kemi,

 Is it possible to Write to a COM Port using a TCP/IP Connection.??


Thanks
0
 
LVL 7

Expert Comment

by:kemi67
ID: 35207867
Hi shahjagat,
yours is a strange question, Serial ports and Tcp/IP ports are not the same thing, they are two different protocols.
Why are you asking that? Are you trying to build a tcp/ip to serial converter?
Which devices do you need to connect?
I suspect that you are misunderstanding something. Tcp/ip communication required a network card. It seems that you want to use a serial port as network card, and this would be like you are writing a device driver.
You needs strong tcp/ip basics to do that.
Are you trying to build a device like this:
 http://www.barcode-manufacturer.com/serial-ethernet
Or like this
http://www.sharewareconnection.com/tcp-com.htm
Or try to look here
http://tcp-ip.qarchive.org/

Can you better explain what are are you really trying to do? Perhaps there is another way to do that.
0
 

Author Closing Comment

by:shahjagat
ID: 35369129
Thanks
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
conditional code and condition difference 9 84
Which programming language is best for beginning Object-oriented programming 11 149
map interface methods 3 72
NotAlone Challenge 20 84
There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question