My first suggestion would be that you try sending the data directly from the Edison's Linux console to your target (either on OSX or Linux) before trying to write the code for it.
Do you have to use BLE or can you use traditional Bluetooth? If you must use BLE you should install GattTool, you can learn how to do it in Using the Generic Attribute Profile. I would suggest you to read Introduction to Bluetooth LE, that document is very informative and might help you understand how BLE works. Also, Get started with Bluetooth Low Energy might be of help for you to get started with GattTool.
You might also be interested in reading the Edison's Bluetooth User Guide, it contains a lot of information about the Edison's Bluetooth capabilities. I hope this information gives you a hint on where to start with your project.
Thanks Peter. I have to use BLE in my project. I tried installing Gatttool as mentioned in link: https://software.intel.com/en-us/articles/using-the-generic-attribute-profile-gatt-in-bluetooth-low-energy-with-your-intel-edison. I am able to scan and discover BLE devices using bluetoothctl command but not using hcitool lescan.
hcitool lescan command does not detect my Iphone6 in the discovered devices. what could be the reason? Also, I am unable to connect using gatttool. Following is the error.
root@edison:~# export PATH=$PATH:~/bluez-5.24/attrib/
root@edison:~# gatttool -b 4C:7C:5F:35:8B:9F -I
Attempting to connect to 4C:7C:5F:35:8B:9F
Error: connect error: Connection refused (111)
That's because you are searching for LE devices, an iPhone will not be found as a LE device even though it is compatible with them, you will be able to find your iPhone if you run the command hcitool scan.
when I run the hcitool lescan command it does not detect/list Iphone6. Do I need to load the image on Edison? I have installed integrated MAC OS installer and not the image. Please let me know how to go further to connect using gatttool and make hcitool lescan work.
Thanks in advance.
hcitool lescan is for BLE only, as I mentioned above an iPhone will not be recognized as a BLE device even though it is compatible with Bluetooth 4.0. If you would like to find your iPhone you will have to use the command hcitool scan.
Also, you mentioned that you haven't flashed the latest image onto your Edison, I'd suggest you to do it since in recent versions of the image there has been updates to the Edison's Bluetooth features.
Thanks Peter. Can the Mac Book Pro which is compatible with Bluetooth 4.0 be detected as a BLE device by the Edison? I need to send the string (MAC address and device name) to the laptop over BLE from Edison to laptop. Please let me know which profile is best suited to transfer textual data over BLE?
I went through Bluetooth® User Guide, but kind of confused as to which profile to choose for BLE.
Also, how to scan for BLE devices that are close to edison by 2-3 meters and not beyond in an open area . Is there any specific way to do this? Your inputs will be highly valued.
What happens is that your Edison (a computer) would be connecting to your MAC (another computer), and BLE usually requires "slave" devices such as sensors, beacons, etc. to "advertise" the data that will be transferred/received. I have never tried to communicate over BLE using an OSX device but I would suggest you to try to set it up manually (from console) if possible. Anyway, I would recommend you to read the documentation found in Bluetooth for Developers - Apple Developer and to contact Apple in case you have issues interacting through BLE with your Mac.
I believe you could detect how close a BLE device is to your Edison based on the signal strength. You might be interested in this: http://stackoverflow.com/questions/24417017/bluetooth-le-signal-strength-linux.