Bluetooth not visible on PC and MobilePhone

Hi,

I Use the Spider-Board with the Bluetooth-Module, but I do not see the bluetoothdevice on my devices (PC and mobilephone)

First I used the Example on the Bluetooth Documentation of GHI.
https://www.ghielectronics.com/docs/159/bluetooth-module#1575

using System.Threading;
using Gadgeteer.Modules.GHIElectronics;
using Microsoft.SPOT;

namespace change_this_to_your_namespace
{
   public partial class Program
   {
      void ProgramStarted()
      {
         bluetooth.SetDeviceName("Gadgeteer");

         bluetooth.BluetoothStateChanged += new Bluetooth.BluetoothStateChangedHandler(bluetooth_BluetoothStateChanged);
         bluetooth.DataReceived += new Bluetooth.DataReceivedHandler(bluetooth_DataReceived);

         //The timer gives the device enough time to initialize.
         Gadgeteer.Timer timer = new Gadgeteer.Timer(1000, Gadgeteer.Timer.BehaviorType.RunOnce);
         timer.Tick += new Gadgeteer.Timer.TickEventHandler(timer_Tick);
         timer.Start();
      }

      void timer_Tick(Gadgeteer.Timer timer)
      {
         //You only need to enter pairing mode once with a device. After you pair for the first time, it will
         //automatically connect in the future.
         if (!bluetooth.IsConnected)
            bluetooth.ClientMode.EnterPairingMode();
      }

      void bluetooth_BluetoothStateChanged(Bluetooth sender, Bluetooth.BluetoothState btState)
      {
         Debug.Print(btState.ToString());
      }

      void bluetooth_DataReceived(Bluetooth sender, string data)
      {
         Debug.Print(data);
         sender.ClientMode.SendLine(data); //echoes the data back to the device.
      }
   }
}

Than I tried other excamples like:

using System;
using System.Collections;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Controls;
using Microsoft.SPOT.Presentation.Media;
using Microsoft.SPOT.Touch;
 
using Gadgeteer.Networking;
using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;
using Gadgeteer.Modules.GHIElectronics;

In this excample i also used F11 for compile step by step.
There I receive a message: "bluetooth_42.cs not found"

namespace Bluetooth_Spider
{
    public partial class Program
    {        
        private Bluetooth.Client client;
 
        // This method is run when the mainboard is powered up or reset.  
        void ProgramStarted()
        {
            client = bluetooth.ClientMode;
 
            bluetooth.SetDeviceName("Gadgeteer");
            bluetooth.SetPinCode("0000");
            bluetooth.SetDeviceBaud(38400);
            bluetooth.DataReceived += new Bluetooth.DataReceivedHandler(bluetooth_DataReceived);
            button.ButtonPressed += new Button.ButtonEventHandler(button_Presses); 
 
            Debug.Print("Program Started");
        }

        private void button_Presses(Button sender, Button.ButtonState state)
        {
            button.ToggleLED();
            if (button.IsLedOn) client.EnterPairingMode();
        }
 
        private void bluetooth_DataReceived(Bluetooth sender, string data)
        {
            Debug.Print("Daten: " + data);
        }
    }
}

But no device found.

The last I was trying, is the driver and testprojekt from RoSchmi:

Here the Program.cs of the project

// Copyright RoSchmi 2014, License: Apache 2.0
// The class Bluetooth.cs in this application is driver for the GHI Bluetooth Module
// The class can be used in other Gadgeteer Mainboards. It was tested for Spider, Cerbuino Bee, Cobra-2 and Raptor
// In this application for Cerbuino Bee the Bluetooth-Module is connected to Socket 2, the GHI Button-Module to Socket 3
// and optinally an rs232 Module on Socket 1
// The application was created on Visual Studio 2012 Express, NETMF Version 4.2, GHI SDK Version 2013 R3
// 
// When the application is deployed and started, the LEDs on the Bluetooth Module should blink alternating blue and red.
// If they do not blink blue and red, press the Button Module to enter pairing mode.
// Then the pairing with your Windows PC should be done according to your Windows Version. As Pairing code enter "0000".
// After successful pairing you have look, which serial ports are used for for the Bluetooth connection by your PC
// Then you can start e.g. Teraterm in Tab "File" open a new serial connectin with one of the two serial ports that are
// used for the bluetooth connection by your PC (one of the two should work)
// If the connection is established you'll receive a Message: "Hello from TinCLR, Message Nr. xx" every second
//
// Instead of using serial ports you can use the a connection through the 32feet.net library as shown in my
// GHI CodeShare entry "FEZ/PC Bluetooth File Transfer Server/Client"

// Note:
// *******************  Reference: Gadgeteer.Serial  must be added   *****************************

