Quantcast

Help with bluetooth and Overo Y-COMs

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Help with bluetooth and Overo Y-COMs

Scott Ellis
I'm having problems initializing the bluetooth radio for Y-COMs
using a custom Yocto layer.

I've fallen back to testing with a kernel, linux-firmware and
a bluez4 recipe append from the meta-gumstix repo [fido] branch.


This 3.18 kernel with all patches and the defconfig.

  meta-gumstix/recipes-kernel/linux/linux-gumstix_3.18.bb
  meta-gumstix/recipes-kernel/linux/linux-gumstix-3.18/


This firmware append recipe

  meta-gumstix/recipes-kernel/linux-firmware_git.append
  meta-gumstix/recipes-kernel/linux-firmware/linux-firmware/


This bluez4 recipe append

  meta-gumstix/recipes-connectivity/bluez/bluez4_4.101.bbappend
  meta-gumstix/recipes-connectivity/bluez/files/


For now, I'm trying to start the bluetooth manually, but I always
get a timeout

  root@overo:~# bluetoothd
  root@overo:~# [   31.832214] Bluetooth: Core ver 2.19
  [   31.836181] NET: Registered protocol family 31
  [   31.840850] Bluetooth: HCI device and connection manager initialized
  [   31.848083] Bluetooth: HCI socket layer initialized
  [   31.853363] Bluetooth: L2CAP socket layer initialized
  [   31.858856] Bluetooth: SCO socket layer initialized
  [   31.901092] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
  [   31.906799] Bluetooth: BNEP filters: protocol multicast
  [   31.912414] Bluetooth: BNEP socket layer initialized

  root@overo:~# hciattach ttyO1 texas
  Initialization timed out.


  root@overo:~# uname -a
  Linux overo 3.18.18-custom #1 SMP Mon Jul 25 13:33:19 EDT 2016 armv7l armv7l armv7l GNU/Linux


  root@overo:~# lsmod
  Module                  Size  Used by
  bnep                   10540  2
  bluetooth             299005  7 bnep
  ipv6                  366921  14
  arc4                    1688  2
  wl18xx                 81669  0
  wlcore                176476  1 wl18xx
  mac80211              478203  2 wl18xx,wlcore
  cfg80211              409714  3 mac80211,wl18xx,wlcore
  rfkill                 19877  3 cfg80211,bluetooth
  snd_soc_omap_twl4030     6842  0
  snd_soc_omap_mcbsp     19688  2
  snd_soc_omap            2791  1 snd_soc_omap_mcbsp
  snd_pcm_dmaengine       5380  1 snd_soc_omap
  wlcore_sdio             3943  0
  snd_soc_twl4030        39912  1
  snd_soc_core          162787  4 snd_soc_omap_twl4030,snd_soc_omap,snd_soc_omap_mcbsp,snd_soc_twl4030
  snd_compress            8515  1 snd_soc_core
  snd_pcm                89006  5 snd_soc_core,snd_soc_omap,snd_soc_omap_mcbsp,snd_pcm_dmaengine,snd_soc_twl4030
  snd_timer              20158  1 snd_pcm
  mt9v032                10977  0
  snd                    60466  4 snd_soc_core,snd_timer,snd_pcm,snd_compress
  v4l2_common             7711  1 mt9v032
  soundcore               7185  1 snd
  twl4030_madc            9180  0
  industrialio           27077  1 twl4030_madc
  videodev              144998  2 mt9v032,v4l2_common
  media                  14812  2 mt9v032,videodev


I'm using an unmodified omap3-overo-storm-tobi.dts with a Tobi board.


With the same hardware (swapping out only the SD card) a console image
downloaded from Gumstix and running a 3.18.18 kernel finds the bluetooth
device just fine.

