Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
2,240 Views

bluetooth on galileo gen2

Hi I am using,

Product name : ThinPc Intel Centrino Mini PCI E Wi-Fi Card 300mbps Speed + Bluetooth 4.0 + Dual Antenna

link : http://www.amazon.in/ThinPc-Centrino-300mbps-Bluetooth-Antenna/dp/B01BBS1774%3Fie%3DUTF8%26psc%3D1%2... http://www.amazon.in/ThinPc-Centrino-300mbps-Bluetooth-Antenna/dp/B01BBS1774?ie=UTF8&psc=1&redirect=...

i got it from amazon

it also has bluetooth but i could not know how to pair my phone to my galileo and do a file sharing between galileo and my phone(i.e., galileo to phone and phone to galileo)

I have tried this,

galileo login: root

root@galileo:~# hciconfig hci0 up

root@galileo:~# hciconfig

hci0: Type: BR/EDR Bus: USB

BD Address: 68:17:29:69:BA:FD ACL MTU: 310:10 SCO MTU: 64:8

UP RUNNING PSCAN

RX bytes:1026 acl:0 sco:0 events:50 errors:0

TX bytes:1008 acl:0 sco:0 commands:49 errors:0

root@galileo:~# hcitool scan

Scanning ...

BC:D1:1F:4E:3A:3E AashishJ7

root@galileo:~# hcitool scan

Scanning ...

BC:D1:1F:4E:3A:3E AashishJ7

root@galileo:~# cat << EOF > /etc/bluetooth/rfcomm.conf

> # RFCOMM configuration file.

> rfcomm0 {

> # Automatically bind the device at startup

> 1;

> # Bluetooth address of the device

> device BC:D1:1F:4E:3A:3E

> # RFCOMM channel for the connection

> channel 1;

> # Description of the connection

> comment "J7 connected on channel 1";

> }

> EOF

root@galileo:~# cat /etc/bluetooth/rfcomm.conf

# RFCOMM configuration file.

rfcomm0 {

# Automatically bind the device at startup

1;

# Bluetooth address of the device

device BC:D1:1F:4E:3A:3E

# RFCOMM channel for the connection

channel 1;

# Description of the connection

comment "J7 connected on channel 1";

}

root@galileo:~# hciconfig hci0 pscan

root@galileo:~# hciconfig hci0 name "galileo"

root@galileo:~# hciconfig hci0 sppmode 1

Warning: unknown command - "sppmode"

Warning: unknown command - "1"

hci0: Type: BR/EDR Bus: USB

BD Address: 68:17:29:69:BA:FD ACL MTU: 310:10 SCO MTU: 64:8

UP RUNNING PSCAN

RX bytes:6801 acl:0 sco:0 events:115 errors:0

TX bytes:1976 acl:0 sco:0 commands:86 errors:0

root@galileo:~# bluetoothd

-sh: bluetoothd: command not found

root@galileo:~# hcitool scan

Scanning ...

BC:D1:1F:4E:3A:3E AashishJ7

root@galileo:~#

Pls help me, as you can see above i can scan my phone (AashishJ7) but can't pair and do further (file sharing etc)

Pls reply soon

thanks in advance

thanks

Tags (1)
0 Kudos
10 Replies
Highlighted
Honored Contributor I
17 Views

Did you check threads like ?

HTH,

Fernando.

0 Kudos
Highlighted
Community Manager
17 Views

Hi megalileo,

Which image are you using? Please run the command uname -a.

 

I suggest you to use bluetoothctl, take a look at this document: http://www.intel.com/content/www/us/en/support/boards-and-kits/000005743.html http://www.intel.com/content/www/us/en/support/boards-and-kits/000005743.html, this document is for Edison, but the steps are basically the same on Galileo.

rfkill unblock Bluetooth

 

bluetoothctl

 

>agent KeyboardDisplay

 

>default-agent

 

>scan on

 

# wait until you see your device/phone

 

> pair MACaddressofyourPhone

 

Confirm the passkey(yes/no)

 

>connect MACaddressofyourPhone

Let me know if after this you get better results, I think the problem could be that you are not unblocking Bluetooth from the rfkill list.

 

Are you using an Android or iOS device

Regards,

 

Charlie
0 Kudos
Highlighted
New Contributor I
17 Views

Hi very great thanks for instant reply and fruitful answer,

I am using : Linux galileo 3.8.7-yocto-standard # 2 Wed May 25 00:22:16 PDT 2016 i586 GNU/Linux

I am using android lollypop on my phone

using bluetoothctl solved the problem of pairing and connecting, now I can pair and connect my galileo to my phone,

but I want to send/receive files between the two (my galileo to/from my phone), pls tell me how to do that?