using System;
using System.Collections;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Controls;
using Microsoft.SPOT.Presentation.Media;
using Microsoft.SPOT.Touch;
using Gadgeteer.Networking;
using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;
using GTI = Gadgeteer.Interfaces;
using Gadgeteer.Modules.RoSchmi;
using Gadgeteer.Modules.GHIElectronics;

namespace Bluetooth_Pairing_Test
{
    public partial class Program
    {
            //**********    Presets:  Parameter to be changed by users  ***************************
            
            const string MyDeviceName = "MySpider";   // Device Name
            const string MyPinCode = "0000";            // Pin Code
            const int MySocketNumber = 11;               // The SocketNumber of the mainboard to which the BT-Module is connected
            const long BT_Device_Baudrate = 38400;      // Baudrate
                                                        // possible baudrates 9600, 19200, 38400, 57600, 115200, 230400, 460800

            const bool ReadMode_ByteArray = false;       // false: data are received as strings -Event: bluetooth_DataReceived
                                                        // true: data are received as byte array-Event: bluetooth_DataByteArrayReceived

            const bool FastReadMode = true;             // true: switch to transmit without parsing
                                                        // false: data are always parsed for BT-module messages

            const int MyEventDelay = 20;                // Choose higher value if data received events queue up ( 20 = standard)
                                                        // has no effect in ReadMode_ByteArray Mode in combination with FastReadMode 

            const int SendInterval = 1000;              // In this time interval  we send a message to the BT-Module

            //**************** End Parameter to be changed by user ***************************

            static private Bluetooth bluetooth;
            static private Bluetooth.Client client;

            static int MessageCounter = 0;    // Counter to count the sent messages

            static long BytesTransferred = 0;
            static long LastBytesTransferred = 0;
            static long baudrate = 0;
            static long events = 0;
            static long lastevents = 0;
            static long eventspersec = 0;
            static long showEvent = 0;

            byte[] datadrain = new byte[2000];  // Dummy, here we can put the received data
            
            // timerSendData is used to fire in interval to send data to the BT-Module
            GT.Timer timerSendData;

            // timer, used to calculate statistics every 2 seconds (not needed in applications)
            GT.Timer CalculateBaudrate;
         
            // timerEnterPairing is used to enter pairing mode automatically
            GT.Timer timerEnterPairing;

            string dataLine1 = null;      // used to process incoming data in eventhandler: bluetooth_DataReceived (as String)
            string dataLine2 = null;      // used to process incoming data in eventhandler: bluetooth_DataByteArrayReceived (as Byte Array)
            byte[] ReceivedBytes;         // used to process incoming data in eventhandler: bluetooth_DataReceived (as String)
            SerialBuffer mySerialBuffer;  // used to connect incoming data chunks and split after LineFeed (0x0A)

