using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.IO; using System.IO.Ports; namespace BluetoothCPFSpoofer { public partial class CPFSpoofer : Form { StreamReader reader = new StreamReader("\\CPF\\Pierre\\PierreTest2.eng"); SerialPort comPort = new SerialPort("COM3", 115200); public CPFSpoofer() { InitializeComponent(); comPort.Open(); } private void TransmitTimer_Tick(object sender, EventArgs e) { if (reader.Peek() != -1) { comPort.WriteLine(reader.ReadLine()); } else { Console.Write("End of File Reached"); comPort.Close(); } } private void button1_Click(object sender, EventArgs e) { comPort.Close(); Application.Exit(); } } }