I searched a lot in this issue and found whats called the "SPP-loopback.py" but i would like to know if there is a way to write java or C++ on the edison to establish a two way communication between the edison and an android app(Reading and writing data)....Is this doable ?
Thanks in advance.
I've been searching for examples that use Java or C++, unfortunately I didn't find anything. So if you definitely don't want to use the python file from this guide https://software.intel.com/en-us/articles/connecting-the-intel-edison-board-to-your-android-phone-wi... https://software.intel.com/en-us/articles/connecting-the-intel-edison-board-to-your-android-phone-wi..., I would suggest you to take a look at the code and then port it to Java or C++, the one you feel more comfortable with.
As Frederick said, the easiest way would be to do it using TCP/IP. But if you're willing to try with Bluetooth, you can check the Intel Edison Bluetooth Guide to take a look at the available profiles.
Take a look at this tutorial :
https://myraspberryandme.wordpress.com/2013/11/20/bluetooth-serial-communication-with-hc-05/ Bluetooth Serial Communication with HC-05 | MyRaspberryAndMe
I tested that, and it works. But it is on a Debian like system.
Take a look at this too :
http://unix.stackexchange.com/questions/92255/how-do-i-connect-and-send-data-to-a-bluetooth-serial-p... How do I connect and send data to a bluetooth serial port on Linux? - Unix & Linux Stack Exchange
Basically, you create an RFCOMM endpoint in your filesystem. This will act as a kind of COM port/TTY device. You use that to establish a communication afterward.
There is not a lot of documentation on that though.
Thank you so much for ur concern, I have once again changed form using the SPP-loopback to working with BLE, I have managed to add the gattlib on my edison and now i am writing a python script to run on the edison that can read/write data to another edison board.
Frederick Blais, is this something that you're trying to achieve? Are you trying to add customer services to your Edison GATT Server?
MAssem, please let us know if you have any update or question, we would like to see how project progresses.
yes, this is something I tried to achieve. I spent several hours compiling different versions of BlueZ (newer and older). On the newest versions, there are some GATT examples in the source code folder, but many of them fail to launch with different errors.
I know the Edison is able to do that, I just have to do a "hciconfig hci0 leadv 0" and I am able to connect to the Edison with a Bluetooth LE scanner. From there I can get information like the current time... I think what we need to do is how to implement plugins (-p option of bluetoothd). Someone asked about that here :
I think it would be nice that some people at Intel take a look at that. A lot of people on the forums are asking about how to do bluetooth communication between mobile device and the Edison. Bluetooth Classic does not work so well, and is not really possible on iOS. I think Low Energy with GATT is the way to go. I got a Curie module recently (Arduino 101) and started to work with its GATT capabilities. It works really well, I have been able to make a custom Windows 10 (Universal Platform) that communicate with it. It would be easy to do the same with iOS and Android, the GATT APIs are well documented. No pairing required, it just works out of the box. Connection is done via the API.
Some help would be appreciated to better understand what we could do with BlueZ and the Edison. From there, I could do my part and write some nice tutorials and how to communicate with Windows 10, iOS and Android. We just need a simple hello world, just read and write from a custom characteristics.
I am still working on this and haven't found a solution yet for passing any kind of information from the edison board to the android using python and instead i am thinking now of changing from python as the language to use to be able to control the GATT services.
I definitely agree with Fred on the need of some simple explanation of the basics (May be Reading and Writing)
Thank you for your feedback. We'll pass this information to the development team to see if it's possible to do something about this. As you say, there are multiple forums in the Community where people ask about this, so it would help a lot of users.