            #region ProgramStarted()
            // This method is run when the mainboard is powered up or reset.   
            void ProgramStarted()
            {
                Debug.Print("Program Started");

                // Set up an optional RS232 Module with baudrate 38400 to send data to another PC
                // you can leave it away if you have no RS232 module
                //******************************************************************
                /*
                try
                {
                    rs232.Initialize(38400, GTI.Serial.SerialParity.None, GTI.Serial.SerialStopBits.One, 8, GTI.Serial.HardwareFlowControl.NotRequired);
                }
                catch (Exception e)
                {
                    Debug.Print(e.ToString());
                }
                if (!rs232.serialPort.IsOpen)
                {
                    rs232.serialPort.Open();
                }*/
                
                // *****************************************************************

                // Event handler for button to enter pairing mode
                button.ButtonPressed += new Button.ButtonEventHandler(button_ButtonPressed);

                // Set a timer to enter pairing mode after 3 seconds
                timerEnterPairing = new GT.Timer(3000,GT.Timer.BehaviorType.RunOnce);
                timerEnterPairing.Tick +=new GT.Timer.TickEventHandler(timerEnterPairing_Tick);

                // Set a timer to send data to the BT-Module in intervals
                timerSendData = new GT.Timer(SendInterval);
                timerSendData.Tick += new GT.Timer.TickEventHandler(timerSendData_Tick);
                timerSendData.Stop();

                CalculateBaudrate = new GT.Timer(2000, GT.Timer.BehaviorType.RunContinuously);
                CalculateBaudrate.Tick += new GT.Timer.TickEventHandler(CalculateBaudrate_Tick);
                CalculateBaudrate.Start();


                // define a bluetooth module running on socket: "MySocketNumber", baudrate: "BT_Device_Baudrate"
                Debug.Print("Program Message: Initialize Bluetooth module on Port " + MySocketNumber.ToString() 
                             + " Baudrate: " + BT_Device_Baudrate.ToString());
                bluetooth = new Bluetooth(MySocketNumber, BT_Device_Baudrate);

                bluetooth.EventDelay = MyEventDelay;  // Choose higher value in "Presets" if data received events queue up ( 20 = standard)
                                                      // has no effect in ReadMode_ByteArray Mode in combination with FastReadMode 

                // Set the Mode to receive data as Strings or as Byte Array depending on the settings in "Presets"
                bluetooth.SetReadMode_ByteArray(ReadMode_ByteArray);

                // Set up eventhandler for state changes
                bluetooth.BluetoothStateChanged += new Bluetooth.BluetoothStateChangedHandler(bluetooth_BluetoothStateChanged);

                // Set up eventhandler to receive data from the Bluetooth module as Strings or as Byte Arrays (only one is needed)
                bluetooth.DataReceived += new Bluetooth.DataReceivedHandler(bluetooth_DataReceived);
                bluetooth.DataByteArrayReceived += new Bluetooth.DataByteArrayReceivedHandler(bluetooth_DataByteArrayReceived);

                Debug.Print("Program Message: Set Bluetooth module to Client Mode" + "\r\n");
                client = bluetooth.ClientMode;
                Thread.Sleep(200);

                Debug.Print("Program Message: Set Device Name: " + MyDeviceName + "\r\n");
                bluetooth.SetDeviceName(MyDeviceName);
                Thread.Sleep(2000);                     // time was not tested

                Debug.Print("Program Message: Set Device Pincode" + "\r\n");
                bluetooth.SetPinCode(MyPinCode);
                Thread.Sleep(2000);                     // time was not tested

                /*
                Debug.Print("Program Message: Set BT-Device to: Disable Auto-connect " + "\r\n");
                bluetooth.DisableAutoConnect();
                Thread.Sleep(200);
                */
                
                Debug.Print("Program Message: Set BT-Device to: Enable Auto-connect " + "\r\n");
                bluetooth.PermitAutoConnect();
                Thread.Sleep(200);                      // time was not tested
                
                Debug.Print("Program Message: Set BT-Device to: PermitBeConnected" + "\r\n");
                bluetooth.PermitBeConnected();
                Thread.Sleep(200);                      // time was not tested

                bluetooth.serialPort.DiscardInBuffer();
                bluetooth.serialPort.DiscardOutBuffer();
                Thread.Sleep(200);

                mySerialBuffer = new SerialBuffer(256);

                timerSendData.Start();
                timerEnterPairing.Start();
            }
            #endregion

            #region CalculateBaudrate_Tick  (this is needed only to calaculate statistics)
            void CalculateBaudrate_Tick(GT.Timer timer)
            {
                baudrate = ((BytesTransferred - LastBytesTransferred) / 2) * 10;
                LastBytesTransferred = BytesTransferred;
                eventspersec = (events - lastevents) / 2;
                lastevents = events;
            } 
            #endregion


            #region timerSendData_Tick   Sends a message over the Bluetooth Connection
            void timerSendData_Tick(GT.Timer timer)
            {
                //Debug.Print("Program Message: ____________________________timerSendData ticked");
                // check to see that the bluetooth module is connected, and if so send a message over the connection
                if (bluetooth.IsConnected)
                {
                    //Debug.Print("Program Message: BT is connected, so I send the message: " + "Hello from TinyClr, Message No.: " + MessageCounter.ToString());

                    client.Send("Hello from TinyClr, Message No.: " + MessageCounter.ToString() + "\r\n");
                    MessageCounter++;
                }
                else
                {
                    Debug.Print("Program message: BT is not connected, cannot send message");
                }
            }
            #endregion

            #region button_ButtonPressed    Enter Pairing Mode
            void button_ButtonPressed(Button sender, Button.ButtonState state)
            {
                // check to see that the bluetooth module is connected, and if so do nothing
                if (bluetooth.IsConnected)
                {
                    Debug.Print("Program Message: You pressed the button but BT was connected, so not activating pairing mode");
                }
                // otherwise, just go into first-time pairing mode.
                else
                {
                    Debug.Print("Program Message: You pressed the button and BT was not connected, so I go to pairing mode");
                    client.EnterPairingMode();
                }
            }
            #endregion

            #region timerEnterPairing_Tick    Enter Pairing Mode
            void timerEnterPairing_Tick(GT.Timer timer)
            {
                if (!bluetooth.IsConnected)
                {
                    Debug.Print("Enter pairing mode by timer event");
                    client.EnterPairingMode();
                }
            }
            #endregion

            // You have the choice to receive the data as strings or as ByteArrays. You need only one

