I've been trying to set up simple Bluetooth communication between my Edison board and a Windows PC. Ideally, I would like Windows to see the Edison as a standard COM port so that it can treat it like any COM port.
I have looked through many of the forum questions on the matter and I did read the pertinent sections of the Edison BT manual. Running "bluetoothctl", my Edison is telling me that I am paired with my desktop system and my desktop system seems to agree. Furthermore, when I look in Windows Device Manager, I am seeing, not one, but five "Standard Serial over Bluetooth link (COMxx)". Which leads me to my first question: Why so many? One would suffice - one that works, I mean. Which one should I attempt to connect with? I know that this is not a Windows system forum, but if anyone understands this, please enlighten me.
Next: I am writing an application in C++ over on the Edison side which will interact with the Windows system through this virtual serial port. My question is, assuming I am paired with the remote Windows system, what do I need to do to get the Edison to stream data in and out? How do I get it to act like a serial port? What do I look for? Do I refer to this port as a device that you open and close? Is it a socket? Is it like opening a file that you read and write to? Where is it? What is it's name?
Thanks for reaching out!
In the following thread you will find how we were able to create a SPP connection to a Windows PC:
https://communities.intel.com/message/408584# 408584 https://communities.intel.com/message/408584# 408584
In that thread it is mentioned that there was an issue with SPP on images 3.0 and up. However, this was due to the BlueZ version and you will find how to fix this issue on the latest image in the following guide:
I hope this information helps you,
Thanks for your response.
When you refer to "BlueZ", are you referring to the program that I invoke by typing: "bluetoothctl" ?
If so, when I am in the "bluetoothctl" environment and I type "version", it reports V5.37. Does this mean I am not subject to this problem you are referring to?
BlueZ is the package that handles all of the Bluetooth services. In fact version 5.37 of BlueZ is the one with issues, you can avoid the issues by using version 5.22. You can learn how to install version 5.22 of BlueZ in the guide I shared above.
OK. I followed the link about falling back to BlueZ 5,22 and I followed the instructions to the letter.
I should point out that my "bluetooth.conf" file did not look like the one shown in the instructions. Several of the lines were missing, including the two lines between which I was supposed to add the new line. So, I don't know where that leaves me. Should I add those missing lines as well?
My "bluetooth.conf" file looked like this:
<!-- This configuration file specifies the required security policies
for Bluetooth core daemon to work. -->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
<!-- ../system.conf have denied everything, so we just punch some holes -->
No, it is not necessary that you modify bluetooth.conf if you are on the latest image. This was needed on previous images, I will request to add this note on the guide I shared with you.
Right now, you only need to follow the steps on the beginning in order to make SPP available on your Edison. You can follow the rest of the guide to test SPP with SPP-loopback.py or you can follow the steps in the thread I also shared above in order to create a SPP connection with Windows.