Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hyperterminal problem with Meridian c#

Status
Not open for further replies.

Aerodesliza

Programmer
Apr 10, 2008
282
DO
I have created a Hyperterminal version using this configuration:

BaudRate = 9600;
DataBits = 8;
StopBits = One;
Parity = None;
Handshake = RequestToSend <-- RTS: Hardware

I made several test with my hyperterminal and windows's hyperterminal using both like receiver and emitter and there's no diferent between them, they both send and received data equal.
The problem is that when I want to send some command, the Meridian even notice, but I can received Meridian information wonderful. What's wrong? Program below:

 
not that uncommon for hyperterm.. your term emulation might be the missing link... if you can emulate a vt320.. might help.. but problems like that are why we buy procomm

john poole
bellsouth business
columbia,sc
 
Where are you plugging into? Off a tty card or in J25? I have had to use 7 S 1 instead of 8 N 1.
 
I can emulate a vt320, I already did it, they are exactly the same, any suggest?
 
Try going straight into J25 on the back of the cabinet and see what you get. Remember if you have a dual core switch, you will have to be on the core that is active. We lost our interface due to lightening. Thank God for J25.
 
When I use the J25 I can see the incoming command from my computer to the Meridian?

 
Quote:
When I use the J25 I can see the incoming command from my computer to the Meridian?

What does that mean and does it fix it?




This is a Signature and not part of the answer, it appears on every reply.

This is an Analogy so don't take it personally as some have.

Why change the engine if all you need is to change the spark plugs.


 
Your ZIP doesn't work. You can do a Screen copy and post it here.




This is a Signature and not part of the answer, it appears on every reply.

This is an Analogy so don't take it personally as some have.

Why change the engine if all you need is to change the spark plugs.


 
Sorry, just change the extension to .rar
Here is the code:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace SimpleSerial
{
public partial class Form1 : Form
{
// Add this variable
string RxString;

public Form1()
{
InitializeComponent();
}

private void buttonStart_Click(object sender, EventArgs e)
{
serialPort1.PortName = "COM3";
serialPort1.BaudRate = 9600;
serialPort1.DataBits = 8;
serialPort1.StopBits = System.IO.Ports.StopBits.One;
serialPort1.Parity = System.IO.Ports.Parity.None;
serialPort1.Handshake = System.IO.Ports.Handshake.RequestToSend;
serialPort1.Open();


if (serialPort1.IsOpen)
{
buttonStart.Enabled = false;
buttonStop.Enabled = true;
textBox1.ReadOnly = false;
}
}

private void buttonStop_Click(object sender, EventArgs e)
{
if (serialPort1.IsOpen)
{
serialPort1.Close();
buttonStart.Enabled = true;
buttonStop.Enabled = false;
textBox1.ReadOnly = true;
}

}

private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
if (serialPort1.IsOpen) serialPort1.Close();
}

private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
// If the port is closed, don't try to send a character.
if (!serialPort1.IsOpen) return;

// If the port is Open, declare a char[] array with one element.
char[] buff = new char[1];

// Load element 0 with the key character.
buff[0] = e.KeyChar;

// Send the one character buffer.
serialPort1.Write(buff, 0, 1);

// Set the KeyPress event as handled so the character won't
// display locally. If you want it to display, omit the next line.
e.Handled = true;
}

private void DisplayText(object sender, EventArgs e)
{
textBox1.AppendText(RxString);
}

private void serialPort1_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e)
{
RxString = serialPort1.ReadExisting();
this.Invoke(new EventHandler(DisplayText));
}
}
}
 
Quote:
"When I use the J25 I can see the incoming command from my computer to the Meridian?"


Where are you seeing the command, on the PC or the Meridian
are you getting any kind of responce? (Garbarge)






This is a Signature and not part of the answer, it appears on every reply.

This is an Analogy so don't take it personally as some have.

Why change the engine if all you need is to change the spark plugs.


 
Hyperterminal sucks in my opinion. Try downloading PuTTY from the web it is free.

Signature===========================================
Artificial Intelligence Is No Match for Natural Stupidity.

The latest survey shows that 3 out of 4 people make up 75% of the population.

The original point and click interface was a Smith & Wesson.

Red meat is not bad for you, it is the green fuzzy meat that is bad.
 
Quote:
Where are you seeing the command, on the PC or the Meridian
are you getting any kind of responce? (Garbarge.

Im seeing the command on the pc but the meridian didn't show me any response, remember that when I m using Hyperterminal I cant see what I writing, only what the meiridan receive and send, but when I use a loop on my serial port and use a hyperterminal and my programn I can see that my program is sending the command.
 
What system are you trying to connect to?




This is a Signature and not part of the answer, it appears on every reply.

This is an Analogy so don't take it personally as some have.

Why change the engine if all you need is to change the spark plugs.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top