javaos74 / btstack

Automatically exported from code.google.com/p/btstack
0 stars 0 forks source link

BTdaemon does not work (freeze) on mips architecture #269

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I succesfully built btstack for mips architecture with the latest libusb 
(1.0.9) to use it with my bluetooth usb key.
My uname -a gives me : Linux MiOS_123456789 2.6.37.1 #1 Fri Mar 2 05:49:10 PST 
2012 mips GNU/Linux

Here my configure line : 
$ ./configure --host=mipsel-openwrt-linux 
--prefix=/home/gostai/crosstools/openwrt/staging_dir/toolchain-mipsel_r2_gcc-4.6
-linaro_uClibc-0.9.33 --enable-relocatable --disable-rpath 
--disable-powermanagement --disable-springboard --with-vendor-id=0x0a5c 
--with-product-id=0x200a --with-hci-transport=usb

I tried the "inquiry" exemple but BTdaemon freezes. Here the following output 
with libusb verbosity : 

--------------------
root@MiOS_123456789:~/bluetooth# ./BTdaemon
BTdaemon started
registering packet handler
config.h: HAVE_RFCOMM
Socket created at /tmp/BTstack
Server up and running ...
socket_connection_accept new connection 5
DAEMON_EVENT_CONNECTION_OPENED 0x6f6058
Nr Connections changed, new 1
hci_power_control: 1, current mode 0
libusb: 0.000000 debug [libusb_init] libusb-1.0.9
libusb: 0.000387 debug [find_usbfs_path] found usbfs at /proc/bus/usb
libusb: 0.000578 debug [op_init] bulk continuation flag supported
libusb: 0.000683 debug [op_init] zero length packet flag supported
libusb: 0.000859 debug [op_init] found usb devices in sysfs
libusb: 0.001399 debug [usbi_add_pollfd] add fd 6 events 1
libusb: 0.001547 debug [usbi_io_init] timerfd not available (code -1 error 22)
libusb: 0.001660 debug [libusb_init] created default context
Want vend: 0a5c, prod: 200a
libusb: 0.001795 debug [libusb_get_device_list]
libusb: 0.001973 debug [sysfs_scan_device] scan usb1
libusb: 0.002541 debug [sysfs_scan_device] bus=1 dev=1
libusb: 0.002674 debug [enumerate_device] busnum 1 devaddr 1 session_id 257
libusb: 0.002791 debug [enumerate_device] allocating new device for 1/1 
(session 257)
libusb: 0.003285 debug [sysfs_scan_device] scan usb2
libusb: 0.003685 debug [sysfs_scan_device] bus=2 dev=1
libusb: 0.003810 debug [enumerate_device] busnum 2 devaddr 1 session_id 513
libusb: 0.003925 debug [enumerate_device] allocating new device for 2/1 
(session 513)
libusb: 0.005826 debug [sysfs_scan_device] scan 2-1
libusb: 0.006237 debug [sysfs_scan_device] bus=2 dev=2
libusb: 0.006360 debug [enumerate_device] busnum 2 devaddr 2 session_id 514
libusb: 0.006475 debug [enumerate_device] allocating new device for 2/2 
(session 514)
libusb: 0.006912 debug [libusb_get_device_descriptor]
libusb: 0.007118 debug [libusb_get_device_descriptor]
libusb: 0.007276 debug [libusb_get_device_descriptor]
libusb: 0.007442 debug [libusb_open] open 2.2
libusb: 0.007573 debug [op_open] opening /proc/bus/usb/002/002
libusb: 0.007699 debug [usbi_add_pollfd] add fd 8 events 4
libusb: 0.007870 debug [libusb_unref_device] destroy device 1.1
libusb: 0.007994 debug [libusb_unref_device] destroy device 2.1
libusb open 0, handle 0x6f6620
libusb: 0.008149 debug [libusb_kernel_driver_active] interface 0
libusb_detach_kernel_driver
claiming interface 0...
libusb: 0.008279 debug [libusb_claim_interface] interface 0
claimed interface 0
libusb: 0.008456 debug [submit_bulk_transfer] need 1 urbs for new transfer with 
length 1025
libusb: 0.008637 debug [submit_bulk_transfer] need 1 urbs for new transfer with 
length 1025
libusb: 0.008766 debug [submit_bulk_transfer] need 1 urbs for new transfer with 
length 1025
libusb: 0.008892 debug [submit_bulk_transfer] need 1 urbs for new transfer with 
length 1025
libusb: 0.009020 debug [submit_bulk_transfer] need 1 urbs for new transfer with 
length 1025
libusb: 0.009145 debug [submit_bulk_transfer] need 1 urbs for new transfer with 
length 1025
libusb: 0.009272 debug [submit_bulk_transfer] need 1 urbs for new transfer with 
length 1025
libusb: 0.009398 debug [submit_bulk_transfer] need 1 urbs for new transfer with 
length 1025
Async using timers:
New state: 1
Bluetooth status: 1
libusb: 0.009972 debug [libusb_get_next_timeout] next timeout in 1.998480s
libusb: 0.010162 debug [libusb_handle_events_timeout_completed] doing our own 
event handling
libusb: 0.010248 debug [handle_events] poll() 2 fds with timeout in 1999ms
libusb: 0.010372 debug [handle_events] poll() returned 1
libusb: 0.010468 debug [reap_for_handle] urb type=2 status=0 transferred=4
libusb: 0.010578 debug [handle_control_completion] handling completion status 0
libusb: 0.010669 debug [usbi_handle_transfer_completion] transfer 0x6f6bf4 has 
callback 0x42b9f0
libusb: 0.010780 debug [ctrl_transfer_cb] actual_length=4
libusb: 0.109681 debug [libusb_get_next_timeout] next timeout in 1.898772s
libusb: 0.109837 debug [libusb_handle_events_timeout_completed] doing our own 
event handling
libusb: 0.109921 debug [handle_events] poll() 2 fds with timeout in 0ms
libusb: 0.110028 debug [handle_events] poll() returned 1
libusb: 0.110126 debug [reap_for_handle] urb type=1 status=-140 transferred=6
libusb: 0.110238 debug [handle_bulk_completion] handling completion status -140 
of bulk urb 1/1
libusb: 0.110350 debug [handle_bulk_completion] last URB in transfer --> 
complete!
libusb: 0.110430 debug [usbi_handle_transfer_completion] transfer 0x6f66b4 has 
callback 0x4157c0
libusb: 0.110912 debug [libusb_get_next_timeout] next timeout in 1.897723s
libusb: 0.111048 debug [libusb_handle_events_timeout_completed] doing our own 
event handling
libusb: 0.111163 debug [handle_events] poll() 2 fds with timeout in 1898ms
libusb: 0.111274 debug [handle_events] poll() returned 1
libusb: 0.111363 debug [reap_for_handle] urb type=2 status=0 transferred=3
libusb: 0.111470 debug [handle_control_completion] handling completion status 0
libusb: 0.111556 debug [usbi_handle_transfer_completion] transfer 0x6f6bf4 has 
callback 0x42b9f0
libusb: 0.111661 debug [ctrl_transfer_cb] actual_length=3
libusb: 0.111763 debug [submit_bulk_transfer] need 1 urbs for new transfer with 
length 1025
--------------------

inquiry displays nothing.

The same program with the same usb bluetooth key works on my x86 uptodate 
ubuntu computer.

Whats wrong ?

Original issue reported on code.google.com by jc.mamm...@gmail.com on 27 May 2012 at 6:09

GoogleCodeExporter commented 9 years ago
hi. awesome. do you have documentation of that on the web?
I have no idea. It mostly likely gets stuck in the USB transport driver. If you 
find where it hands, please post on the btstack developer group (see project 
home page on the left)

Original comment by matthias.ringwald@gmail.com on 10 Dec 2012 at 10:41