Quantcast

Overo Air Yocto Sakoman Bluetooth not working

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Overo Air Yocto Sakoman Bluetooth not working

Ryan
I'm using an Overo Air with various Sakoman images, and I'm having trouble getting the Bluetooth to work on the latest Yocto images. I started with Sakoman's "gnome-r13" image because the instructions on his website seemed simple enough to get something up and running quickly. Recently, Steve posted that he would be removing the "gnome-r13" materials from his website, so I thought it would be best to move to the new OpenEmbedded/Yocto/Poky build system for long term maintainability. I decided to start with some of the prebuilt images on his website, but I am having no luck getting the Bluetooth working on any of them. I've tried the last "yocto-1.2" image and two of the more recent "yocto-1.3" images.

In the gnome images, if the Bluetooth was not working, it was usually because the Bluetooth daemon was not running. Running "/etc/init.d/bluetooth start" would always solve the problem, and it would start working. In the new yocto images, systemd is used instead, so I run "systemctl start bluetooth.service", but it is not fixing the problem.

Here is the output from various commands on a working gnome image and a nonworking yocto image. The yocto image seems like it's not even detecting the hardware correctly because it doesn't show up when running "lsusb".

WORKING GNOME:

root@omap3-multi:~# lsusb
Bus 001 Device 001: ID 1d6b:0002
Bus 001 Device 002: ID 05e3:0608

root@omap3-multi:~# lsmod
Module                  Size  Used by
rfcomm                 55238  9
bnep                   13214  2
hci_uart               20881  3
bluetooth             209153  23 rfcomm,bnep,hci_uart
libertas_sdio          16075  0
libertas               96500  1 libertas_sdio
cfg80211              165386  1 libertas
rfkill                 17041  3 bluetooth,cfg80211
lib80211                5017  1 libertas
ads7846                10355  0
firmware_class          6797  2 libertas_sdio,libertas

root@omap3-multi:~# hcitool dev
Devices:
        hci0    00:19:88:1A:8D:A5

root@omap3-multi:~# hcitool scan
Scanning ...
        AC:93:2F:AF:0E:52       n/a
        XX:XX:4B:1B:C9:2F       My iPhone

root@omap3-multi:~# dmesg | grep -i blue
Registered led device: overo:blue:gpio22
Registered led device: overo:blue:COM
Bluetooth: Core ver 2.16
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP socket layer initialized
Bluetooth: SCO socket layer initialized
Bluetooth: HCI UART driver ver 2.2
Bluetooth: HCI H4 protocol initialized
Bluetooth: HCI BCSP protocol initialized
Bluetooth: HCILL protocol initialized
Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Bluetooth: BNEP filters: protocol multicast
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM ver 1.11

root@omap3-multi:~# hciconfig -a
hci0:   Type: BR/EDR  Bus: UART
        BD Address: 00:19:88:1A:8D:A5  ACL MTU: 310:10  SCO MTU: 64:8
        UP RUNNING PSCAN
        RX bytes:1630 acl:0 sco:0 events:50 errors:0
        TX bytes:448 acl:0 sco:0 commands:31 errors:0
        Features: 0xff 0xff 0x8f 0xfe 0x9b 0xf9 0x00 0x80
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH HOLD SNIFF PARK
        Link mode: SLAVE ACCEPT
        Name: 'omap3-multi-0'
        Class: 0x480100
        Service Classes: Capturing, Telephony
        Device Class: Computer, Uncategorized
        HCI Version: 2.0 (0x3)  Revision: 0xc5c
        LMP Version: 2.0 (0x3)  Subversion: 0xc5c
        Manufacturer: Cambridge Silicon Radio (10)

NONWORKING YOCTO: (after starting the Bluetooth daemon)

root@omap3-multi:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

root@omap3-multi:~# lsmod
Module                  Size  Used by
libertas_sdio          16396  0
libertas              100032  1 libertas_sdio
cfg80211              170751  1 libertas
lib80211                5134  1 libertas
firmware_class          6904  2 libertas_sdio,libertas
bnep                   13075  2
mt9v032                 7237  4294967295
ads7846                10488  0
omap3_isp             131955  0
v4l2_common             8933  2 mt9v032,omap3_isp
videodev               99128  3 mt9v032,omap3_isp,v4l2_common
g_serial               37793  2
media                  12714  3 mt9v032,omap3_isp,videodev
rfcomm                 56119  0
hidp                   16251  0
bluetooth             258745  11 bnep,rfcomm,hidp
rfkill                 17524  3 cfg80211,bluetooth
ipv6                  249350  16