            #region  Eventhandler --  Receive data as Strings
            // Select this output mode with the  bluetooth.SetReadMode_ByteArray(false) command
            private void bluetooth_DataReceived(Bluetooth sender, string data)
            {
               ReceivedBytes = System.Text.UTF8Encoding.UTF8.GetBytes(data);
               mySerialBuffer.LoadSerial(ReceivedBytes, 0, ReceivedBytes.Length);

                // To see the chunks of data we can activate this Debug.Print
                //Debug.Print("\r\n Program Message: Received chunk of data (String Mode). Byte-Count: " + data.Length.ToString() + " Data: " + HexEncoding.ToString(ReceivedBytes, 0, ReceivedBytes.Length) + "\r\n" + data + "\r\n");

                
                while ((dataLine1 = mySerialBuffer.ReadLine()) != null)
                {
                   // Debug.Print("Line Received: " + dataLine1);
                    // If we have a RS232 module connected we can send the received data to another PC
                      rs232.serialPort.Write(dataLine1 + "\r\n");

                    // parse the data sentence here if needed
                }
               
            }
            #endregion

            #region  Eventhandler --  Receive data as Byte Arrays
            // Select this output mode with the  bluetooth.SetReadMode_ByteArray(true) command
            void bluetooth_DataByteArrayReceived(Bluetooth sender, byte[] data, int startIndex, int ByteCount)
            {
                BytesTransferred += ByteCount;
                events++;
                Array.Copy(data, startIndex, datadrain, 0, ByteCount);  // Dummy for the time it takes to get the data (they are not valid for a long time)
                

                // *************************************************************************************
                // if we want to see from time to time a short segment of the data, we send them over rs232
                // we cannot see longer segments as we get buffer overflows
                /*
                if ((events > showEvent + 50) && (events < showEvent + 53))  // arbitrary values to show some transmitted data
                {
                    mySerialBuffer.LoadSerial(data, startIndex, ByteCount);
                    showEvent = events;
                }
                */
                // ************************************************************************************
                
                if (ByteCount < 100)   // for short messages we send it over rs232
                {
                    mySerialBuffer.LoadSerial(data, startIndex, ByteCount);
                }
                else                  // for high speed data we only send the statistics
                {
                    rs232.serialPort.Write("Bytes Transferred: " + BytesTransferred.ToString() + "  Bytes per event: " + ByteCount.ToString() + " Estimated Baudrate: " + baudrate.ToString() + " Received Events per sec:  " + eventspersec.ToString() + "\r\n");
                }
                while ((dataLine2 = mySerialBuffer.ReadLine()) != null)
                {
                    // If we have a RS232 module connected we can send the received data to another PC
                    rs232.serialPort.Write(dataLine2 + "\r\n");

                    // parse the data sentence here if needed
                }
            }
            #endregion

            #region  Eventhandler signalizing that the BTSTATE of the Bluetooth module has changed
            void bluetooth_BluetoothStateChanged(Bluetooth sender, Bluetooth.BluetoothState btState)
            {
                // here the bluetooth module's state has changed. First, just debug print the value so we know what is happening
                Debug.Print("New state:" + btState.ToString());

                // If the state is now "connected", we can do stuff over the link.
                if (btState == Bluetooth.BluetoothState.Connected)
                {
                    Debug.Print("\r\n Program Message: BT-Connection established, BTSTATE: " + btState.ToString() + "\r\n");

                    bluetooth.SetFastReadMode(FastReadMode);  // Set fastReadMode, depending on the flag in presets
                   
                    Thread.Sleep(1000);      // do this to wait for BT module to connect; 
                    client.Send("\r\nConnected to Fez\r\n");
                }
                // if the state is now "disconnected", you might need to stop other processes but for this example we'll just confirm that in the debug output window
                if (btState != Bluetooth.BluetoothState.Connected)
                {
                   // Debug.Print("\r\n" + "Program Message: Bluetooth disconnected, BTSTATE: " +  btState.ToString() + "\r\n");
                }
            }
            #endregion
    }
}

No device found.

I don’t know what to do to get my module to work.

greetings
Dave

Hi,
I can try to help you to get the example of my Code Share project running.
To use my driver you may not connect the Bluetooth module with the designer.
Did you get any error Messages when you run the the project?
Cheers
Roland

Thanks in advance.

If I run the Project, I will receive these output:

[quote]Found debugger!

Create TS.

Loading start at a0e00000, end a0e1383c

Assembly: mscorlib (4.2.0.0) Assembly: Microsoft.SPOT.Native (4.2.0.0) Assembly: Microsoft.SPOT.Security.PKCS11 (4.2
.0.0) Assembly: System.Security (4.2.0.0) Loading Deployment Assemblies.

Attaching deployed file.

Assembly: Microsoft.SPOT.Hardware.PWM (4.2.0.1) Attaching deployed file.

Assembly: Microsoft.SPOT.Hardware.SerialPort (4.2.0.0) Attaching deployed file.

Assembly: Gadgeteer (2.42.0.0) Attaching deployed file.

Assembly: Microsoft.SPOT.Graphics (4.2.0.0) Attaching deployed file.

Assembly: Microsoft.SPOT.Hardware (4.2.0.0) Attaching deployed file.

Assembly: Microsoft.SPOT.IO (4.2.0.0) Attaching deployed file.

