Main Site Documentation

Bluetooth


#1

i have tried for hours to use tere term pro to see if the blue tooth module is broadcasting “hello” every one second as the test code from the brochure shows. I’m getting nothin on the tera term window. i can see the device on my laptop and connected it to be a serial port at COM 40 but nothing sill works. please help.


#2

Where is the code? How is it connected? More info please.


#3

using System;
using System.Text;
using System.Threading;
using System.IO.Ports;

using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;

using GHIElectronics.NETMF.FEZ;

namespace ecg_project
{
public class Program
{
public static void Main()
{
// Blink board LED

        bool ledState = false;

        OutputPort led = new OutputPort((Cpu.Pin)FEZ_Pin.Digital.LED, ledState);

        // create serial port for bluetooth . Connect BLUETOOTH_RX to Di8 and BLUETOOTH_TX to Di7.
        SerialPort bluetooth = new SerialPort("COM3", 9600, Parity.None, 8, StopBits.One);
        bluetooth.Open();
        // create "Hello!" string as bytes
        byte[] helloBytes = Encoding.UTF8.GetBytes("Hello!");

        while (true)
        {
            // Sleep for 500 milliseconds
            Thread.Sleep(1000);

            bluetooth.Write(helloBytes, 0, helloBytes.Length);

            // toggle LED state
            ledState = !ledState;
            led.Write(ledState);
        }
    }

}

}


#4

I have TX connected to D!7 and RX to DI8 as instructed in the BT brochure. okay so the BT device is paired to my pc. my pc sees it as “spp” and i connect with it. i put in the pass code “0000” and it shows they are paired at COM40. i set tera term to COM40 and made sure all other settings matched. i’m still having no connections. i still can’t se the “Hello” string show up every second. when i pair, the bluetooth device on my pc only gives me one com-port to use for the serial communication and it’s COM40


#5

If you are using FEZ Mini then COM3 is at Di8 and Di7.

If you are using other device like FEZ Domino or FEZ Panda you have to connect your bluetooth to where COM is available.

For example, on FEZ Panda and you want to use COM1 then connect BLUETOOTH_RX to Di1 and BLUETOOTH_TX to Di0.


#6

EUREKA EUREKA. IT WORKS!!! IT WORKS!!! ;D THANKS guys ;D