root@omap3-multi:~# hcitool dev
Devices:

root@omap3-multi:~# hcitool scan
Device is not available: No such device

root@omap3-multi:~# dmesg | grep -i blue
[    3.152008] Registered led device: overo:blue:gpio22
[    3.152984] Registered led device: overo:blue:COM
[    5.398956] Bluetooth: Core ver 2.16
[    5.430847] Bluetooth: HCI device and connection manager initialized
[    5.437957] Bluetooth: HCI socket layer initialized
[    5.444458] Bluetooth: L2CAP socket layer initialized
[    5.460510] Bluetooth: SCO socket layer initialized
[    5.518096] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    6.772735] Bluetooth: RFCOMM TTY layer initialized
[    6.778778] Bluetooth: RFCOMM socket layer initialized
[    6.784301] Bluetooth: RFCOMM ver 1.11
[   15.010101] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   15.023925] Bluetooth: BNEP filters: protocol multicast

root@omap3-multi:~# hciconfig -a
root@omap3-multi:~#


Any help or pushes in the right direction will be greatly appreciated. I've been searching Google for days, and I haven't been able to solve this.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Overo Air Yocto Sakoman Bluetooth not working

Steve Sakoman
Ryan,

As I mentioned in my earlier post, these images were developed for my
own use.  I don't use bluetooth in any of my work, so I've never
bothered to get it working.

I suspect you will need to do some custom init work beyond that which
the systemd default provides.  Look at the init in r13 for a guide to
what needs to be done.

Steve

On Thu, Dec 27, 2012 at 9:13 AM, Ryan <[hidden email]> wrote:

> I'm using an Overo Air with various Sakoman images, and I'm having trouble
> getting the Bluetooth to work on the latest Yocto images. I started with
> Sakoman's "gnome-r13" image because the instructions on his website seemed
> simple enough to get something up and running quickly. Recently, Steve
> posted that he would be removing the "gnome-r13" materials from his website,
> so I thought it would be best to move to the new OpenEmbedded/Yocto/Poky
> build system for long term maintainability. I decided to start with some of
> the prebuilt images on his website, but I am having no luck getting the
> Bluetooth working on any of them. I've tried the last "yocto-1.2" image and
> two of the more recent "yocto-1.3" images.
>
> In the gnome images, if the Bluetooth was not working, it was usually
> because the Bluetooth daemon was not running. Running "/etc/init.d/bluetooth
> start" would always solve the problem, and it would start working. In the
> new yocto images, systemd is used instead, so I run "systemctl start
> bluetooth.service", but it is not fixing the problem.
>
> Here is the output from various commands on a working gnome image and a
> nonworking yocto image. The yocto image seems like it's not even detecting
> the hardware correctly because it doesn't show up when running "lsusb".
>
> *WORKING GNOME:*
>
> root@omap3-multi:~# lsusb
> Bus 001 Device 001: ID 1d6b:0002
> Bus 001 Device 002: ID 05e3:0608
>
> root@omap3-multi:~# lsmod
> Module                  Size  Used by
> rfcomm                 55238  9
> bnep                   13214  2
> hci_uart               20881  3
> bluetooth             209153  23 rfcomm,bnep,hci_uart
> libertas_sdio          16075  0
> libertas               96500  1 libertas_sdio
> cfg80211              165386  1 libertas
> rfkill                 17041  3 bluetooth,cfg80211
> lib80211                5017  1 libertas
> ads7846                10355  0
> firmware_class          6797  2 libertas_sdio,libertas
>
> root@omap3-multi:~# hcitool dev
> Devices:
>         hci0    00:19:88:1A:8D:A5
>
> root@omap3-multi:~# hcitool scan
> Scanning ...
>         AC:93:2F:AF:0E:52       n/a
>         XX:XX:4B:1B:C9:2F       My iPhone
>
> root@omap3-multi:~# dmesg | grep -i blue
> Registered led device: overo:blue:gpio22
> Registered led device: overo:blue:COM
> Bluetooth: Core ver 2.16
> Bluetooth: HCI device and connection manager initialized
> Bluetooth: HCI socket layer initialized
> Bluetooth: L2CAP socket layer initialized
> Bluetooth: SCO socket layer initialized
> Bluetooth: HCI UART driver ver 2.2
> Bluetooth: HCI H4 protocol initialized
> Bluetooth: HCI BCSP protocol initialized
> Bluetooth: HCILL protocol initialized
> Bluetooth: BNEP (Ethernet Emulation) ver 1.3
> Bluetooth: BNEP filters: protocol multicast
> Bluetooth: RFCOMM TTY layer initialized
> Bluetooth: RFCOMM socket layer initialized
> Bluetooth: RFCOMM ver 1.11
>
> root@omap3-multi:~# hciconfig -a
> hci0:   Type: BR/EDR  Bus: UART
>         BD Address: 00:19:88:1A:8D:A5  ACL MTU: 310:10  SCO MTU: 64:8
>         UP RUNNING PSCAN
>         RX bytes:1630 acl:0 sco:0 events:50 errors:0
>         TX bytes:448 acl:0 sco:0 commands:31 errors:0
>         Features: 0xff 0xff 0x8f 0xfe 0x9b 0xf9 0x00 0x80
>         Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
>         Link policy: RSWITCH HOLD SNIFF PARK
>         Link mode: SLAVE ACCEPT
>         Name: 'omap3-multi-0'
>         Class: 0x480100
>         Service Classes: Capturing, Telephony
>         Device Class: Computer, Uncategorized
>         HCI Version: 2.0 (0x3)  Revision: 0xc5c
>         LMP Version: 2.0 (0x3)  Subversion: 0xc5c
>         Manufacturer: Cambridge Silicon Radio (10)
>
> *NONWORKING YOCTO:* (after starting the Bluetooth daemon)
>
> root@omap3-multi:~# lsusb
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>
> root@omap3-multi:~# lsmod
> Module                  Size  Used by
> libertas_sdio          16396  0
> libertas              100032  1 libertas_sdio
> cfg80211              170751  1 libertas
> lib80211                5134  1 libertas
> firmware_class          6904  2 libertas_sdio,libertas
> bnep                   13075  2
> mt9v032                 7237  4294967295
> ads7846                10488  0
> omap3_isp             131955  0
> v4l2_common             8933  2 mt9v032,omap3_isp
> videodev               99128  3 mt9v032,omap3_isp,v4l2_common
> g_serial               37793  2
> media                  12714  3 mt9v032,omap3_isp,videodev
> rfcomm                 56119  0
> hidp                   16251  0
> bluetooth             258745  11 bnep,rfcomm,hidp
> rfkill                 17524  3 cfg80211,bluetooth
> ipv6                  249350  16
>
> root@omap3-multi:~# hcitool dev
> Devices:
>
> root@omap3-multi:~# hcitool scan
> Device is not available: No such device
>
> root@omap3-multi:~# dmesg | grep -i blue
> [    3.152008] Registered led device: overo:blue:gpio22
> [    3.152984] Registered led device: overo:blue:COM
> [    5.398956] Bluetooth: Core ver 2.16
> [    5.430847] Bluetooth: HCI device and connection manager initialized
> [    5.437957] Bluetooth: HCI socket layer initialized
> [    5.444458] Bluetooth: L2CAP socket layer initialized
> [    5.460510] Bluetooth: SCO socket layer initialized
> [    5.518096] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
> [    6.772735] Bluetooth: RFCOMM TTY layer initialized
> [    6.778778] Bluetooth: RFCOMM socket layer initialized
> [    6.784301] Bluetooth: RFCOMM ver 1.11
> [   15.010101] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
> [   15.023925] Bluetooth: BNEP filters: protocol multicast
>
> root@omap3-multi:~# hciconfig -a
> root@omap3-multi:~#
>
>
> Any help or pushes in the right direction will be greatly appreciated. I've
> been searching Google for days, and I haven't been able to solve this.
>
>
>
> --
> View this message in context: http://gumstix.8.n6.nabble.com/Overo-Air-Yocto-Sakoman-Bluetooth-not-working-tp4966327.html
> Sent from the Gumstix mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122712
> _______________________________________________
> gumstix-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gumstix-users

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Overo Air Yocto Sakoman Bluetooth not working

