2010-02-18 15:50:23     Blackfin Bluetooth failures

Document created by Aaronwu Employee on Aug 20, 2013
Version 1Show Document
  • View in full screen mode

2010-02-18 15:50:23     Blackfin Bluetooth failures

Peter Naulls (UNITED STATES)

Message: 86207   

 

If there's no devices to detect, then hcitool fails:

 

root:/> hcitool scan

Scanning ...

Inquiry failed: Cannot allocate memory

 

 

Perhaps this is a harmless corner case, but it might point to more serious problems. I'm trying to run TCP/IP over bluetooth.

 

Given this, I build instead against bluez-libs-3.36 and also bluez-utils (requires dbus, expat) which didn't help anything here.

 

I have also attempted to build bluez-4.61, but this requires glib and gettext, which don't build right now.

 

I can supply relevant patches.

QuoteReplyEditDelete

 

 

2010-02-18 17:19:36     Re: Blackfin Bluetooth failures

Peter Naulls (UNITED STATES)

Message: 86209   

 

Further, running pand as a server on blackfin:

 

> pand -s -M --role=NAP -n --nosdp

pand[520]: Bluetooth PAN daemon version 2.25

 

 

Then trying to connect from elsewhere:

 

> pand -s -M --role=NAP -n --nosdp

 

Causes blackfin to barf:

 

Data access misaligned address violation

<5> - Attempted misaligned data memory or data cache access.

...

 

Hardware Trace:

   0 Target : <0x00204540> { _trap_c + 0x0 }

     Source : <0xffa006a0> { _exception_to_level5 + 0xa4 } CALL pcrel

   1 Target : <0xffa005fc> { _exception_to_level5 + 0x0 }          

     Source : <0xffa004b0> { _bfin_return_from_exception + 0x18 } RTX

   2 Target : <0xffa00498> { _bfin_return_from_exception + 0x0 }   

     Source : <0xffa00554> { _ex_trap_c + 0x74 } JUMP.S            

   3 Target : <0xffa004e0> { _ex_trap_c + 0x0 }                    

     Source : <0xffa00766> { _trap + 0x5a } JUMP (P4)              

   4 Target : <0xffa0070c> { _trap + 0x0 }                         

     Source : <0x00436b94> { _l2cap_parse_conf_req + 0x7c } IF !CC JUMP

   5 Target : <0x00436b7e> { _l2cap_parse_conf_req + 0x66 }          

     Source : <0x00436b5e> { _l2cap_parse_conf_req + 0x46 } JUMP.S   

   6 Target : <0x00436b18> { _l2cap_parse_conf_req + 0x0 }           

     Source : <0x004391a6> { _l2cap_recv_frame + 0x16ae } CALL pcrel 

   7 Target : <0x0043919c> { _l2cap_recv_frame + 0x16a4 }            

     Source : <0x00438f74> { _l2cap_recv_frame + 0x147c } IF !CC JUMP

   8 Target : <0x00438f68> { _l2cap_recv_frame + 0x1470 }            

     Source : <0x002f6196> { _memcpy + 0x5a } RTS                    

   9 Target : <0x002f618e> { _memcpy + 0x52 }                        

     Source : <0x002f6158> { _memcpy + 0x1c } IF !CC JUMP            

  10 Target : <0x002f613c> { _memcpy + 0x0 }                         

     Source : <0x00438f64> { _l2cap_recv_frame + 0x146c } CALL pcrel 

  11 Target : <0x00438f52> { _l2cap_recv_frame + 0x145a }            

     Source : <0x00438c78> { _l2cap_recv_frame + 0x1180 } IF !CC JUMP

  12 Target : <0x00438c68> { _l2cap_recv_frame + 0x1170 }            

     Source : <0x00438c64> { _l2cap_recv_frame + 0x116c } IF CC JUMP 

  13 Target : <0x00438c5a> { _l2cap_recv_frame + 0x1162 }            

     Source : <0x00438102> { _l2cap_recv_frame + 0x60a } JUMP.S      

  14 Target : <0x004380ec> { _l2cap_recv_frame + 0x5f4 }             

     Source : <0x004380da> { _l2cap_recv_frame + 0x5e2 } IF CC JUMP  

  15 Target : <0x004380b8> { _l2cap_recv_frame + 0x5c0 }             

     Source : <0x00437ec8> { _l2cap_recv_frame + 0x3d0 } JUMP (P2)  