Assembly: Gadgeteer.Serial (2.42.0.0) Attaching deployed file.

Assembly: GHI.Premium.IO (4.2.11.1) Attaching deployed file.

Assembly: GTM.GHIElectronics.Button (4.2.102.0) Attaching deployed file.

Assembly: Microsoft.SPOT.TinyCore (4.2.0.0) Attaching deployed file.

Assembly: System.IO (4.2.0.0) Attaching deployed file.

Assembly: GHI.Premium.System (4.2.11.1) Attaching deployed file.

Assembly: Bluetooth_Pairing_Test (1.0.0.0) Attaching deployed file.

Assembly: Microsoft.SPOT.Net (4.2.0.0) Attaching deployed file.

Assembly: GTM.GHIElectronics.RS232 (4.2.102.0) Attaching deployed file.

Assembly: GHI.Premium.Hardware (4.2.11.1) Attaching deployed file.

Assembly: GHIElectronics.Gadgeteer.FEZSpider (4.2.102.0) Resolving.

GC: 1msec 31392 bytes used, 7308276 bytes available

Type 0F (STRING ): 24 bytes

Type 15 (FREEBLOCK ): 7308276 bytes

Type 17 (ASSEMBLY ): 29532 bytes

Type 1E (BINARY_BLOB_HEAD ): 1332 bytes

Type 28 (MEMORY_STREAM_HEAD ): 36 bytes

Type 29 (MEMORY_STREAM_DATA ): 396 bytes

Type 34 (APPDOMAIN_HEAD ): 72 bytes

GC: performing heap compaction…

The debugging target runtime is loading the application assemblies and starting execution.
Ready.

‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\mscorlib.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Native.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Security.PKCS11.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\System.Security.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.PWM.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.SerialPort.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Graphics.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.TinyCore.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Net.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.IO.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\System.IO.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Gadgeteer\Core\Assemblies.NET Micro Framework 4.2\le\Gadgeteer.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Gadgeteer\Core\Assemblies.NET Micro Framework 4.2\le\Gadgeteer.Serial.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\GHI Electronics\GHI Premium NETMF v4.2 SDK\Assemblies\le\GHI.Premium.System.dll’
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\GHI Electronics\GHI Premium NETMF v4.2 SDK\Assemblies\le\GHI.Premium.IO.dll’
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\GHI Electronics\GHI .NET Gadgeteer SDK\Modules\Button\NETMF 4.2\le\GTM.GHIElectronics.Button.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\GHI Electronics\GHI .NET Gadgeteer SDK\Modules\RS232\NETMF 4.2\le\GTM.GHIElectronics.RS232.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\GHI Electronics\GHI Premium NETMF v4.2 SDK\Assemblies\le\GHI.Premium.Hardware.dll’
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\GHI Electronics\GHI .NET Gadgeteer SDK\Mainboards\FEZSpider\NETMF 4.2\le\GHIElectronics.Gadgeteer.FEZSpider.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Users\username\Downloads\Bluetooth_Pairing_Test\Bluetooth_Pairing_Test\bin\Debug\le\Bluetooth_Pairing_Test.exe’, Symbols loaded.
The thread ‘’ (0x2) has exited with code 0 (0x0).
Using mainboard GHI Electronics FEZSpider version 1.0
Program Started
Program Message: Initialize Bluetooth module on Port 11 Baudrate: 38400
Message from Class Bluetooth 1: Baudrate set to 38400
Message from Class Bluetooth: Try to set BT-Module baudrate to: 38400
Message from Class Bluetooth: Could connect to BT-Module with baudrate 38400 in 58.950400000000002 msec
Program Message: Set Bluetooth module to Client Mode

Client Mode
Program Message: Set Device Name: MySpider

Program Message: Set BT-Device to: PermitBeConnected

#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message: 
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####

A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
New state:0
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
New state:1
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
New state:3
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
The thread ‘’ (0x3) has exited with code 0 (0x0).
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
New state:0
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
New state:1
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
New state:3
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
New state:0
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
New state:1
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
New state:3
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
Program message: BT is not connected, cannot send message
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
New state:0
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
New state:1
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
New state:3
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
Program message: BT is not connected, cannot send message
Program message: BT is not connected, cannot send message
Enter pairing mode by timer event
Enter Pairing Mode
Program message: BT is not connected, cannot send message
Program message: BT is not connected, cannot send message
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
Program message: BT is not connected, cannot send message
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
New state:2
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
Program message: BT is not connected, cannot send message
New state:1
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
Program message: BT is not connected, cannot send message
Program message: BT is not connected, cannot send message
Program message: BT is not connected, cannot send message
[…]
[/quote]

Okay that’s crazy. Now in the 20’th run. the blue and red led toggle and I can see the device.

But it doesn’t work everey time.