after that I want to control my galileo-embedded device (a simple led for start) by my phone, by sending and receiving strings/commands between the two (my galileo to/from my phone) using python, C/C++, java, node.js XDA, arduino programming

pls help me

Pls reply soon

thanks in advance

thanks

Highlighted
Community Manager
17 Views

Hi megalileo,

 

 

I'm glad to know that you were able to pair and connect your phone to the board.

 

For send/receive files through Bluetooth using your board, I suggest you to use a FTP client as it is mentioned here: http://www.intel.com/content/dam/support/us/en/documents/edison/sb/edisonbluetooth_331704007.pdf

 

 

In order to get started with Android and the Edison Board, look at the following threads:

 

1. https://communities.intel.com/thread/56253 https://communities.intel.com/thread/56253 This is a very good example you could implement with your board

 

2. https://software.intel.com/en-us/articles/connecting-to-intel-edison-from-android-with-bluetooth-le-... This tutorial is for Edison, but you could use the same idea with the Galileo Board

 

 

In order to start programming I suggest you to use pybluez for Python, the Bluetooth libraries for C/C++ and bleno in nodeJS.

 

I hope this helps.

 

 

Regards,

 

Charlie
Highlighted
New Contributor I
17 Views

Hi thanks for your reply, following the tut on FTP client as it is mentioned here: http://www.intel.com/content/dam/support/us/en/documents/edison/sb/edisonbluetooth_331704007.pdf http://www.intel.com/content/dam/support/us/en/documents/edison/sb/edisonbluetooth_331704007.pdf

I enabled bluetooth,

root@galileo:~# rfkill list

0: phy0: wlan

Soft blocked: yes

Hard blocked: no

1: hci0: bluetooth

Soft blocked: no

Hard blocked: no

then,

root@galileo:~# systemctl start obex

Job for obex.service failed. See 'systemctl status obex.service' and 'journalctl -xn' for details.

root@galileo:~# systemctl status obex.service

● obex.service - Bluetooth OBEX service

Loaded: loaded (/lib/systemd/system/obex.service; disabled)

Active: failed (Result: exit-code) since Sun 2016-06-12 19:16:51 UTC; 11s ago

Process: 288 ExecStart=/usr/lib/bluez5/bluetooth/obexd (code=exited, status=203/EXEC)

Main PID: 288 (code=exited, status=203/EXEC)

Jun 12 19:16:51 galileo systemd[288]: Failed at step EXEC spawning /usr/lib...ry

Jun 12 19:16:51 galileo systemd[1]: obex.service: main process exited, code...EC

Jun 12 19:16:51 galileo systemd[1]: Failed to start Bluetooth OBEX service.

Jun 12 19:16:51 galileo systemd[1]: Unit obex.service entered failed state.

Hint: Some lines were ellipsized, use -l to show in full.

root@galileo:~# journalctl -xn

-- Logs begin at Mon 2001-01-01 00:00:25 UTC, end at Sun 2016-06-12 19:16:51 UTC

Jun 12 19:13:38 galileo xdk-daemon[230]: MDNS Broadcast Sent:58888

Jun 12 19:13:38 galileo xdk-daemon[230]: V8PORT REC

Jun 12 19:13:43 galileo xdk-daemon[230]: child exited

Jun 12 19:13:43 galileo xdk-daemon[230]: Child process closed

Jun 12 19:14:25 galileo login[236]: ROOT LOGIN on '/dev/ttyS1'

Jun 12 19:16:51 galileo systemd[1]: Starting Bluetooth OBEX service...

-- Subject: Unit obex.service has begun with start-up

-- Defined-By: systemd

-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

--

-- Unit obex.service has begun starting up.

Jun 12 19:16:51 galileo systemd[288]: Failed at step EXEC spawning /usr/lib/blue

-- Subject: Process /usr/lib/bluez5/bluetooth/obexd could not be executed

-- Defined-By: systemd

-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

--

-- The process /usr/lib/bluez5/bluetooth/obexd could not be executed and failed.

--

-- The error number returned while executing this process is 2.

Jun 12 19:16:51 galileo systemd[1]: obex.service: main process exited, code=exit

Jun 12 19:16:51 galileo systemd[1]: Failed to start Bluetooth OBEX service.

-- Subject: Unit obex.service has failed

-- Defined-By: systemd

-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

--

-- Unit obex.service has failed.

--

-- The result is failed.

Jun 12 19:16:51 galileo systemd[1]: Unit obex.service entered failed state.

root@galileo:~#

so does it mean my galileo image does not have BlueZ5, I am scared on installing it after reading this post : ".......