QuoteReplyEditDelete

 

 

2010-02-19 10:34:40     Re: Blackfin Bluetooth failures

Robin Getz (UNITED STATES)

Message: 86230   

 

Peter:

 

To provide any meaningful insight - we need the entire dump, not just a snippet.

 

Otherwise:

 

https://docs.blackfin.uclinux.org/doku.php?id=uclinux-dist:analyzing_traces

 

-Robin

QuoteReplyEditDelete

 

 

2010-02-19 20:05:34     Re: Blackfin Bluetooth failures

Peter Naulls (UNITED STATES)

Message: 86240   

 

I'd thought I'd given enough context :-(  Anyway, here is the complete thing.  The client connection command is actually:

 

pand --nodetach --role PANU --search --nosdp (on x86 PC)

 

 

root:/> pand -s -M --role=NAP -n --nosdp            

pand[461]: Bluetooth PAN daemon version 2.25        

Data access misaligned address violation            

<5> - Attempted misaligned data memory or data cache access.

Kernel OOPS in progress                                   

Deferred Exception context                                

No Valid process in current context                       

return address: [0x00436d00]; contents of:                

0x00436ce0:  0000  604a  bd71  e3f5  fa2b  a1b3  ad71  2f44

0x00436cf0:  e65e  00ad  2f41  b7b6  2f3f  6c12  9116  2f53

0x00436d00: [a456] 2f51  e496  0002  2f4e  0000  e498  015c

0x00436d10:  67e8  0e08  1421  e51a  0086  e599  01a4  e120

 

ADSP-BF548-0.2 525(MHz CCLK) 131(MHz SCLK) (mpu off)

Linux version 2.6.32.8-ADI-2010R1-pre (peter@lego) (gcc version 4.3.3 (ADI-09r1-10) ) #449 Thu Feb 18 12:27:18 PST 2010

 

SEQUENCER STATUS:               Not tainted

SEQSTAT: 00002024  IPEND: c008  IMASK: ffff  SYSCFG: 0006

  EXCAUSE   : 0x24                                      

  physical IVG3 asserted : <0xffa0070c> { _trap + 0x0 } 

  physical IVG14 asserted : <0xffa00a54> { _evt_evt14 + 0x0 }

  physical IVG15 asserted : <0xffa00f54> { _evt_system_call + 0x0 }

  logical irq   6 mapped  : <0xffa003a4> { _bfin_coretmr_interrupt + 0x0 }

  logical irq   9 mapped  : <0x00309108> { _bfin_bf54x_irq_error + 0x0 }

  logical irq  14 mapped  : <0x0037b1ac> { _bfin_rtc_interrupt + 0x0 }  

  logical irq  48 mapped  : <0x00321c78> { _bfin_serial_dma_rx_int + 0x0 }

  logical irq  49 mapped  : <0x003219fc> { _bfin_serial_dma_tx_int + 0x0 }

  logical irq  52 mapped  : <0x0037e2f8> { _bfin_twi_interrupt_entry + 0x0 }

  logical irq  53 mapped  : <0x0037e2f8> { _bfin_twi_interrupt_entry + 0x0 }

  logical irq  68 mapped  : <0x00347900> { _bfin_ata_interrupt + 0x0 }    

  logical irq  74 mapped  : <0x00356880> { _bf5xx_nand_dma_irq + 0x0 }    

  logical irq  82 mapped  : <0x0037181c> { _blackfin_interrupt + 0x0 }    

  logical irq  85 mapped  : <0x00374bc8> { _dma_controller_irq + 0x0 }    

  logical irq 123 mapped  : <0x00378c04> { _ad7877_irq + 0x0 }            

  logical irq 175 mapped  : <0x0035e490> { _smsc911x_irqhandler + 0x0 }   

RETE: <0x00000000> /* Maybe null pointer? */                             

RETN: <0x00573c40> /* kernel dynamic memory (maybe user-space) */        

RETX: <0x00000480> /* Maybe fixed code section */                        

RETS: <0x004391aa> { _l2cap_recv_frame + 0x16b2 }                        

PC  : <0x00436d00> { _l2cap_parse_conf_req + 0x1e8 }                     

DCPLB_FAULT_ADDR: <0x02048564> /* kernel dynamic memory (maybe user-space) */

ICPLB_FAULT_ADDR: <0x00436d00> { _l2cap_parse_conf_req + 0x1e8 }           

PROCESSOR STATE:                                                           

R0 : 00000000    R1 : 00573d50    R2 : 000002a0    R3 : 00000004          

R4 : 00000004    R5 : 00000001    R6 : 00000000    R7 : 00000002          

P0 : 00000004    P1 : 005398fc    P2 : 02048563    P3 : 02048400          

P4 : 00573d50    P5 : 02048567    FP : 0000007f    SP : 00573b64          

LB0: 002f6194    LT0: 002f6192    LC0: 00000000                           

LB1: 002089a2    LT1: 002089a2    LC1: 00000000                           

B0 : 00000000    L0 : 00000000    M0 : 00000000    I0 : 00573ed4          

B1 : 00000000    L1 : 00000000    M1 : 00000000    I1 : 008b5014          

B2 : 00000000    L2 : 00000000    M2 : 00000000    I2 : 00000000          

B3 : 00000000    L3 : 00000000    M3 : 00000000    I3 : 00000000          

A0.w: 00000014   A0.x: 00000000   A1.w: 00000014   A1.x: 00000000          

USP : 00574000  ASTAT: 02003025                                            

 

Hardware Trace:

   0 Target : <0x00204540> { _trap_c + 0x0 }

     Source : <0xffa006a0> { _exception_to_level5 + 0xa4 } CALL pcrel

   1 Target : <0xffa005fc> { _exception_to_level5 + 0x0 }          

     Source : <0xffa004b0> { _bfin_return_from_exception + 0x18 } RTX

   2 Target : <0xffa00498> { _bfin_return_from_exception + 0x0 }   

     Source : <0xffa00554> { _ex_trap_c + 0x74 } JUMP.S            

   3 Target : <0xffa004e0> { _ex_trap_c + 0x0 }                    

     Source : <0xffa00766> { _trap + 0x5a } JUMP (P4)              

   4 Target : <0xffa0070c> { _trap + 0x0 }                         

     Source : <0x00436b94> { _l2cap_parse_conf_req + 0x7c } IF !CC JUMP

   5 Target : <0x00436b7e> { _l2cap_parse_conf_req + 0x66 }          

     Source : <0x00436b5e> { _l2cap_parse_conf_req + 0x46 } JUMP.S   

   6 Target : <0x00436b18> { _l2cap_parse_conf_req + 0x0 }           

     Source : <0x004391a6> { _l2cap_recv_frame + 0x16ae } CALL pcrel 

   7 Target : <0x0043919c> { _l2cap_recv_frame + 0x16a4 }            

     Source : <0x00438f74> { _l2cap_recv_frame + 0x147c } IF !CC JUMP

   8 Target : <0x00438f68> { _l2cap_recv_frame + 0x1470 }            

     Source : <0x002f6196> { _memcpy + 0x5a } RTS                    

   9 Target : <0x002f618e> { _memcpy + 0x52 }                        

     Source : <0x002f6158> { _memcpy + 0x1c } IF !CC JUMP            

  10 Target : <0x002f6150> { _memcpy + 0x14 }                        

     Source : <0x002f6148> { _memcpy + 0xc } IF !CC JUMP             

  11 Target : <0x002f613c> { _memcpy + 0x0 }

     Source : <0x00438f64> { _l2cap_recv_frame + 0x146c } CALL pcrel

  12 Target : <0x00438f52> { _l2cap_recv_frame + 0x145a }

     Source : <0x00438c78> { _l2cap_recv_frame + 0x1180 } IF !CC JUMP

  13 Target : <0x00438c68> { _l2cap_recv_frame + 0x1170 }

     Source : <0x00438c64> { _l2cap_recv_frame + 0x116c } IF CC JUMP

  14 Target : <0x00438c5a> { _l2cap_recv_frame + 0x1162 }

     Source : <0x00438102> { _l2cap_recv_frame + 0x60a } JUMP.S

  15 Target : <0x004380ec> { _l2cap_recv_frame + 0x5f4 }

     Source : <0x004380da> { _l2cap_recv_frame + 0x5e2 } IF CC JUMP

Kernel Stack

Stack info:

SP: [0x00573f4c] <0x00573f4c> /* kernel dynamic memory (maybe user-space) */

Memory from 0x00573f40 to 00574000

00573f40: 00000000  00000000  00000000 [00000000] 00000000  00000000  00000000  00000000

00573f60: 005b7e0c  00574000  0052526c  ffa00118  00572008  00572008  0054476c  00547a1c

00573f80: 00000000  ffa00118  00599d54  00000000  00000000  00000001  08d24da6  0000ffff

00573fa0: 0000ffff  0000ffff  00000000  00000006  00000000  00597384  00599d54  00574000

00573fc0: 00574732  00535b10  00525004  00000000  00597384  004a5e04  00597384  0052364c

00573fe0: 00000083  005742d8  00599d54 <00586bc6> 00000000  00000000  ffb00000  00000000

Return addresses in stack:

    address : <0x00586bc6> { _real_start + 0x1e }

Modules linked in:

Kernel panic - not syncing: Kernel exception

QuoteReplyEditDelete

 

 

2010-02-22 04:45:00     Re: Blackfin Bluetooth failures

Yi Li (CHINA)

Message: 86315   

 

Peter,

 

We need detail information to reproduce/debug.

 

I would suggest to try 2009R1.1-rc4 release - since we tested bluetooth on that release, but not on trunk.

 

Also what blue/usb dongle are you using? Please post your boot message.

 

We can try bluetooth usb on svn trunk on BF548.

 

-Yi

QuoteReplyEditDelete

 

 

2010-02-22 14:47:16     Re: Blackfin Bluetooth failures

Peter Naulls (UNITED STATES)

Message: 86338   

 

on R1.1, I tried the same.  Its version of pand lacks fork/vfork patches, so I copied the source for bluez-utils-2.25 from trunk, which does have those patches, but is otherwise identical.  What follows here is all R1.1RC4

 

This does work a lot better, and I did have networking briefly.  However, I an still running into USB problems.

 

For example:

 

root:/> ifconfig bnep0 192.168.3.2

root:/> usb 1-1: USB disconnect, address 3

btusb_intr_complete: hci0 urb 0327d3c0 failed to resubmit (19)

btusb_bulk_complete: hci0 urb 0327d4c0 failed to resubmit (19)

btusb_bulk_complete: hci0 urb 0327d2c0 failed to resubmit (19)

btusb_send_frame: hci0 urb 0327d2c0 submission failed       

__set_isoc_interface: hci0 setting interface failed (19)    

usb 1-1: new full speed USB device using musb_hdrc and address 4

usb 1-1: configuration #1 chosen from 1 choice                

usb 1-1: New USB device found, idVendor=050d, idProduct=0084  

usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0

 

 

The disconnect above occurs as soon as I ping from the other end.  I turned off USB DMA in a subsequent test, and this problem hasn't reappeared (but I will report if it does).

 

The bluetooth adpater I am using on the blackfin:

 

Bus 002 Device 005: ID 050d:0084 Belkin Components F8T003v2 Bluetooth

 

This is a relatively old device.

 

On the PC, I am using a device I bought a few days ago:

 

Bus 001 Device 017: ID 0a5c:2154 Broadcom Corp.

Bus 001 Device 016: ID 0a5c:4503 Broadcom Corp.

Bus 001 Device 015: ID 0a5c:4502 Broadcom Corp. Keyboard (Boot Interface Subclass)

Bus 001 Device 014: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)

 

