Community
cancel
Showing results for 
Search instead for 
Did you mean: 
idata
Community Manager
1,639 Views

bluetooth SPP android - edison disconnect

Hi, I followed this guide to connect an android to the intel edison.

https://software.intel.com/en-us/blogs/2015/05/19/communicate-to-arduino-code-with-your-android-phon... Communicate to Arduino code with your Android* Phone by Bluetooth Serial Port Profile (SPP) on Intel® Edison | Intel® So…

I installed the correct python scripts in /home/root/bluetooth/

and I checked if the service is running, I get an error at the end of that message.

systemctl status bluetooth-spp-pin

● bluetooth-spp-pin.service - Bluetooth SPP and PIN service

Loaded: loaded (/lib/systemd/system/bluetooth-spp-pin.service; enabled)

Active: active (exited) since Thu 2017-01-12 14:38:30 UTC; 42min ago

Process: 246 ExecStart=/home/root/bluetooth/bluetooth-spp-pin.sh (code=exited, status=0/SUCCESS)

Main PID: 246 (code=exited, status=0/SUCCESS)

CGroup: /system.slice/bluetooth-spp-pin.service

├─358 /usr/bin/python /home/root/bluetooth/bluetooth-spp-service.py

└─359 /usr/bin/python /home/root/bluetooth/bluetooth-pin-service.py

Jan 12 14:38:30 edison systemd[1]: Started Bluetooth SPP and PIN service.

Jan 12 14:38:35 edison bluetooth-spp-pin.sh[246]: Can't get device info: No such device

The android device will pair and connect. when I try to send serial data with the android app as in the guide, the app says it has lost the connection.

I have tried also the bluetooth user guide, using bluetoothctl app etc for SPP. again I can pair the device but as soon as I try to send any serial data the pipe is broken / disconnect.

are there logs I can check ? or its only a python scipt without logging?

ultimately I would like to use android - bluetooth ( SPP ) in C++ in eclipse for intel edison. Can anyone recomend a good demonstation app of this working in excipse?

I think I must be close to having this working since the android and my laptop both pair without issue.

0 Kudos
8 Replies
idata
Community Manager
35 Views

Hi bennnn,

 

 

Thanks for your interest in the Intel Edison Platform.

 

 

I'm sorry to hear that your Edison is not connecting to your Android device. Could you be so kind to provide me your Edison image version, use the command: cat /etc/version.

 

 

I will be waiting for your reply, have a nice day!

 

 

Best Regards,

 

-Jose.

 

idata
Community Manager
35 Views

Hi , thanks for the speedy reply !

cat reports 201606061707 image.

I have flashed the device with Intel_Edison_Setup_Mac_v2016.2.013.app running on osx with the latest image and tried the arduino example again and my android just disconnects.

I followed this guide and did nothing else: https://software.intel.com/en-us/blogs/2015/05/19/communicate-to-arduino-code-with-your-android-phon... Communicate to Arduino code with your Android* Phone by Bluetooth Serial Port Profile (SPP) on Intel® Edison | Intel® So…

is this guide out of date ?

The ISS-IOT ( eclipse ) demos include mraa.hpp which include uart.hpp so hopfuly if I can get this example CPP working then try to get serial data into my C++ program by using mraa.

I read in uart.hpp

* Uart Constructor, takes a pin number which will map directly to the

* linux uart number, this 'enables' the uart, nothing more

maybe wishful thinking , but if the yokto linux could handle the bluetooth serial CPP connection / PIN etc and just pass serial data to the serial port that I can recieve in mraa , that would save me a lot of headache in my C++ application.

idata
Community Manager
35 Views

Hi bennnn,

 

 

The SPP communication protocol only works with image versions below the 3.0, I leave you here the link for the 2.5: .

 

 

Please let me know if changing images solves your issue.

 

 

I will be waiting for your reply, have a nice day!

 

 

Best Regards,

 

-Jose.

 

idata
Community Manager
35 Views

Hi, I can confirm firmware 2.5 working with the python code.

Is it just the python bluetooth script that is broken in 3.0 and later ?

Or all bluetooth SPP is broken in version 3.0 and higher ?

I think I need a later version than 2.5 for I2S audio support and mraa.

idata
Community Manager
35 Views

Hi bennnn,

This issue is due to the BlueZ version installed in the latest images, this can be solved by updating this library, please follow the steps in this thread in order to do it: .

Please let me know your results.

I will be waiting for your reply, have a nice day!

Best Regards,

 

-Jose.
idata
Community Manager
35 Views

Hi bennnn,

 

 

Were you able to update the BlueZ library? Please let me know in order to assist you.

 

 

Have a nice day!

 

 

Best Regards,

 

-Jose.
idata
Community Manager
35 Views

Hi Jose,

I think I'll wait to see the outcome of my question about audio port SSP2 here

before I update to newer firmware and try updating / downgrading Bluez library.

If I can use the older 2.5 firmware for I2S audio then I may as well stick with it since bluetooth seams reliable with it.

If I have to update firmware for SSP2 audio then I'll give the ' force remove Bluez5 dependencys and downgrade to repo 2 ' method a try

thanks for you help with this,

ben

idata
Community Manager
35 Views

Hi bennnn,

 

 

Always happy to help! If you have any more questions, please don't hesitate to ask.

 

 

Have a nice day!

 

 

Best Regards,

 

-Jose.