(from Gumstix image)

  root@overo:~# hciconfig -a
  hci0:   Type: BR/EDR  Bus: UART
        BD Address: 5C:31:3E:D1:42:D1  ACL MTU: 1021:6  SCO MTU: 180:4
        UP RUNNING PSCAN
        RX bytes:657 acl:0 sco:0 events:37 errors:0
        TX bytes:979 acl:0 sco:0 commands:37 errors:0
        Features: 0xff 0xfe 0x2d 0xfe 0xdb 0xff 0x7b 0x87
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH HOLD SNIFF
        Link mode: SLAVE ACCEPT
        Name: 'overo-0'
        Class: 0x400100
        Service Classes: Telephony
        Device Class: Computer, Uncategorized
        HCI Version: 4.0 (0x6)  Revision: 0x0
        LMP Version: 4.0 (0x6)  Subversion: 0xac6c
        Manufacturer: Texas Instruments Inc. (13)


The Gumstix image is running systemd and I have a sysvinit system,
but I don't see the systemd services running anything different
then what I'm trying manually.

Can anyone point out what piece I'm missing or doing wrong?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with bluetooth and Overo Y-COMs

Scott Ellis
The working gumstix system shows this

root@overo:~# dmesg | grep wlcore
[   13.688262] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[   13.863861] wlcore: loaded
[   15.180297] wlcore: PHY firmware version: Rev 8.2.0.0.195
[   15.311614] wlcore: firmware booted (Rev 8.8.0.0.13)


My non-working system only shows this

root@overo:~# dmesg | grep wlcore
[    7.926208] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[    8.081359] wlcore: loaded


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

Re: Help with bluetooth and Overo Y-COMs

Scott Ellis
Still hoping for some help.

I've copied the /lib/firmware directory from the working gumstix system
to my system with no change in behavior.

I've decompiled the omap3-overo-storm-tobi.dtb from the two systems
and they are identical. I know both systems are using this dtb since I
deleted all others.

On the gumstix system I masked these two systemd services

bluetooth.service
bluetooth-ttyO1-wilink.service

and verified that bluetooth interface does not come up.

If I then manually run these two commands the interface
comes up fine.

bluetoothd
hciconfig ttyO1 texas

That was just to verify that these commands I am using on my
non-working system should be sufficient.

Again, I am using an unmodified linux-gumstix-3.18.18 kernel from
the meta-gumstix repo, [fido] branch.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with bluetooth and Overo Y-COMs

Scott Ellis
I also have some select debug enabled for the wlcore.ko module

root@overo:~# cat /etc/modprobe.d/wlcore.conf
options wlcore debug_level=0x04480a

And on the working gumstix system I see this

root@overo:~# dmesg | grep wlcore
[   13.894561] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[   13.930908] wlcore: base address: oui 5c313e nic d142d2
[   14.071441] wlcore: loaded
[   14.214416] wlcore: mac80211 start
[   14.214477] wlcore: mac80211 add interface type 2 mac 5c:31:3e:d1:42:d2
[   14.214508] wlcore: allocating hw queue base: 0
[   14.723815] wlcore: cmd_box_addr 0xb007f8
[   14.723999] wlcore: MBOX ptrs: 0xb00adc 0xb00b6c
[   14.724151] wlcore: PHY firmware version: Rev 8.2.0.0.195
[   14.858795] wlcore: firmware booted (Rev 8.8.0.0.13)
[   14.864166] wlcore: 11a is supported
[   14.905242] wlcore: mac80211 bss info role 0 changed 0xe
[   14.910308] wlcore: mac80211 conf tx 0
[   14.912353] wlcore: mac80211 conf tx 1
[   14.916717] wlcore: mac80211 conf tx 2
[   14.918426] wlcore: mac80211 conf tx 3
[   14.920104] wlcore: mac80211 bss info role 0 changed 0x2000
[   14.921264] wlcore: mac80211 config psm off power 0 idle changed 0xffffff9f
[   14.930664] wlcore: mac80211 config psm off power 0 idle changed 0x10
[   14.947021] wlcore: mac80211 configure filter changed 0 total 80000000
[   15.058349] wlcore: mac80211 hw scan
[   15.680694] wlcore: mac80211 hw scan
[   23.627227] wlcore: mac80211 hw scan
[   24.250213] wlcore: mac80211 hw scan
[   32.190643] wlcore: mac80211 hw scan
[   32.808868] wlcore: mac80211 hw scan
[   35.744079] wlcore: wl1271_op_sched_scan_start

But on my system I see only this