Ryan
Steve,

Thanks for pointing me in the right direction. I still haven't tried to get systemd to handle all of this, but I was able to get Bluetooth running manually by executing the following commands which I got from /etc/init.d/bluetooth and /etc/default/bluetooth (the values in /etc/default/bluetooth take precedence).

hciattach -s 115200 ttyO1 csr 115200 noflow
bluetoothd
sdptool add --channel=1 SP
(the init script sleeps here for 1 second)
rfcomm -r watch 0 1 /sbin/getty -w -L rfcomm0 115200 vt100 &

I created my own image with Poky and the meta-oe and meta-gumstix layers and this was not configured either, so I'm sure others are having the same problems.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Overo Air Yocto Sakoman Bluetooth not working

drzile
Hi,

did you make .service which do this on system startup? Can you post that .service?
I'm using official gumstix yocto project from github, and also I need to manually start bluetooth.

Regards,
Zile
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Overo Air Yocto Sakoman Bluetooth not working

Ryan
Zile,

I was unable to get systemd to handle all of the commands itself after messing with it for a while. I'm sure there is a way, but I was able to get it working with a helper script quicker, so I just went with that. We also ended up not needing the sdptool and rfcomm commands for our implementation, which made it easier. You may want to verify that you actually need to setup the rfcomm for your implementation too.

I can't find my original service with the helper script, but this one should work fine as long as you don't need the rfcomm. If you do need the rfcomm, I will try to dig up my old scripts.

Anyways, here is the systemd service. This is in addition to the bluetooth.service already present in the image. Leave that one alone. When this service does the hciattach, the other bluetooth.service will run.

# /lib/systemd/system/bluetooth-init.service

[Unit]
Description=Bluetooth Adapter Initialization
After=basic.target

[Service]
Type=forking
ExecStart=/usr/sbin/hciattach -s 115200 ttyO1 csr 115200 noflow

[Install]
WantedBy=multi-user.target
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Overo Air Yocto Sakoman Bluetooth not working

Ash Charles
Hi,

I just committed this patch
https://github.com/gumstix/meta-gumstix-extras/commit/1ae1c55783128c00bafc7ea948e6c37c5075dc15
to hciattach the Overo bluetooth on boot if is present in a systemd
system.
Comments and feedback welcome :).

--Ash

On Tue, Mar 12, 2013 at 9:08 AM, Ryan <[hidden email]> wrote:

> Zile,
>
> I was unable to get systemd to handle all of the commands itself after
> messing with it for a while. I'm sure there is a way, but I was able to get
> it working with a helper script quicker, so I just went with that. We also
> ended up not needing the sdptool and rfcomm commands for our implementation,
> which made it easier. You may want to verify that you actually need to setup
> the rfcomm for your implementation too.
>
> I can't find my original service with the helper script, but this one should
> work fine as long as you don't need the rfcomm. If you do need the rfcomm, I
> will try to dig up my old scripts.
>
> Anyways, here is the systemd service. This is in addition to the
> bluetooth.service already present in the image. Leave that one alone. When
> this service does the hciattach, the other bluetooth.service will run.
>
> # /lib/systemd/system/bluetooth-init.service
>
> [Unit]
> Description=Bluetooth Adapter Initialization
> After=basic.target
>
> [Service]
> Type=forking
> ExecStart=/usr/sbin/hciattach -s 115200 ttyO1 csr 115200 noflow
>
> [Install]
> WantedBy=multi-user.target
>
>
>
>
> --
> View this message in context: http://gumstix.8.n6.nabble.com/Overo-Air-Yocto-Sakoman-Bluetooth-not-working-tp4966327p4966983.html
> Sent from the Gumstix mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester
> Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the
> endpoint security space. For insight on selecting the right partner to
> tackle endpoint security challenges, access the full report.
> http://p.sf.net/sfu/symantec-dev2dev
> _______________________________________________
> gumstix-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gumstix-users

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Loading...