Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Rafael_R_
Beginner
101 Views

Send Data From Edison to Android App?

I have successfully paired my Android phone with the edison via Bluetooth (not BLE).

I used this article to get me started:

https://software.intel.com/en-us/articles/intel-edison-board-getting-started-with-bluetooth

I am working on a project that will use sensors to retrieve data and will need to send this data to an Android phone via Bluetooth through the edison.

Would this be done in linux scripts/commands or through code on Arduino?

Ideally I just want to display the data retrieved from these sensors on a UI app I need to create on Android.

Can anyone enlighten me on this process or perhaps provide a example/lead?

Tags (1)
0 Kudos
5 Replies
samontab
Valued Contributor II
101 Views

There are many different options. Bluetooth gives you different profiles that you can use to transfer information.

Depending on the type of information you want to send, some profiles would be better suited than others. Take a look here for list of profiles:

http://en.wikipedia.org/wiki/List_of_Bluetooth_profiles

For a generic data transfer, you could use OBEX, which basically just sends a file which may contain the data you need, or you can create and use a virtual serial port connection over bluetooth for example, and transfer the data using serial.

Rafael_R_
Beginner
101 Views

@samontab I was doing some research on RFCOMM sockets. I am still new to this entire topic of bluetooth data transmission between devices.

I found this reference on google:

http://people.csail.mit.edu/albert/bluez-intro/x502.html

Where would I place that server code on the Intel edison to deem it my server side component (which will send data to my android phone)?

Not exactly sure where the BlueZ code is supposed to go.

Once I achieve that step, is it valid that I program the Android app using the built in Bluetooth APIs on the Android SDK to retrieve these sockets being sent through that RFCOMM server code?

 

samontab
Valued Contributor II
101 Views

BlueZ is an implementation of the bluetooth stack for linux. The Edison has support for this on the yocto standard image.

Make sure that you enable bluetooth on the Edison first though. You can do it with this:

rfkill unblock bluetooth

Then, you can start playing around with hcitool, sdptool, etc...

For example, you can scan devices with:

hcitool scan

Search for information about BlueZ, there is plenty out there...

Joseph_B_Intel
Employee
101 Views

Matthias_H_Intel
Employee
101 Views

samontab wrote:

Make sure that you enable bluetooth on the Edison first though. You can do it with this:

rfkill unblock bluetooth

Then, you can start playing around with hcitool, sdptool, etc...

just to add:

you could also use

connmanctl enable bluetooth

then there are various things you can control/check with "bluetoothctl".

Last but not least "btmon" / "hcidump" are very helpful to analyze what data have been sent / received on BT

 

Reply