Bluetooth to serial adapter - exclude connection

currently recording application to connect to device "BTLink Bluetooth to Serial Adapter"

Additional information about the device: device specification Created the following code:

    BluetoothAddress btAddress = null;
    if (!BluetoothAddress.TryParse(comboBoxDevices.SelectedValue.ToString().Trim(), out btAddress))
            throw new Exception(String.Format("Adress: {0} wrong !", comboBoxDevices.SelectedValue.ToString().Trim()));
    BluetoothEndPoint endPoint = new BluetoothEndPoint(btAddress, BluetoothService.DialupNetworking);
    _bluetoothClient.Connect(endPoint);

      

I've tested two types of GUIDs: BluetoothService.DialupNetworking, BluetoothService.SerialPort. I got this message: "No connection could be made because the target machine actively refused it" What's wrong?

Regards, mykhaylo

0


source to share


3 answers


I first tried to connect to the target machine using the built-in bluetooth functionality. Only after that will I try to connect to it programmatically.

To connect to a Bluetooth device, you need to know the following:



  • Use Bluetooth profile. Have you tried both Serial and Dialup, but which one is really needed? Many devices only support one profile and will refuse to connect to another device asking for an unsupported service.
  • Authentication information. Some devices require a predefined password.
  • Many devices can only pair with one BT device. Is the target device already connected somewhere else?

The error you are experiencing is most likely related to one of the above and not related to using the bluetooth library.

+1


source


Have you checked with 32Feet.net or your support forums (provider of the classes you are using )?



+1


source


I did a similar installation and program using a standard bluetooth serial adapter with no problem. You must make sure you are using the correct Bluetooth profile, the port must be available and the authentication code must be accepted. Just a few suggestions.

+1


source







All Articles