root@overo:~# dmesg | grep wlcore
[    8.518829] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[    8.567565] wlcore: base address: oui 5c313e nic d142d2
[    8.712860] wlcore: loaded


Meaning these two functions (amongst others) are never getting called on
my systems

drivers/net/wireless/ti/wlcore/main.c: wl1271_op_start()

drivers/net/wireless/ti/wlcore/main.c: wl1271_op_add_interface()

These functions should be getting called by the mac80211 driver if
that is a clue to anyone.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with bluetooth and Overo Y-COMs

arun
Hi Scott,

The systemd running on Gumstix uses a "99-bluetooth-via-uart.rules" which requires the "bluetooth-ttyO1-wilink.service" to initialize bluetooth on a Y-COM. Do you have the equivalent of those in sysvinit in your custom image? This service seems to be using the wl1271_sdio which seems relevant to the debug messages in your last email.

I am looking at this particular commit in the meta-gumstix layer as a reference: 72869d1a7abe18c65e88a5131e1612cc357bb8ab

-Arun

On Wed, Jul 27, 2016 at 12:24 PM, Scott Ellis [via Gumstix] <[hidden email]> wrote:
I also have some select debug enabled for the wlcore.ko module

root@overo:~# cat /etc/modprobe.d/wlcore.conf
options wlcore debug_level=0x04480a

And on the working gumstix system I see this

root@overo:~# dmesg | grep wlcore
[   13.894561] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[   13.930908] wlcore: base address: oui 5c313e nic d142d2
[   14.071441] wlcore: loaded
[   14.214416] wlcore: mac80211 start
[   14.214477] wlcore: mac80211 add interface type 2 mac 5c:31:3e:d1:42:d2
[   14.214508] wlcore: allocating hw queue base: 0
[   14.723815] wlcore: cmd_box_addr 0xb007f8
[   14.723999] wlcore: MBOX ptrs: 0xb00adc 0xb00b6c
[   14.724151] wlcore: PHY firmware version: Rev 8.2.0.0.195
[   14.858795] wlcore: firmware booted (Rev 8.8.0.0.13)
[   14.864166] wlcore: 11a is supported
[   14.905242] wlcore: mac80211 bss info role 0 changed 0xe
[   14.910308] wlcore: mac80211 conf tx 0
[   14.912353] wlcore: mac80211 conf tx 1
[   14.916717] wlcore: mac80211 conf tx 2
[   14.918426] wlcore: mac80211 conf tx 3
[   14.920104] wlcore: mac80211 bss info role 0 changed 0x2000
[   14.921264] wlcore: mac80211 config psm off power 0 idle changed 0xffffff9f
[   14.930664] wlcore: mac80211 config psm off power 0 idle changed 0x10
[   14.947021] wlcore: mac80211 configure filter changed 0 total 80000000
[   15.058349] wlcore: mac80211 hw scan
[   15.680694] wlcore: mac80211 hw scan
[   23.627227] wlcore: mac80211 hw scan
[   24.250213] wlcore: mac80211 hw scan
[   32.190643] wlcore: mac80211 hw scan
[   32.808868] wlcore: mac80211 hw scan
[   35.744079] wlcore: wl1271_op_sched_scan_start

But on my system I see only this

root@overo:~# dmesg | grep wlcore
[    8.518829] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[    8.567565] wlcore: base address: oui 5c313e nic d142d2
[    8.712860] wlcore: loaded


Meaning these two functions (amongst others) are never getting called on
my systems

drivers/net/wireless/ti/wlcore/main.c: wl1271_op_start()

drivers/net/wireless/ti/wlcore/main.c: wl1271_op_add_interface()

These functions should be getting called by the mac80211 driver if
that is a clue to anyone.



If you reply to this email, your message will be added to the discussion below:
http://gumstix.8.x6.nabble.com/Help-with-bluetooth-and-Overo-Y-COMs-tp4971016p4971021.html
To start a new topic under Gumstix, email [hidden email]
To unsubscribe from Gumstix, click here.
NAML

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

Re: Help with bluetooth and Overo Y-COMs

