A long winded question but I wanted to explain some background.
I have a Samsung tablet that never has a problem connection to a bluetooth device. That said, I cannot connect to my fez.Spider. It seens that it Pairs (red and blue Led’s blinking) Samsung shows that the Fez.Spider is available and all ‘seems well’. But I never receive a ‘connect’ from the spider application.
My device is a Bluetooth 1.1 Gadgeteer Module
I am using the code from CodePlex
by: Eduardo Velloso, BETA drivers for the .NET Gadgeteer Bluetooth module.
Last edited Apr 2 at 9:13 AM by eduardovelloso, version 2
I’ll start by saying I am NOT blaming the code. I DO have a question about the code and I though someone in here may be using it successfully with a Android bluetooth device.
Status codes
0 - Initializing
1 - Ready
2 - Inquiring
3 - Connecting
4 - Connected < Never received
My PC shows the following
From PC Device Manager and Bluetooth taskbar Icon
Bluetooth device shows up as FezSpider
Right click FezSpider Icon and select Properties
In Dialog FezSpider Properties, Select Bluetooth Tab
For my Bluetooth Module it shows
MAC address: shows Unavailable
Unique identifier: 00:18:a1:12:0d:1b << I think BD_ADDR is unique address of a Bluetooth device
I have not tried using the Unique identifier: 00:18:a1:12:0d:1b YET.
I wanted to see any answer received here first.
Bluetooth.cs
/// <summary>
/// Connects the module to a device.
/// </summary>
/// <param name="macAddress">The MAC address which to pair to.</param>
public void ConnectAsync(string macAddress)
{
if (Utilities.IsNullOrEmpty(macAddress))
{
throw new ArgumentNullException("macAddress");
}
if (this.Mode != BluetoothMode.Client)
{
throw new NotSupportedException("This method may only be called while in the client mode.");
}
this.SendCommand("+CONN=" + macAddress, false);
}
AND in Program.cs
private void button_ButtonPressed(Button sender, Button.ButtonState state)
{
////this.bt.IsPairingEnabled = !this.bt.IsPairingEnabled;
this.bt.ConnectAsync("9C,B7,0D,A9,D0,EE");
}
The Seeed document shows something like this:
//macAddress \r\n+CONN=aa,bb,cc,dd,ee,ff\r\n
//Connect to a device with address of "aa,bb,cc,dd,ee,ff
I am not ‘seeing’ the relation of "9C,B7,0D,A9,D0,EE"
to a device Mac Address OR my Unique identifier: 00:18:a1:12:0d:1b
I cannot find any documentation on the Beta bluetooth driver
I guess that the MAC Address and the unique identifier are considered the same thing…
Have a great day!