h4_recv errors and bluetooth performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Friends,

 I'm experiencing some issues related to bluetooth performance and am
looking for suggestions/advice on things I could do to debug it. I am
getting about 40ms latency. I'm not sure if this is normal or not.
More worryingly, I'm also getting hci errors and h4 unknown packets
when I try to do more than just ping over bluetooth. I've appended
log data below. I'm using a 2.6.25 kernel.

The errors seem limited to the hci drivers. At least, I don't see any
bnep or other prefixes. I looked at h4_recv and see that this error
condition is reached when:
drivers/bluetooth/hci_h4.c
217                 /* H4_W4_PACKET_TYPE */
219                 case HCI_EVENT_PKT:
blah
226                 case HCI_ACLDATA_PKT:
blah
233                 case HCI_SCODATA_PKT:
blah
240                 default:
241                         BT_ERR("Unknown HCI packet type %2.2x", (__u8)*ptr);
242                         hu->hdev->stat.err_rx++;
243                         ptr++; count--;
244                         continue;
245                 };

And I guess h4_recv is called by the uart driver. Does this mean the
uart data is getting mangled or possibly lost? Any advice on how to
debug and try to address this would be welcome.

 Thanks,
 jaya

 From my laptop to gumstix: Laptop is using a D-Link DBT-120 bluetooth dongle.
 # l2ping 00:80:37:2E:31:7D
 Ping: 00:80:37:2E:31:7D from 00:15:E9:65:3B:C5 (data size 44) ...
 44 bytes from 00:80:37:2E:31:7D id 0 time 44.34ms
 44 bytes from 00:80:37:2E:31:7D id 1 time 24.79ms
 <snip>
 44 bytes from 00:80:37:2E:31:7D id 7 time 27.08ms
 44 bytes from 00:80:37:2E:31:7D id 8 time 53.13ms
 ^C9 sent, 9 received, 0% loss

 Then from gumstix to the laptop:
 # l2ping 00:15:E9:65:3B:C5
 Ping: 00:15:E9:65:3B:C5 from 00:80:37:2E:31:7D (data size 44) ...
 44 bytes from 00:15:E9:65:3B:C5 id 0 time 40.87ms
 44 bytes from 00:15:E9:65:3B:C5 id 1 time 41.58ms
 <snip>
 44 bytes from 00:15:E9:65:3B:C5 id 6 time 40.45ms
 44 bytes from 00:15:E9:65:3B:C5 id 7 time 41.74ms
 8 sent, 8 received, 0% loss

 Normal ping. gumstix is 192.168.50.100.
 laptop pinging gumstix
 # ping 192.168.50.100
 PING 192.168.50.100 (192.168.50.100) 56(84) bytes of data.
 64 bytes from 192.168.50.100: icmp_seq=1 ttl=64 time=66.7 ms
 <snip>
 ^C
 --- 192.168.50.100 ping statistics ---
 6 packets transmitted, 6 received, 0% packet loss, time 5020ms
 rtt min/avg/max/mdev = 26.279/41.658/66.730/12.928 ms

 gumstix pinging laptop
 # ping 192.168.50.1
 PING 192.168.50.1 (192.168.50.1): 56 data bytes
 84 bytes from 192.168.50.1: icmp_seq=0 ttl=64 time=72.4 ms
 <snip>
 --- 192.168.50.1 ping statistics ---
 6 packets transmitted, 6 packets received, 0% packet loss
 round-trip min/avg/max = 44.0/54.0/72.4 ms

 But at least there aren't any errors or packet loss. When I'm testing
 normal apps that probably transfer more data, I get the following
 error messages:
 h4_check_data_len: Data length is too large
 h4_recv: Unknown HCI packet type 00
 h4_recv: Unknown HCI packet type df
 h4_recv: Unknown HCI packet type 05
 <snip>
 h4_recv: Unknown HCI packet type 00
 h4_check_data_len: Data length is too large
 h4_recv: Unknown HCI packet type 00
 <snip>
 h4_recv: Unknown HCI packet type 00
 h4_check_data_len: Data length is too large
 h4_recv: Unknown HCI packet type 00
 <snip>
 h4_recv: Unknown HCI packet type 38
 h4_recv: Unknown HCI packet type 00
 hci_acldata_packet: hci0 ACL packet for unknown connection handle 8
 hci_scodata_packet: hci0 SCO packet for unknown connection handle 13
 hci_scodata_packet: hci0 SCO packet for unknown connection handle 11
 hci_scodata_packet: hci0 SCO packet for unknown connection handle 11
 hci_scodata_packet: hci0 SCO packet for unknown connection handle 0
 hci_acldata_packet: hci0 ACL packet for unknown connection handle 512
 h4_recv: Unknown HCI packet type 00
 <snip>
 hci_acldata_packet: hci0 ACL packet for unknown connection handle 8
 hci_scodata_packet: hci0 SCO packet for unknown connection handle 6
 hci_scodata_packet: hci0 SCO packet for unknown connection handle 0
 hci_scodata_packet: hci0 SCO packet for unknown connection handle 10

 and that just dies after a point.

 ps: module details:
 # hcitool info 00:80:37:2E:31:7D
 Requesting information ...
       BD Address:  00:80:37:2E:31:7D
       Device Name: Gumstix (0)
       LMP Version: 2.0 (0x3) LMP Subversion: 0x62b9
       Manufacturer: Infineon Technologies AG (9)
       Features: 0xff 0xff 0x8f 0xfe 0x9b 0xf9 0x00 0x80
               <3-slot packets> <5-slot packets> <encryption> <slot offset>
               <timing accuracy> <role switch> <hold mode> <sniff mode>
               <park state> <RSSI> <channel quality> <SCO link> <HV2 packets>
               <HV3 packets> <u-law log> <A-law log> <CVSD> <paging scheme>
               <power control> <transparent SCO> <broadcast encrypt>
               <EDR ACL 2 Mbps> <EDR ACL 3 Mbps> <enhanced iscan>
               <interlaced iscan> <interlaced pscan> <inquiry with RSSI>
               <extended SCO> <EV4 packets> <EV5 packets> <AFH cap. slave>
               <AFH class. slave> <3-slot EDR ACL> <5-slot EDR ACL>
               <AFH cap. master> <AFH class. master> <EDR eSCO 2 Mbps>
               <EDR eSCO 3 Mbps> <3-slot EDR eSCO> <extended features>
 # hcitool lq 00:80:37:2E:31:7D
 Link quality: 230
 # hcitool tpl 00:80:37:2E:31:7D
 Current transmit power level: 3

 looking at laptop data:
 # hcitool info 00:15:E9:65:3B:C5
 Requesting information ...
       BD Address:  00:15:E9:65:3B:C5
       Device Name: lappy1-0
       LMP Version: 1.1 (0x1) LMP Subversion: 0x20d
       Manufacturer: Cambridge Silicon Radio (10)
       Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
               <3-slot packets> <5-slot packets> <encryption> <slot offset>
               <timing accuracy> <role switch> <hold mode> <sniff mode>
               <park state> <RSSI> <channel quality> <SCO link> <HV2 packets>
               <HV3 packets> <u-law log> <A-law log> <CVSD> <paging scheme>
               <power control> <transparent SCO>
 # hcitool lq 00:15:E9:65:3B:C5
 Link quality: 151
 # hcitool tpl 00:15:E9:65:3B:C5
 Current transmit power level: 4
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux