Click here to Skip to main content
15,885,309 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I am building an application that I need to transmit text from a form and place it into PuTTy to be sent to a serial device. The idea is to have a form with multiple buttons representing numbers(i.e. STX01P00204##ETX) so that when it is clicked, that number is placed directly into PuTTy and automatically sent to the serial device.

My question is, are there applications that already do this process that I could use? If not, is this a simple project to be programmed or is there many complications with doing so. I have little experience programming so please be detailed if you have any suggestions. Thank you.
Posted
Updated 6-Jul-15 8:06am
v2
Comments
PIEBALDconsult 6-Jul-15 14:14pm    
Eliminate the middleman (Putty).
Shoot! I _still_ haven't published my Serial Communicator?!

Have a look at the system.io.ports.serialport class
https://msdn.microsoft.com/en-us/library/system.io.ports.serialport(v=vs.110).aspx
[no name] 6-Jul-15 14:14pm    
Why don't you simply send the data straight to the device?
Member 11780461 6-Jul-15 14:50pm    
I thought that with little to no experience that I may have more luck finding an application which already exists in this format rather than creating my own serial port terminal. Is it simple to learn and create with the specifications I want?
[no name] 6-Jul-15 15:07pm    
It would be a lot simpler than trying to automate PUTTY in some weird fashion. Open a serial port and write the data to it.

1 solution

The comments should have put you on the right path. You are at the point we all began with serial communications.

PuTTy is very useful, keep it handy. Use it to test your hardware (because you know IT works) and whenever you run up against a problem come back to it to do basic testing.

This is a very basic tutorial to get you started: http://csharp.simpleserial.com/[^]
As you can see in C# we always come back to the SerialPort class: https://msdn.microsoft.com/en-us/library/system.io.ports.serialport(v=vs.110).aspx[^]

There are many excellent articles here on CP but I will pick a couple by experts. Start with this which has a very good background explanation:

Serial Comms in C# for Beginners[^]

and this one:
Arduino, C#, and Serial Interface[^]

For Arduino substitute your own device.

This will get you started but as always come back here with specific questions.
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900