Scott Ellis
In reply to this post by Scott Ellis
As I noted in a previous I masked that service and the bluetooth.service on the gumstix systemd system to disable bluetoorh. I can then bring up the bt manually. I can't seem to do the same on my system.


Sent from my U.S. Cellular® Smartphone


-------- Original message --------
From: arun
Date:07/27/2016 4:22 PM (GMT-05:00)
To: [hidden email]
Subject: Re: [Gumstix-users] Help with bluetooth and Overo Y-COMs

Hi Scott,

The systemd running on Gumstix uses a "99-bluetooth-via-uart.rules" which requires the "bluetooth-ttyO1-wilink.service" to initialize bluetooth on a Y-COM. Do you have the equivalent of those in sysvinit in your custom image? This service seems to be using the wl1271_sdio which seems relevant to the debug messages in your last email.

I am looking at this particular commit in the meta-gumstix layer as a reference: 72869d1a7abe18c65e88a5131e1612cc357bb8ab

-Arun

On Wed, Jul 27, 2016 at 12:24 PM, Scott Ellis [via Gumstix] <[hidden email]> wrote:
I also have some select debug enabled for the wlcore.ko module

root@overo:~# cat /etc/modprobe.d/wlcore.conf
options wlcore debug_level=0x04480a

And on the working gumstix system I see this

root@overo:~# dmesg | grep wlcore
[   13.894561] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[   13.930908] wlcore: base address: oui 5c313e nic d142d2
[   14.071441] wlcore: loaded
[   14.214416] wlcore: mac80211 start
[   14.214477] wlcore: mac80211 add interface type 2 mac 5c:31:3e:d1:42:d2
[   14.214508] wlcore: allocating hw queue base: 0
[   14.723815] wlcore: cmd_box_addr 0xb007f8
[   14.723999] wlcore: MBOX ptrs: 0xb00adc 0xb00b6c
[   14.724151] wlcore: PHY firmware version: Rev 8.2.0.0.195
[   14.858795] wlcore: firmware booted (Rev 8.8.0.0.13)
[   14.864166] wlcore: 11a is supported
[   14.905242] wlcore: mac80211 bss info role 0 changed 0xe
[   14.910308] wlcore: mac80211 conf tx 0
[   14.912353] wlcore: mac80211 conf tx 1
[   14.916717] wlcore: mac80211 conf tx 2
[   14.918426] wlcore: mac80211 conf tx 3
[   14.920104] wlcore: mac80211 bss info role 0 changed 0x2000
[   14.921264] wlcore: mac80211 config psm off power 0 idle changed 0xffffff9f
[   14.930664] wlcore: mac80211 config psm off power 0 idle changed 0x10
[   14.947021] wlcore: mac80211 configure filter changed 0 total 80000000
[   15.058349] wlcore: mac80211 hw scan
[   15.680694] wlcore: mac80211 hw scan
[   23.627227] wlcore: mac80211 hw scan
[   24.250213] wlcore: mac80211 hw scan
[   32.190643] wlcore: mac80211 hw scan
[   32.808868] wlcore: mac80211 hw scan
[   35.744079] wlcore: wl1271_op_sched_scan_start

But on my system I see only this

root@overo:~# dmesg | grep wlcore
[    8.518829] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[    8.567565] wlcore: base address: oui 5c313e nic d142d2
[    8.712860] wlcore: loaded


Meaning these two functions (amongst others) are never getting called on
my systems

drivers/net/wireless/ti/wlcore/main.c: wl1271_op_start()

drivers/net/wireless/ti/wlcore/main.c: wl1271_op_add_interface()

These functions should be getting called by the mac80211 driver if
that is a clue to anyone.



If you reply to this email, your message will be added to the discussion below:
http://gumstix.8.x6.nabble.com/Help-with-bluetooth-and-Overo-Y-COMs-tp4971016p4971021.html
To start a new topic under Gumstix, email [hidden email]
To unsubscribe from Gumstix, click here.
NAML



View this message in context: Re: Help with bluetooth and Overo Y-COMs
Sent from the Gumstix mailing list archive at Nabble.com.

------------------------------------------------------------------------------

_______________________________________________
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: Help with bluetooth and Overo Y-COMs