Okay it was luck. Only one time it works.

If I start running, in the state 2 it works a little time and then not anymore.

I don’t receive the error messages every run.

Hi,
I suspect that at least the following eventhandler do not work:

 bluetooth.DataReceived += new Bluetooth.DataReceivedHandler(bluetooth_DataReceived);
bluetooth.DataByteArrayReceived += new Bluetooth.DataByteArrayReceivedHandler(bluetooth_DataByteArrayReceived);
 

I would do the following:

  1. Comment out the methods of the two eventhandler.
  2. Comment out the creation of the eventhandlers in the Program.Started method.

Then type on your keyboard (not copy and paste)for the first eventhandler:

bluetooth.DataReceived +=
and two times Tab. So Visual Studio will create new the eventhandler and the method for the eventhandler. With copy and paste fill the new created method with the appropriate Code.
Do the same with the second eventhandler.

Cheers
Roland

Okay, now sometimes it works but, I receive the output.

[quote]Found debugger!

Create TS.

Loading start at a0e00000, end a0e1383c

Assembly: mscorlib (4.2.0.0) Assembly: Microsoft.SPOT.Native (4.2.0.0) Assembly: Microsoft.SPOT.Security.PKCS11 (4.2
.0.0) Assembly: System.Security (4.2.0.0) Loading Deployment Assemblies.

Attaching deployed file.

Assembly: Microsoft.SPOT.Hardware.PWM (4.2.0.1) Attaching deployed file.

Assembly: Microsoft.SPOT.Hardware.SerialPort (4.2.0.0) Attaching deployed file.

Assembly: Gadgeteer (2.42.0.0) Attaching deployed file.

Assembly: Microsoft.SPOT.Graphics (4.2.0.0) Attaching deployed file.

Assembly: Microsoft.SPOT.Hardware (4.2.0.0) Attaching deployed file.

Assembly: Microsoft.SPOT.IO (4.2.0.0) Attaching deployed file.

Assembly: Gadgeteer.Serial (2.42.0.0) Attaching deployed file.

Assembly: GHI.Premium.IO (4.2.11.1) Attaching deployed file.

Assembly: GTM.GHIElectronics.Button (4.2.102.0) Attaching deployed file.

Assembly: Microsoft.SPOT.TinyCore (4.2.0.0) Attaching deployed file.

Assembly: System.IO (4.2.0.0) Attaching deployed file.

Assembly: GHI.Premium.System (4.2.11.1) Attaching deployed file.

Assembly: Bluetooth_Pairing_Test (1.0.0.0) Attaching deployed file.

Assembly: Microsoft.SPOT.Net (4.2.0.0) Attaching deployed file.

Assembly: GTM.GHIElectronics.RS232 (4.2.102.0) Attaching deployed file.

Assembly: GHI.Premium.Hardware (4.2.11.1) Attaching deployed file.

Assembly: GHIElectronics.Gadgeteer.FEZSpider (4.2.102.0) Resolving.

GC: 1msec 31392 bytes used, 7308276 bytes available

Type 0F (STRING ): 24 bytes

Type 15 (FREEBLOCK ): 7308276 bytes

Type 17 (ASSEMBLY ): 29532 bytes

Type 1E (BINARY_BLOB_HEAD ): 1332 bytes

Type 28 (MEMORY_STREAM_HEAD ): 36 bytes

Type 29 (MEMORY_STREAM_DATA ): 396 bytes

Type 34 (APPDOMAIN_HEAD ): 72 bytes

GC: performing heap compaction…

The debugging target runtime is loading the application assemblies and starting execution.
Ready.

‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\mscorlib.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Native.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Security.PKCS11.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\System.Security.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.PWM.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.SerialPort.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Graphics.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.TinyCore.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Net.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.IO.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\System.IO.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Gadgeteer\Core\Assemblies.NET Micro Framework 4.2\le\Gadgeteer.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Gadgeteer\Core\Assemblies.NET Micro Framework 4.2\le\Gadgeteer.Serial.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\GHI Electronics\GHI Premium NETMF v4.2 SDK\Assemblies\le\GHI.Premium.System.dll’
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\GHI Electronics\GHI Premium NETMF v4.2 SDK\Assemblies\le\GHI.Premium.IO.dll’
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\GHI Electronics\GHI .NET Gadgeteer SDK\Modules\Button\NETMF 4.2\le\GTM.GHIElectronics.Button.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\GHI Electronics\GHI .NET Gadgeteer SDK\Modules\RS232\NETMF 4.2\le\GTM.GHIElectronics.RS232.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\GHI Electronics\GHI Premium NETMF v4.2 SDK\Assemblies\le\GHI.Premium.Hardware.dll’
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\GHI Electronics\GHI .NET Gadgeteer SDK\Mainboards\FEZSpider\NETMF 4.2\le\GHIElectronics.Gadgeteer.FEZSpider.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Users\dlange\Downloads\Bluetooth_Pairing_Test\Bluetooth_Pairing_Test\bin\Debug\le\Bluetooth_Pairing_Test.exe’, Symbols loaded.
The thread ‘’ (0x2) has exited with code 0 (0x0).
Using mainboard GHI Electronics FEZSpider version 1.0
Program Started
Program Message: Initialize Bluetooth module on Port 11 Baudrate: 38400
Message from Class Bluetooth 1: Baudrate set to 38400
Message from Class Bluetooth: Try to set BT-Module baudrate to: 38400
Message from Class Bluetooth: Could connect to BT-Module with baudrate 38400 in 58.921600000000005 msec
Program Message: Set Bluetooth module to Client Mode

