Community
cancel
Showing results for 
Search instead for 
Did you mean: 
MMoha16
New Contributor I
4,107 Views

Sending data from Edison board to android

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.

18 Replies
FBlai
Valued Contributor I
145 Views

If you want to do it the easy way, I would suggest using TCP/IP socket on a WiFi network. The Bluetooth road is quite hard.

What do you want to do exactly?

MMoha16
New Contributor I
145 Views

I would like to make an application in which the edison board can send data to an android app over bluetooth

Pablo_M_Intel
Employee
145 Views

Hi MAssem,

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.

Regards,

Pablo

Pablo_M_Intel
Employee
145 Views

Hi MAssem,

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.

http://download.intel.com/support/edison/sb/edisonbluetooth_331704004.pdf http://download.intel.com/support/edison/sb/edisonbluetooth_331704004.pdf.

Regards,

Pablo

FBlai
Valued Contributor I
145 Views

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.

Carlos_M_Intel
Employee
145 Views

Hi MAssem,

I would like to know if you have been able to work on this. Have you been able to check the links that Pablo and Frederick posted

Regards,

Charlie

MMoha16
New Contributor I
145 Views

Hello CMata_Intel

I kind of changed my approach now from doing the connection by the SPP-loopback file to doing it as a client-server communication using rfcomm bluetooth protocol.

Regards,

Assem

Pablo_M_Intel
Employee
145 Views

Hi MAssem,

Let us know if you're having trouble with this new approach so we can help you.

Regards,

Pablo

MMoha16
New Contributor I
145 Views

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.

FBlai
Valued Contributor I
145 Views

Could you give me a little more info on "I have managed to add the gattlib on my Edison"? You are able to add custom services/characteristics to your Edison GATT Server?

MMoha16
New Contributor I
145 Views

No until now i have not been able to add custom characteristics, I can now scan using the edison for other blue devices running a python script. Now working on reading and writing from an edison to another with a python script as well.

Pablo_M_Intel
Employee
145 Views

Hi guys,

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.

Regards,

Pablo

FBlai
Valued Contributor I
145 Views

Hello Pablo,

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.

 

Thanks

Fred

 

 

 

 

 

MMoha16
New Contributor I
145 Views

Hello ,

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)

Regards,

Assem

Pablo_M_Intel
Employee
145 Views

Hi guys,

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.

Regards,

Pablo

FBlai
Valued Contributor I
145 Views

Thanks Pablo,

I'm looking forward to this! I'm sure Intel's excellent software engineers can come up with something

FBlai
Valued Contributor I
145 Views

PabloM_Intel

Any news from the development team? I'm still interested into this and I'm sure MAssem and others are too.

Pablo_M_Intel
Employee
145 Views

Hi Frederick,

Not yet, but the information has already been passed with all your suggestions and ideas for a possible implementation. Hopefully this will be addressed soon. For now we truly appreciate your patience.

Regards,

Pablo

Reply