In any case, you're right in that BlueZ5 will break all existing tools. For me, it's more of a last ditch attempt at testing the OBEX FTP transfer on Galileo.

That being said, has anyone managed to get OBEX FTP transfers working with BlueZ4?......."

so should i give it a try, install BlueZ5 ?? or other issue ??

pls help me

Pls reply soon

thanks in advance

thanks

Highlighted
New Contributor I
17 Views

Pls somebody reply

Thanks

0 Kudos
Highlighted
Community Manager
17 Views

Hi,

If you are using the image: Linux galileo 3.8.7-yocto-standard # 1 Thu May 12 08:17:14 PDT 2016 i586 GNU/Linux, it has the BlueZ 5.37 version. I've just ran the same command you ran, and got the same output; as I said before the guide is for Edison and not for Galileo. In this case you will need to install obex, for this you need to have the following content in /etc/opkg/iotdk.conf:

src iotdk-all http://iotdk.intel.com/repos/3.5/iotdk/galileo/all http://iotdk.intel.com/repos/3.5/iotdk/galileo/all

 

src iotdk-i586 http://iotdk.intel.com/repos/3.5/iotdk/galileo/i586 http://iotdk.intel.com/repos/3.5/iotdk/galileo/i586

 

src iotdk-quark http://iotdk.intel.com/repos/3.5/iotdk/galileo/quark http://iotdk.intel.com/repos/3.5/iotdk/galileo/quark

 

src iotdk-x86 http://iotdk.intel.com/repos/3.5/iotdk/galileo/x86 http://iotdk.intel.com/repos/3.5/iotdk/galileo/x86

After this, you need to run the commands opkg update and opkg install bluez5-obex. Then, you should be able to use obex with your board.

Regards,

 

Charlie

 

Highlighted
New Contributor I
17 Views

thanks for reply, actually I not only want to use obex but want to try the full http://www.intel.com/content/dam/support/us/en/documents/edison/sb/edisonbluetooth_331704007.pdf http://www.intel.com/content/dam/support/us/en/documents/edison/sb/edisonbluetooth_331704007.pdf document,

i am using Linux galileo 3.8.7-yocto-standard # 2 Wed May 25 00:22:16 PDT 2016 i586 GNU/Linux

it has a directory /usr/lib/bluez5

root@galileo:/usr/lib/bluez5# ls

bluetooth

root@galileo:/usr/lib/bluez5# cd bluetooth

root@galileo:/usr/lib/bluez5/bluetooth# ls

bluetoothd

root@galileo:/usr/lib/bluez5/bluetooth# cd bluetoothd

-sh: cd: bluetoothd: Not a directory

so i think it has bluez 5 installed, but only installing bluez5-obex can i do all things listed in http://www.intel.com/content/dam/support/us/en/documents/edison/sb/edisonbluetooth_331704007.pdf edisonbluetooth_331704007.pdf ??, i think i need to install GATT etc also

actually how to install full bluez5 on glileo ?? : pls see this post , here he told how to install obex, bluez4 and its dependencies, i have not tried it yet

as i think i should first remove the existing bluez5 on the sd image then install a new one

how to uninstall/remove any pkg / software pls tll me

now a second problem is that i don't have a fast wifi connection, but i have a wired broadband connection, and a good speed internet dongle, so i want to connect wired ethernet connection to my galileo or share my pc internet via ethernet cable to my galileo - but i could not do it, i made a seperate discussion for it --- pls see

so my plan is to first install bluez5-obex only, after getting ethernet connection working as it requirs download, then remove the existing bluez5 on the sd image then install full bluez

pls stay in touch with me

thanks

Highlighted
Community Manager
17 Views

Hi megalileo,

 

 

Yes, BlueZ is installed by default, but there are some features in the Edison image that the Galileo don't have.

 

How have you tried to installed gatttool in your board? You can try by running the same commands from https://software.intel.com/en-us/articles/using-the-generic-attribute-profile-gatt-in-bluetooth-low-....

 

In order to install full blueZ you will need to use the source files: http://www.bluez.org/download/, look at the README and INSTALL files for the instructions on how to install the packages.

 

In order to uninstall a package like bluez, you will need to be very careful while uninstalling all the dependencies, take a look at: https://communities.intel.com/thread/61917 https://communities.intel.com/thread/61917

 

 

In cases where the packages have been installed with opkg, you can use opkg to uninstall them.

 

You can download the blueZ sources to the SD Card and then install everything.

 

 

Regards,

 

Charlie
Highlighted
Community Manager
17 Views

Hi,

 

 

I would like to know if you have some updates installing BlueZ from source or if you have installed GATTTool.

 

 

Regards,

 

Charlie

 

0 Kudos