Client Mode
Program Message: Set Device Name: MySpider

Program Message: Set BT-Device to: PermitBeConnected

#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message: 
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####

A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
New state:0
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
New state:1
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
New state:3
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
The thread ‘’ (0x3) has exited with code 0 (0x0).
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
New state:0
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
New state:1
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
New state:3
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
Program message: BT is not connected, cannot send message
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
New state:0
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
New state:1
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
New state:3
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
Program message: BT is not connected, cannot send message
Enter pairing mode by timer event
Enter Pairing Mode
Program message: BT is not connected, cannot send message
Program message: BT is not connected, cannot send message
Program message: BT is not connected, cannot send message
Enter pairing mode by timer event
Enter Pairing Mode
Program message: BT is not connected, cannot send message
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
Program message: BT is not connected, cannot send message
New state:1
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
Program message: BT is not connected, cannot send message
Enter pairing mode by timer event
Enter Pairing Mode
Program message: BT is not connected, cannot send message
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
Program message: BT is not connected, cannot send message
New state:2
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
Program message: BT is not connected, cannot send message
New state:2
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
Program message: BT is not connected, cannot send message
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
New state:2
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 0036] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
Program message: BT is not connected, cannot send message
Program message: BT is not connected, cannot send message
Program message: BT is not connected, cannot send message
[…][/quote]

But the Device not realize, that I’m connected with my phone
“Program message: BT is not connected, cannot send message”

If I try to send a file I don’t see the device.

Hi,
no, it does not work! There may be no exceptions.

in the method:
private void bluetooth_DataReceived(Bluetooth sender, string data)

type the Command

Debug.Print(" I arrived in the eventhandler");

in the first line of the method
or set a breakpoint.

I think the method is never reached.

[quote] I arrived in the eventhandler
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 003d] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
Program message: BT is not connected, cannot send message
I arrived in the eventhandler
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 003d] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
New state:1
I arrived in the eventhandler
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### Bluetooth_Pairing_Test.Program::bluetooth_DataReceived [IP: 003d] ####
#### Gadgeteer.Modules.RoSchmi.Bluetooth::OnDataReceived [IP: 002b] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Bluetooth_Pairing_Test.exe
Error invoking method “Gadgeteer.Modules.RoSchmi.Bluetooth” (check arguments to Program.BeginInvoke are correct)
Program message: BT is not connected, cannot send message[/quote]

I have no RS232 module, in your comments I have to comment out your initialization, but here it use the module?

How the device can receive messages If I do not see the device?

O.K.
very good, we see that we arrive in the eventhandler method.
Please comment out the line with the rs232 Module in the Event handler. This can be the reason for the exception.

To test how far you get in the eventhandler, you can include different Debug.Print (“I arrived here, No. 1”) and so on Messages, that will give more Information.

The Bluetooth module sends Messages on commands like O.K. or ERROR that arrive through the eventhandler.

Edit:

Activate the line:
//Debug.Print("Line Received: " + dataLine1);

Okay,

no error messages.

[quote]Using mainboard GHI Electronics FEZSpider version 1.0
Program Started
Program Message: Initialize Bluetooth module on Port 11 Baudrate: 38400
Message from Class Bluetooth 1: Baudrate set to 38400
Message from Class Bluetooth: Try to set BT-Module baudrate to: 38400
Message from Class Bluetooth: Could connect to BT-Module with baudrate 38400 in 58.913600000000002 msec
Program Message: Set Bluetooth module to Client Mode

Client Mode
Program Message: Set Device Name: MySpider

Program Message: Set BT-Device to: PermitBeConnected

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received:

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received: +

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received: OK

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received:

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received: +STNA=MySpider

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received:

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received: OK

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received:

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received: WORK:SLAVER

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received:

New state:0
I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received: +BTSTATE:0

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received:

New state:1
I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received: +BTSTATE:1

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received:

New state:3
I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received: +BTSTATE:3

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received:

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received: OK

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received:

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received: WORK:SLAVER

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received:

New state:0
I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received: +BTSTATE:0

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received:

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received: +STAUTO=1

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received:

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received: OK

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received:

New state:1
I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received: +BTSTATE:1

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received:

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received: +STOAUT=1

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received:

New state:3
I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received: +BTSTATE:3

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received:

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received: OK

Program message: BT is not connected, cannot send message
I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received:

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received: WORK:SLAVER

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received:

New state:0
I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received: +BTSTATE:0

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received:

New state:1
I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received: +BTSTATE:1

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received:

New state:3
I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received: +BTSTATE:3

Program message: BT is not connected, cannot send message
The thread ‘’ (0x3) has exited with code 0 (0x0).
Program message: BT is not connected, cannot send message
Enter pairing mode by timer event
Enter Pairing Mode
I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received:

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received:

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received: OK

I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received:

New state:2
I arrived in the eventhandler
Serial in mySerialBuffer Loaded
Line Received: +BTSTATE:2
[…][/quote]

In the last lines, in state 2 the bluetooth module blinks red and blue, but to short time to see the device. after it only blinks blue and its not seen

void bluetooth_DataReceived(Bluetooth sender, string data)
            {
                Debug.Print(" I arrived in the eventhandler");
                ReceivedBytes = System.Text.UTF8Encoding.UTF8.GetBytes(data);
                mySerialBuffer.LoadSerial(ReceivedBytes, 0, ReceivedBytes.Length);
                Debug.Print(" Serial in mySerialBuffer Loaded");
                // To see the chunks of data we can activate this Debug.Print
                //Debug.Print("\r\n Program Message: Received chunk of data (String Mode). Byte-Count: " + data.Length.ToString() + " Data: " + HexEncoding.ToString(ReceivedBytes, 0, ReceivedBytes.Length) + "\r\n" + data + "\r\n");


                while ((dataLine1 = mySerialBuffer.ReadLine()) != null)
                {
                    Debug.Print("Line Received: " + dataLine1);
                    // If we have a RS232 module connected we can send the received data to another PC
                    //rs232.serialPort.Write(dataLine1 + "\r\n");

                    // parse the data sentence here if needed
                }
            }

Ok,
Looks good. If you have it already listed as a Bluetooth device in your PC or Phone, first delete it there, that it cannot connect before you notice it. If it does not blink blue and red for a longer time, press the button to enter Pairing mode. Which Windows Version doe you use? You can now delete the Debug.Print Messages in the Event handler.
Open for exampe teraterm and try to get a Connection.

So,
my phone has Android 4.* and because on my pc is no bluetooth device, I use a mac book pro.

If I press the button, the blue and red led blinking and the device start pairing mode. I can see the device on phone and mac. I can connect to, but not send any things. The device do not realize, that somebody is connected to and in Output message “BT is not connected, …”

But the first step is done, no error messages and I can see the device.

Edit:
Okay If I try to send a file to the device with my macbook, here the device is not connected, if I connect there, it is connected for 1 second and than disconnected again.

Hi,
now everything seems to work from the Spider side. On the other side you need a device that supports the Bluetooth Serial Port Profile SPP or the RFComm protocol. Android should Support SPP but I never tried. I suggest that you buy one of those very cheap USB Bluetooth Dongles for your Windows PC.
The Software on the Spider will say “connected” if an appclication from the PC or Phone side connects through SPP or RFComm.

Edit: As far as I know nobody reported from a working serial communiction from Apple products (e.g. i-phone or i-pad) to the GHI Gadegteer Bluetooth module. So I suspect that it will not work with the Mac Book as well.
For the usual Bluetooth file Transfer from e.g. PC to Phone you Need the the Bluetooth OBEX Protocol on both sides. OBEX in not supported by the GHI Bluetooth module.
For file Transfer through the GHI BT Module you can have a look on my other Code Share Projects.

Thank you for your help.
I’ll buy a usb-dongle to test, but the problem is, I need to connect with smartphone, because later, it have to communicate with a smartphone app.

But the device not realize my connected smarphone. I connected with my smarphone, but no ‘connected’ in the output.

Not before your application on the phone connects you will get the “Connected” message on the Spider side.

It works.

I had to activate the SPP with donwloading a smartpohne app like e.g.: Link to the BLueSPP App

Thanks a lot.

[quote]New state:4

Program Message: BT-Connection established, BTSTATE: 4

Set fastReadMode: True[/quote]

SPP is deactivated in smartphones as default.

Can I connect the bluetooth module with an iphone? IPhone don’t use the SPP-protocol. Can I use other protocols on the bluetooth module to connect with an iphone?

No, as far as I know there is no way to communicate with an i-phone via the GHI Bluetooth Module, the module can only use SPP or RFComm.

It should work with justin’s Bluetooth-smart module

https://www.ghielectronics.com/community/creations/entry/20

There is an application that uses the GHI bluetooth module with a Windows phone 8 Device Via RFComm