Scott Ellis
Seems like the wifi interface has to be up.

Initial state after boot

root@overo:~# dmesg | grep wlcore
[    8.905273] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[    8.923339] wlcore: base address: oui 5c313e nic d142d2
[    9.030059] wlcore: loaded


root@overo:~# ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr 5C:31:3E:D1:42:D2
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


root@overo:~# hciattach ttyO1 texas
Initialization timed out.


Now bring up wlan0

Note: wlan0 is not configured, no ip/dhcp or wpa_supplicant.conf

root@overo:~# ifconfig wlan0 up
[  109.259277] wlcore: PHY firmware version: Rev 8.2.0.0.195
[  109.361358] wlcore: firmware booted (Rev 8.8.0.0.13)
[  109.402221] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready


root@overo:~# ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr 5C:31:3E:D1:42:D2
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


The mac80211 subsystem is working, the wlcore callbacks are getting
called

root@overo:~# dmesg | grep wlcore
[    8.905273] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[    8.923339] wlcore: base address: oui 5c313e nic d142d2
[    9.030059] wlcore: loaded
[  108.794616] wlcore: mac80211 start
[  108.794647] wlcore: mac80211 add interface type 2 mac 5c:31:3e:d1:42:d2
[  108.794708] wlcore: allocating hw queue base: 0
[  109.258941] wlcore: cmd_box_addr 0xb007f8
[  109.259124] wlcore: MBOX ptrs: 0xb00adc 0xb00b6c
[  109.259277] wlcore: PHY firmware version: Rev 8.2.0.0.195
[  109.361358] wlcore: firmware booted (Rev 8.8.0.0.13)
[  109.366668] wlcore: 11a is supported
[  109.388763] wlcore: mac80211 bss info role 0 changed 0xe
[  109.391326] wlcore: mac80211 conf tx 0
[  109.394073] wlcore: mac80211 conf tx 1
[  109.395690] wlcore: mac80211 conf tx 2
[  109.397308] wlcore: mac80211 conf tx 3
[  109.398895] wlcore: mac80211 bss info role 0 changed 0x2000
[  109.399719] wlcore: mac80211 config psm off power 0 idle changed 0xffffff9f
[  109.402160] wlcore: mac80211 config psm off power 0 idle changed 0x10
[  109.413085] wlcore: mac80211 configure filter changed 0 total 80000000


And the bt interface can be attached now

root@overo:~# hciattach ttyO1 texas
Found a Texas Instruments' chip!
Firmware file : /lib/firmware/TIInit_11.8.32.bts
Loaded BTS script version 1
[  126.580230] Bluetooth: Core ver 2.19
[  126.584289] NET: Registered protocol family 31
[  126.588958] Bluetooth: HCI device and connection manager initialized
[  126.596160] Bluetooth: HCI socket layer initialized
[  126.601348] Bluetooth: L2CAP socket layer initialized
[  126.606872] Bluetooth: SCO socket layer initialized
[  126.624999] Bluetooth: HCI UART driver ver 2.2
[  126.629699] Bluetooth: HCI H4 protocol initialized
[  126.634857] Bluetooth: HCI BCSP protocol initialized
[  126.640106] Bluetooth: HCILL protocol initialized
Device setup complete


root@overo:~# hciconfig -a
hci0:   Type: BR/EDR  Bus: UART
        BD Address: 5C:31:3E:D1:42:D1  ACL MTU: 1021:6  SCO MTU: 180:4
        UP RUNNING
        RX bytes:601 acl:0 sco:0 events:29 errors:0
        TX bytes:387 acl:0 sco:0 commands:29 errors:0
        Features: 0xff 0xfe 0x2d 0xfe 0xdb 0xff 0x7b 0x87
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH HOLD SNIFF
        Link mode: SLAVE ACCEPT
        Name: ''
        Class: 0x001f00
        Service Classes: Unspecified
        Device Class: Invalid Device Class!
        HCI Version: 4.0 (0x6)  Revision: 0x0
        LMP Version: 4.0 (0x6)  Subversion: 0xac6c
        Manufacturer: Texas Instruments Inc. (13)


Maybe this saves someone else some time.
Loading...