So, it appears as a hub.  When I use this on blackfin (I really have 2 boards, I want bluetooth between), this has its own problem:

 

hciconfig hci0 pscan

hci_cmd_task: hci0 command tx timeout

usb 1-1.1: input irq status -75  received

 

 

Thanks again.

QuoteReplyEditDelete

 

 

2010-02-22 15:14:49     Re: Blackfin Bluetooth failures

Robin Getz (UNITED STATES)

Message: 86341   

 

Peter:

 

Any device with an embedded Hub will not work on an OTG host (like the blackfin is).

 

-Robin

QuoteReplyEditDelete

 

 

2010-02-22 15:22:13     Re: Blackfin Bluetooth failures

Peter Naulls (UNITED STATES)

Message: 86343   

 

And why is this?  I appreciate that there are kernel options controlling this which I have disabled regarding OTG hubs (without it, the device would not be visible at all), but is there another technical reason?

 

Regards.

QuoteReplyEditDelete

 

 

2010-02-22 15:45:36     Re: Blackfin Bluetooth failures

Mike Frysinger (UNITED STATES)

Message: 86350   

 

it's a hardware limitation as documented.  absolutely no way of working around it in software.  it will always be this way on BF52x/BF54x parts.

QuoteReplyEditDelete

Attachments

    Outcomes