I am working with Netduino Plus with blueSMiRF Silver (a bluetooth module). After spending so much time, I found the following useful links.
1) http://www.sparkfun.com/products/10269
2) http://dlnmh9ip6v2uc...th-RN-42-DS.pdf
3) http://wiring.org.co...ials/bluetooth/
4) http://blog.mark-stevens.co.uk/?p=180
Then, I used Termite 2.9 simulator to connect my Notebook (with bluetooth) to Netduino Plus(with BlueSMiRF).
Now, the connection is establieshed between Netduino and my notebook because the BlueSMiRF LED is on.
My code is as below:
public class Program { static SerialPort serial; public static void Main() { // initialize the serial port for COM1 (using D0 & D1) serial = new SerialPort(SerialPorts.COM1, 115200, Parity.None, 8, StopBits.One); // open the serial-port, so we can send & receive data serial.Open(); // add an event-handler for handling incoming data serial.DataReceived += new SerialDataReceivedEventHandler(serial_DataReceived); // wait forever... Thread.Sleep(Timeout.Infinite); } static void serial_DataReceived(object sender, SerialDataReceivedEventArgs e) { // create a single byte array byte[] bytes = new byte[32]; // as long as there is data waiting to be read while (serial.BytesToRead > 0) { // read a single byte serial.Read(bytes, 0, bytes.Length); // send the same byte back serial.Write(bytes, 0, bytes.Length); } } }
My question: How can I transfer data (e.g. some chars) between the 2 mentioned devices?
Thanks for your future replies