G
Guest
Hello,
How do I set up attributes for an IrDA device. I am trying to use
IrDA:IrCOMM as 9 Wire cooked.
I am using the following code:
private void Send_Click(object sender, System.EventArgs e)
{
try
{
irEndP = new IrDAEndPoint(irDevices[DeviceID].DeviceID,
"IrDA:IrCOMM");
irClient = new IrDAClient( irEndP );
}
catch( SocketException exS )
{
MessageBox.Show( "Create socket error: " + exS.Message );
return;
}
// Get the underlying stream of the client.
Stream irStream = irClient.GetStream();
irStream.Write( stringToByteArray(textBox1.Text), 0, textBox1.Text.Length );
// Display the number of bytes being sent.
statusBar1.Text = "Sending " + textBox1.Text.Length + " bytes";
irStream.Flush();
irStream.Close();
irClient.Close();
}
where irDevices[DeviceID].DeviceID is a previously discovered IrDA device
Thanks
Steve
How do I set up attributes for an IrDA device. I am trying to use
IrDA:IrCOMM as 9 Wire cooked.
I am using the following code:
private void Send_Click(object sender, System.EventArgs e)
{
try
{
irEndP = new IrDAEndPoint(irDevices[DeviceID].DeviceID,
"IrDA:IrCOMM");
irClient = new IrDAClient( irEndP );
}
catch( SocketException exS )
{
MessageBox.Show( "Create socket error: " + exS.Message );
return;
}
// Get the underlying stream of the client.
Stream irStream = irClient.GetStream();
irStream.Write( stringToByteArray(textBox1.Text), 0, textBox1.Text.Length );
// Display the number of bytes being sent.
statusBar1.Text = "Sending " + textBox1.Text.Length + " bytes";
irStream.Flush();
irStream.Close();
irClient.Close();
}
where irDevices[DeviceID].DeviceID is a previously discovered IrDA device
Thanks
Steve