All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: l2cap sockets not properly multiplexed on ARM
@ 2013-10-29 20:44 Tim Tisdall
  2013-10-30 11:24 ` Alexander Holler
  0 siblings, 1 reply; 24+ messages in thread
From: Tim Tisdall @ 2013-10-29 20:44 UTC (permalink / raw)
  To: linux-bluetooth

on IRC:
<lizardo> dack: it would be nice if you could provide a sample C code that shows the issue you described on the mailing list
<lizardo> specially the arguments you are using for bind/connect/setsockopt/listen/*   (I'm assuming you are using sockets directly)
<dack> lizardo:  unfortunately my code is a mess of C mixed with Python.   yeah, I could provide the argument details



HCI sockets
-----------

socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI)
bind(device_id)  // I get device_id's from udev
hci_le_set_scan_parameters(fd, 0, 0x10, 0x10, 0, 0, 1000)  // bluez method in the shared library
setsockopt(SOL_HCI, HCI_FILTER, hci_filter) // I set the filter to let everything through (for testing)
hci_le_set_scan_enable(fd, 1, 0, 1000)  // bluez method in the shared library to turn on scanning
// I shut blocking off on the socket
// I then use epoll to wait for events

L2CAP sockets
-------------

socket(AF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP)
bind(bdaddr, 0)  // bind to bluetooth address and PSM 0 (Python doesn't support LE directly,
                 // but this is enough for binding to the right device
// shut blocking off

// next part I do in C because of the lack of support in Python...
    PySocketSockObject *sock;  // the socket I created in Python
    char *bdaddr;
    int cid = 0;
    int psm = 0;
    int bdaddr_type = BDADDR_LE_PUBLIC;
    int err;
    struct sockaddr_l2 addr;
       

    // code here to set &bdaddr, &cid, &psm, &bdaddr_type
    // from arguments passed from Python or they're
    // left to their defaults

       
    memset(&addr, 0, sizeof(addr));
    addr.l2_family = sock->sock_family;
    str2ba(bdaddr, &addr.l2_bdaddr);
    
    if (cid)
            addr.l2_cid = htobs(cid);
    else
            addr.l2_psm = htobs(psm);
   
    addr.l2_bdaddr_type = bdaddr_type;
   
   
    err = connect(sock->sock_fd, (struct sockaddr *) &addr, sizeof(addr));

// lastly use epoll to wait for events


I then set CCC values on some attributes to get notifications of changes to sensor readings


Results
-------

On my x86 tests:  everything works fine, notifications come down the proper L2CAP sockets
on my ARM tests:  all notifications come down whatever L2CAP socket was established last


I just realized I missed some fundamental details in the previous emails...

bluez 4.101
linux kernel 3.4.43 compiled with ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf on Allwinner A10 chipset
tried on various armhf chipsets with the same results using kernel 3.0.X

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: l2cap sockets not properly multiplexed on ARM
  2013-10-29 20:44 l2cap sockets not properly multiplexed on ARM Tim Tisdall
@ 2013-10-30 11:24 ` Alexander Holler
  2013-10-30 11:46   ` Alexander Holler
  0 siblings, 1 reply; 24+ messages in thread
From: Alexander Holler @ 2013-10-30 11:24 UTC (permalink / raw)
  To: Tim Tisdall; +Cc: linux-bluetooth

Am 29.10.2013 21:44, schrieb Tim Tisdall:

> L2CAP sockets
> -------------
>
> socket(AF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP)
> bind(bdaddr, 0)  // bind to bluetooth address and PSM 0 (Python doesn't support LE directly,
>                   // but this is enough for binding to the right device

That looks wrong. Try to bind to ATT_CID (4).

Regards,

Alexander Holler



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: l2cap sockets not properly multiplexed on ARM
  2013-10-30 11:24 ` Alexander Holler
@ 2013-10-30 11:46   ` Alexander Holler
  2013-10-30 13:15     ` Tim Tisdall
  0 siblings, 1 reply; 24+ messages in thread
From: Alexander Holler @ 2013-10-30 11:46 UTC (permalink / raw)
  To: Tim Tisdall; +Cc: linux-bluetooth

Am 30.10.2013 12:24, schrieb Alexander Holler:
> Am 29.10.2013 21:44, schrieb Tim Tisdall:
>
>> L2CAP sockets
>> -------------
>>
>> socket(AF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP)
>> bind(bdaddr, 0)  // bind to bluetooth address and PSM 0 (Python
>> doesn't support LE directly,
>>                   // but this is enough for binding to the right device
>
> That looks wrong. Try to bind to ATT_CID (4).
>

And don't forget to check the return code of bind (as well as of 
setsockopt and other calls).

Regards,

Alexander Holler


^ permalink raw reply	[flat|nested] 24+ messages in thread

* RE: l2cap sockets not properly multiplexed on ARM
  2013-10-30 11:46   ` Alexander Holler
@ 2013-10-30 13:15     ` Tim Tisdall
  2013-10-30 14:16       ` Alexander Holler
  0 siblings, 1 reply; 24+ messages in thread
From: Tim Tisdall @ 2013-10-30 13:15 UTC (permalink / raw)
  To: Alexander Holler; +Cc: linux-bluetooth

I knew someone would bring that up.  :)  I can't because python only supports sending 2 arguments to bind for that type of socket, and the result is what i want.  I'm using multiple dongles and need to specify which dongle to use for the connection.  However, before I even put that bind statement in there I still had the very same problem, so you can effectively remove that statement and the underlying system will just bind to whichever dongle it pleases and the same problem exists.  Everything works fine on x86 systems and on the ARM architectures the multiplexing goes south.

Also, I'm checking the return codes of everything and there's no errors occurring.  You can even see with the btmon log that the ACL packets are being addressed to the right connection handles but the data is coming out the wrong sockets.  The problem exists on the other end of the socket; the kernel side.

-Tim
________________________________________
From: Alexander Holler [holler@ahsoftware.de]
Sent: October 30, 2013 7:46 AM
To: Tim Tisdall
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: l2cap sockets not properly multiplexed on ARM

Am 30.10.2013 12:24, schrieb Alexander Holler:
> Am 29.10.2013 21:44, schrieb Tim Tisdall:
>
>> L2CAP sockets
>> -------------
>>
>> socket(AF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP)
>> bind(bdaddr, 0)  // bind to bluetooth address and PSM 0 (Python
>> doesn't support LE directly,
>>                   // but this is enough for binding to the right device
>
> That looks wrong. Try to bind to ATT_CID (4).
>

And don't forget to check the return code of bind (as well as of
setsockopt and other calls).

Regards,

Alexander Holler


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: l2cap sockets not properly multiplexed on ARM
  2013-10-30 13:15     ` Tim Tisdall
@ 2013-10-30 14:16       ` Alexander Holler
  2013-10-30 15:06         ` Tim Tisdall
  0 siblings, 1 reply; 24+ messages in thread
From: Alexander Holler @ 2013-10-30 14:16 UTC (permalink / raw)
  To: Tim Tisdall; +Cc: linux-bluetooth

Am 30.10.2013 14:15, schrieb Tim Tisdall:

> The problem exists on the other end of the socket; the kernel side.

Do you have tried using gattool to verify that?

Regards,

Alexander Holler


^ permalink raw reply	[flat|nested] 24+ messages in thread

* RE: l2cap sockets not properly multiplexed on ARM
  2013-10-30 14:16       ` Alexander Holler
@ 2013-10-30 15:06         ` Tim Tisdall
  2013-10-30 15:10           ` Tim Tisdall
  2013-10-30 19:40           ` Marcel Holtmann
  0 siblings, 2 replies; 24+ messages in thread
From: Tim Tisdall @ 2013-10-30 15:06 UTC (permalink / raw)
  To: Alexander Holler; +Cc: linux-bluetooth

Yes, confirmed with gatttool.  I used 3 terminals with one running btmon and the other 2 gatttool.  I started btmon then ran gatttool on one terminal starting the notifications.  Then I started another gatttool in another terminal and that new one then showed the results of both devices while the first gatttool stopped displaying any new notifications.  You can see in the btmon that the values are coming from 2 different connection handles but the results are all coming through the 2nd gatttool.  Here's the outputs using 3 terminals connected to the device (first listing was connected first):

So it's perfectly clear:  This all works fine on an x86 machine, but is an issue on ARM

--------------------
root@linaro-server:~# gatttool -i 0 -b 78:C5:E5:6C:47:D3 --char-write-req --handle=0x002b --value=0100 --listen
Characteristic value was written successfully
Notification handle = 0x002a value: e9 
Notification handle = 0x002a value: f9 
Notification handle = 0x002a value: 06 
Notification handle = 0x002a value: db 
Notification handle = 0x002a value: e8 
Notification handle = 0x002a value: f0 
Notification handle = 0x002a value: dd 
Notification handle = 0x002a value: fa 
Notification handle = 0x002a value: 00 
Notification handle = 0x002a value: f7 
Notification handle = 0x002a value: 00 

--------------------
root@linaro-server:~# gatttool -i 0 -b 78:C5:E5:6C:47:A2  --char-write-req --handle=0x002b --value=0100 --listen
Characteristic value was written successfully
Notification handle = 0x002e value: fa 
Notification handle = 0x0032 value: c1 
Notification handle = 0x002a value: 0b 
Notification handle = 0x002e value: e7 
Notification handle = 0x0032 value: da 
Notification handle = 0x002a value: 9d 
Notification handle = 0x002e value: 80 
Notification handle = 0x0032 value: 80 
Notification handle = 0x002a value: ff 
Notification handle = 0x002e value: fa 
Notification handle = 0x0032 value: c8 
Notification handle = 0x0032 value: c1 
Notification handle = 0x002a value: 43 
Notification handle = 0x002a value: f4 
Notification handle = 0x002a value: ee 
Notification handle = 0x002a value: e0 
Notification handle = 0x002a value: f0 
Notification handle = 0x002a value: fe 
Notification handle = 0x002a value: 04 
Notification handle = 0x002a value: fe 
Notification handle = 0x002a value: 17 
Notification handle = 0x002e value: 35 
Notification handle = 0x0032 value: 83 
Notification handle = 0x002a value: 07 
Notification handle = 0x002e value: f5 
Notification handle = 0x0032 value: c1 
Notification handle = 0x0032 value: ca 
Notification handle = 0x002e value: 11 
Notification handle = 0x0032 value: c4 
Notification handle = 0x002e value: 06 
Notification handle = 0x0032 value: ba 
Notification handle = 0x002a value: fc 
Notification handle = 0x002e value: fb 
Notification handle = 0x0032 value: c6 
Notification handle = 0x0032 value: c0 
Notification handle = 0x002a value: e3 
Notification handle = 0x002a value: f7 
Notification handle = 0x002a value: b4 
Notification handle = 0x002a value: f8 
Notification handle = 0x002a value: 03 
Notification handle = 0x002a value: f5 
Notification handle = 0x002a value: 0d 
Notification handle = 0x002a value: 04 
Notification handle = 0x002a value: fc 
Notification handle = 0x002a value: 02 
Notification handle = 0x002a value: ae 
Notification handle = 0x002e value: 9f 
Notification handle = 0x0032 value: a5 
Notification handle = 0x002a value: 14 
Notification handle = 0x002e value: fb 
Notification handle = 0x0032 value: b2 
Notification handle = 0x002a value: e8 
Notification handle = 0x0032 value: a8 
Notification handle = 0x002a value: 08 
Notification handle = 0x002e value: 0e 
Notification handle = 0x0032 value: c4 
Notification handle = 0x002a value: 57 
Notification handle = 0x002e value: 7a 
Notification handle = 0x002a value: fd 
Notification handle = 0x002e value: f9 
Notification handle = 0x002a value: 10 
Notification handle = 0x002a value: ea 
Notification handle = 0x002a value: 22 
Notification handle = 0x002a value: ff 
Notification handle = 0x002a value: 4d 
Notification handle = 0x002e value: df 
Notification handle = 0x0032 value: d8 
Notification handle = 0x002a value: 03 
Notification handle = 0x002e value: ff 
Notification handle = 0x0032 value: b6 
Notification handle = 0x002a value: 19 
Notification handle = 0x002e value: 08 
Notification handle = 0x0032 value: f8 
Notification handle = 0x002a value: f4 
Notification handle = 0x002e value: fb 
Notification handle = 0x0032 value: ea 
Notification handle = 0x002a value: 01 
Notification handle = 0x0032 value: ba 
Notification handle = 0x0032 value: c2 

--------------------
root@linaro-server:~# /usr/src/bluez-4.101/monitor/btmon 
Bluetooth monitor ver 4.101
[hci0] 14:59:31.455948 = New Index: 00:02:72:3E:7F:9B (BR/EDR,USB,hci0)
[hci0] 14:59:37.419288 < HCI Command: LE Create Connection (0x08|0x000d) plen 25
            60 00 30 00 00 00 d3 47 6c e5 c5 78 00 28 00 38  `.0....Gl..x.(.8
            00 00 00 2a 00 00 00 00 00                       ...*.....       
[hci0] 14:59:37.426536 > HCI Event: Command Status (0x0f) plen 4
            00 01 0d 20                                      ...             
[hci0] 14:59:39.342084 > HCI Event: LE Meta Event (0x3e) plen 19
            01 00 40 00 00 00 d3 47 6c e5 c5 78 36 00 00 00  ..@....Gl..x6...
            2a 00 05                                         *..             
{hci0} 14:59:39.342742 @ Device Connected: 78:C5:E5:6C:47:D3 (1) flags 0x0000
[hci0] 14:59:39.356628 < ACL Data: handle 64 flags 0x00 dlen 9
            05 00 04 00 12 2b 00 01 00                       .....+...       
[hci0] 14:59:39.511039 > ACL Data: handle 64 flags 0x02 dlen 16
            0c 00 05 00 12 07 08 00 10 00 20 00 00 00 2c 01  .......... ...,.
[hci0] 14:59:39.513756 < ACL Data: handle 64 flags 0x00 dlen 10
            06 00 05 00 13 07 02 00 00 00                    ..........      
[hci0] 14:59:39.513982 < HCI Command: LE Connection Update (0x08|0x0013) plen 14
            40 00 10 00 20 00 00 00 2c 01 01 00 01 00        @... ...,.....  
[hci0] 14:59:39.515988 > HCI Event: Command Status (0x0f) plen 4
            00 01 13 20                                      ...             
[hci0] 14:59:39.578489 > ACL Data: handle 64 flags 0x02 dlen 5
            01 00 04 00 13                                   .....           
[hci0] 14:59:39.645900 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 e9                          .....*..        
[hci0] 14:59:39.647117 > HCI Event: Number of Completed Packets (0x13) plen 5
            01 40 00 02 00                                   .@...           
[hci0] 14:59:39.781014 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f9                          .....*..        
[hci0] 14:59:39.915999 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 06                          .....*..        
[hci0] 14:59:39.983479 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 db                          .....*..        
[hci0] 14:59:40.185988 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 e8                          .....*..        
[hci0] 14:59:40.253477 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f0                          .....*..        
[hci0] 14:59:40.590870 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 dd                          .....*..        
[hci0] 14:59:40.595926 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 fa                          .....*..        
[hci0] 14:59:40.793513 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 00                          .....*..        
[hci0] 14:59:46.452653 < HCI Command: LE Create Connection (0x08|0x000d) plen 25
            60 00 30 00 00 00 a2 47 6c e5 c5 78 00 28 00 38  `.0....Gl..x.(.8
            00 00 00 2a 00 00 00 00 00                       ...*.....       
[hci0] 14:59:46.454025 > HCI Event: Command Status (0x0f) plen 4
            00 01 0d 20                                      ...             
[hci0] 14:59:47.507002 > HCI Event: LE Meta Event (0x3e) plen 19
            01 00 41 00 00 00 a2 47 6c e5 c5 78 2d 00 00 00  ..A....Gl..x-...
            2a 00 05                                         *..             
[hci0] 14:59:47.516637 < ACL Data: handle 65 flags 0x00 dlen 9
            05 00 04 00 12 2b 00 01 00                       .....+...       
{hci0} 14:59:47.507516 @ Device Connected: 78:C5:E5:6C:47:A2 (1) flags 0x0000
[hci0] 14:59:47.964127 > HCI Event: Disconn Complete (0x05) plen 4
            00 41 00 08                                      .A..            
{hci0} 14:59:47.974180 @ Device Disconnected: 78:C5:E5:6C:47:A2 (1)
[hci0] 14:59:54.564158 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 b4                          .....*..        
[hci0] 14:59:54.698625 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 05                          .....*..        
[hci0] 14:59:54.766114 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f7                          .....*..        
[hci0] 14:59:54.968591 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 00                          .....*..        
[hci0] 14:59:55.171092 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 14                          .....*..        
[hci0] 14:59:55.306083 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 02                          .....*..        
[hci0] 14:59:55.441107 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 ee                          .....*..        
[hci0] 14:59:55.508612 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f8                          .....*..        
[hci0] 14:59:55.576088 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 03                          .....*..        
[hci0] 14:59:55.711106 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 1b                          .....*..        
[hci0] 14:59:55.778607 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 fe                          .....*..        
[hci0] 14:59:55.913607 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 0f                          .....*..        
[hci0] 14:59:55.981116 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 04                          .....*..        
[hci0] 14:59:56.183619 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 fe                          .....*..        
[hci0] 15:00:24.952798 < HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7
            01 10 00 10 00 00 00                             .......         
[hci0] 15:00:24.954958 > HCI Event: Command Complete (0x0e) plen 4
            01 0b 20 00                                      .. .            
[hci0] 15:00:24.959834 < HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2
            01 01                                            ..              
[hci0] 15:00:24.962354 > HCI Event: Command Complete (0x0e) plen 4
            01 0c 20 00                                      .. .            
{hci0} 15:00:24.963556 @ Discovering: 0x01 (0)
[hci0] 15:00:25.074841 > HCI Event: LE Meta Event (0x3e) plen 15
            02 01 00 00 a2 47 6c e5 c5 78 03 02 01 05 a2     .....Gl..x..... 
[hci0] 15:00:25.077321 > HCI Event: LE Meta Event (0x3e) plen 25
            02 01 04 00 a2 47 6c e5 c5 78 0d 0c 09 4f 42 50  .....Gl..x...OBP
            34 32 35 2d 34 37 41 32 a4                       425-47A2.       
{hci0} 15:00:25.075571 @ Device Found: 78:C5:E5:6C:47:A2 (1) rssi -94 flags 0x0000
            02 01 05                                         ...             
{hci0} 15:00:25.078879 @ Device Found: 78:C5:E5:6C:47:A2 (1) rssi -92 flags 0x0000
            0c 09 4f 42 50 34 32 35 2d 34 37 41 32           ..OBP425-47A2   
[hci0] 15:00:29.259153 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f7                          .....*..        
[hci0] 15:00:29.394528 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 00                          .....*..        
[hci0] 15:00:30.976520 < HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2
            00 01                                            ..              
[hci0] 15:00:30.982418 > HCI Event: Command Complete (0x0e) plen 4
            01 0c 20 00                                      .. .            
{hci0} 15:00:30.983404 @ Discovering: 0x00 (0)
[hci0] 15:00:33.275402 < HCI Command: LE Create Connection (0x08|0x000d) plen 25
            60 00 30 00 00 00 a2 47 6c e5 c5 78 00 28 00 38  `.0....Gl..x.(.8
            00 00 00 2a 00 00 00 00 00                       ...*.....       
[hci0] 15:00:33.279443 > HCI Event: Command Status (0x0f) plen 4
            00 01 0d 20                                      ...             
[hci0] 15:00:33.592636 > HCI Event: LE Meta Event (0x3e) plen 19
            01 00 41 00 00 00 a2 47 6c e5 c5 78 2d 00 00 00  ..A....Gl..x-...
            2a 00 05                                         *..             
{hci0} 15:00:33.593285 @ Device Connected: 78:C5:E5:6C:47:A2 (1) flags 0x0000
[hci0] 15:00:33.606593 < ACL Data: handle 65 flags 0x00 dlen 9
            05 00 04 00 12 2b 00 01 00                       .....+...       
[hci0] 15:00:33.639078 > ACL Data: handle 65 flags 0x02 dlen 16
            0c 00 05 00 12 01 08 00 10 00 20 00 00 00 2c 01  .......... ...,.
[hci0] 15:00:33.645585 < ACL Data: handle 65 flags 0x00 dlen 10
            06 00 05 00 13 01 02 00 00 00                    ..........      
[hci0] 15:00:33.645863 < HCI Command: LE Connection Update (0x08|0x0013) plen 14
            41 00 10 00 20 00 00 00 2c 01 01 00 01 00        A... ...,.....  
[hci0] 15:00:33.659465 > HCI Event: Command Status (0x0f) plen 4
            00 01 13 20                                      ...             
[hci0] 15:00:33.695413 > ACL Data: handle 65 flags 0x02 dlen 5
            01 00 04 00 13                                   .....           
[hci0] 15:00:33.751539 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 fa                          ........        
[hci0] 15:00:33.752586 > HCI Event: Number of Completed Packets (0x13) plen 5
            01 41 00 02 00                                   .A...           
[hci0] 15:00:33.752835 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c1                          .....2..        
[hci0] 15:00:34.820181 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 0b                          .....*..        
[hci0] 15:00:34.821134 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 e7                          ........        
[hci0] 15:00:34.821273 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 da                          .....2..        
[hci0] 15:00:34.932695 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 9d                          .....*..        
[hci0] 15:00:34.934604 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 80                          ........        
[hci0] 15:00:34.934743 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 80                          .....2..        
[hci0] 15:00:35.045312 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 ff                          .....*..        
[hci0] 15:00:35.045539 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 fa                          ........        
[hci0] 15:00:35.047351 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c8                          .....2..        
[hci0] 15:00:35.157812 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c1                          .....2..        
[hci0] 15:00:36.279077 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 43                          .....*.C        
[hci0] 15:00:36.414070 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f4                          .....*..        
[hci0] 15:00:36.481571 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 ee                          .....*..        
[hci0] 15:00:36.616574 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 e0                          .....*..        
[hci0] 15:00:36.684053 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f0                          .....*..        
[hci0] 15:00:36.886559 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 fe                          .....*..        
[hci0] 15:00:37.021553 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 04                          .....*..        
[hci0] 15:00:37.494080 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 fe                          .....*..        
[hci0] 15:00:38.870323 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 17                          .....*..        
[hci0] 15:00:38.875497 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 35                          .......5        
[hci0] 15:00:38.875625 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 83                          .....2..        
[hci0] 15:00:38.926466 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 07                          .....*..        
[hci0] 15:00:38.927533 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 f5                          ........        
[hci0] 15:00:38.927672 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c1                          .....2..        
[hci0] 15:00:39.151579 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 ca                          .....2..        
[hci0] 15:00:39.263964 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 11                          ........        
[hci0] 15:00:39.265848 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c4                          .....2..        
[hci0] 15:00:39.265989 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 06                          ........        
[hci0] 15:00:39.266111 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 ba                          .....2..        
[hci0] 15:00:39.320324 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 fc                          .....*..        
[hci0] 15:00:39.321448 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 fb                          ........        
[hci0] 15:00:39.321573 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c6                          .....2..        
[hci0] 15:00:40.022479 > HCI Event: LE Meta Event (0x3e) plen 10
            03 00 40 00 1e 00 00 00 2c 01                    ..@.....,.      
[hci0] 15:00:41.345357 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c0                          .....2..        
[hci0] 15:00:42.572098 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 e3                          .....*..        
[hci0] 15:00:42.722098 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f7                          .....*..        
[hci0] 15:00:43.096607 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 b4                          .....*..        
[hci0] 15:00:43.171601 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f8                          .....*..        
[hci0] 15:00:43.284093 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 03                          .....*..        
[hci0] 15:00:44.971623 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f5                          .....*..        
[hci0] 15:00:45.084106 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 0d                          .....*..        
[hci0] 15:00:45.234114 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 04                          .....*..        
[hci0] 15:00:45.271610 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 fc                          .....*..        
[hci0] 15:00:45.497127 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 02                          .....*..        
[hci0] 15:00:46.632779 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 ae                          .....*..        
[hci0] 15:00:46.634611 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 9f                          ........        
[hci0] 15:00:46.634738 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 a5                          .....2..        
[hci0] 15:00:46.745405 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 14                          .....*..        
[hci0] 15:00:46.747312 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 fb                          ........        
[hci0] 15:00:46.747446 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 b2                          .....2..        
[hci0] 15:00:46.801502 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 e8                          .....*..        
[hci0] 15:00:46.802618 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 a8                          .....2..        
[hci0] 15:00:46.970391 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 08                          .....*..        
[hci0] 15:00:46.973070 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 0e                          ........        
[hci0] 15:00:46.973195 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c4                          .....2..        
[hci0] 15:00:47.026653 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 57                          .....*.W        
[hci0] 15:00:47.027765 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 7a                          .......z        
[hci0] 15:00:47.139021 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 fd                          .....*..        
[hci0] 15:00:47.140909 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 f9                          ........        
[hci0] 15:00:50.071664 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 10                          .....*..        
[hci0] 15:00:50.184154 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 ea                          .....*..        
[hci0] 15:00:50.296659 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 22                          .....*."        
[hci0] 15:00:50.371649 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 ff                          .....*..        
[hci0] 15:00:50.795432 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 4d                          .....*.M        
[hci0] 15:00:50.801677 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 df                          ........        
[hci0] 15:00:50.801815 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 d8                          .....2..        
[hci0] 15:00:50.851667 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 03                          .....*..        
[hci0] 15:00:50.852711 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 ff                          ........        
[hci0] 15:00:50.852851 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 b6                          .....2..        
[hci0] 15:00:50.907932 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 19                          .....*..        
[hci0] 15:00:50.909037 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 08                          ........        
[hci0] 15:00:50.909177 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 f8                          .....2..        
[hci0] 15:00:51.020415 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f4                          .....*..        
[hci0] 15:00:51.022325 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 fb                          ........        
[hci0] 15:00:51.022470 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 ea                          .....2..        
[hci0] 15:00:51.132937 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 01                          .....*..        
[hci0] 15:00:51.134846 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 ba                          .....2..        
[hci0] 15:00:51.245438 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c2                          .....2..        
[hci0] 15:00:58.766551 < HCI Command: Disconnect (0x01|0x0006) plen 3
            40 00 13                                         @..             
[hci0] 15:00:58.772294 > HCI Event: Command Status (0x0f) plen 4
            00 01 06 04                                      ....            
[hci0] 15:00:58.773594 > HCI Event: Disconn Complete (0x05) plen 4
            00 40 00 16                                      .@..            
{hci0} 15:00:58.774541 @ Device Disconnected: 78:C5:E5:6C:47:D3 (1)
[hci0] 15:01:02.796566 < HCI Command: Disconnect (0x01|0x0006) plen 3
            41 00 13                                         A..             
[hci0] 15:01:02.803369 > HCI Event: Command Status (0x0f) plen 4
            00 01 06 04                                      ....            
[hci0] 15:01:03.170637 > HCI Event: Disconn Complete (0x05) plen 4
            00 41 00 22                                      .A."            
{hci0} 15:01:03.179209 @ Device Disconnected: 78:C5:E5:6C:47:A2 (1)



________________________________________
From: Alexander Holler [holler@ahsoftware.de]
Sent: October 30, 2013 10:16 AM
To: Tim Tisdall
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: l2cap sockets not properly multiplexed on ARM

Am 30.10.2013 14:15, schrieb Tim Tisdall:

> The problem exists on the other end of the socket; the kernel side.

Do you have tried using gattool to verify that?

Regards,

Alexander Holler


^ permalink raw reply	[flat|nested] 24+ messages in thread

* RE: l2cap sockets not properly multiplexed on ARM
  2013-10-30 15:06         ` Tim Tisdall
@ 2013-10-30 15:10           ` Tim Tisdall
  2013-10-30 15:16             ` Tim Tisdall
  2013-10-30 19:40           ` Marcel Holtmann
  1 sibling, 1 reply; 24+ messages in thread
From: Tim Tisdall @ 2013-10-30 15:10 UTC (permalink / raw)
  To: Alexander Holler; +Cc: linux-bluetooth

Okay, I tried it again with the other notifications on the 2nd device shut off. (same result)  I noticed that if I shut off the 2nd gatttool the notification return back to the first running gatttool.
________________________________________
From: linux-bluetooth-owner@vger.kernel.org [linux-bluetooth-owner@vger.kernel.org] on behalf of Tim Tisdall [tim.tisdall@flemingcollege.ca]
Sent: October 30, 2013 11:06 AM
To: Alexander Holler
Cc: linux-bluetooth@vger.kernel.org
Subject: RE: l2cap sockets not properly multiplexed on ARM

Yes, confirmed with gatttool.  I used 3 terminals with one running btmon and the other 2 gatttool.  I started btmon then ran gatttool on one terminal starting the notifications.  Then I started another gatttool in another terminal and that new one then showed the results of both devices while the first gatttool stopped displaying any new notifications.  You can see in the btmon that the values are coming from 2 different connection handles but the results are all coming through the 2nd gatttool.  Here's the outputs using 3 terminals connected to the device (first listing was connected first):

So it's perfectly clear:  This all works fine on an x86 machine, but is an issue on ARM

--------------------
root@linaro-server:~# gatttool -i 0 -b 78:C5:E5:6C:47:D3 --char-write-req --handle=0x002b --value=0100 --listen
Characteristic value was written successfully
Notification handle = 0x002a value: e9
Notification handle = 0x002a value: f9
Notification handle = 0x002a value: 06
Notification handle = 0x002a value: db
Notification handle = 0x002a value: e8
Notification handle = 0x002a value: f0
Notification handle = 0x002a value: dd
Notification handle = 0x002a value: fa
Notification handle = 0x002a value: 00
Notification handle = 0x002a value: f7
Notification handle = 0x002a value: 00

--------------------
root@linaro-server:~# gatttool -i 0 -b 78:C5:E5:6C:47:A2  --char-write-req --handle=0x002b --value=0100 --listen
Characteristic value was written successfully
Notification handle = 0x002e value: fa
Notification handle = 0x0032 value: c1
Notification handle = 0x002a value: 0b
Notification handle = 0x002e value: e7
Notification handle = 0x0032 value: da
Notification handle = 0x002a value: 9d
Notification handle = 0x002e value: 80
Notification handle = 0x0032 value: 80
Notification handle = 0x002a value: ff
Notification handle = 0x002e value: fa
Notification handle = 0x0032 value: c8
Notification handle = 0x0032 value: c1
Notification handle = 0x002a value: 43
Notification handle = 0x002a value: f4
Notification handle = 0x002a value: ee
Notification handle = 0x002a value: e0
Notification handle = 0x002a value: f0
Notification handle = 0x002a value: fe
Notification handle = 0x002a value: 04
Notification handle = 0x002a value: fe
Notification handle = 0x002a value: 17
Notification handle = 0x002e value: 35
Notification handle = 0x0032 value: 83
Notification handle = 0x002a value: 07
Notification handle = 0x002e value: f5
Notification handle = 0x0032 value: c1
Notification handle = 0x0032 value: ca
Notification handle = 0x002e value: 11
Notification handle = 0x0032 value: c4
Notification handle = 0x002e value: 06
Notification handle = 0x0032 value: ba
Notification handle = 0x002a value: fc
Notification handle = 0x002e value: fb
Notification handle = 0x0032 value: c6
Notification handle = 0x0032 value: c0
Notification handle = 0x002a value: e3
Notification handle = 0x002a value: f7
Notification handle = 0x002a value: b4
Notification handle = 0x002a value: f8
Notification handle = 0x002a value: 03
Notification handle = 0x002a value: f5
Notification handle = 0x002a value: 0d
Notification handle = 0x002a value: 04
Notification handle = 0x002a value: fc
Notification handle = 0x002a value: 02
Notification handle = 0x002a value: ae
Notification handle = 0x002e value: 9f
Notification handle = 0x0032 value: a5
Notification handle = 0x002a value: 14
Notification handle = 0x002e value: fb
Notification handle = 0x0032 value: b2
Notification handle = 0x002a value: e8
Notification handle = 0x0032 value: a8
Notification handle = 0x002a value: 08
Notification handle = 0x002e value: 0e
Notification handle = 0x0032 value: c4
Notification handle = 0x002a value: 57
Notification handle = 0x002e value: 7a
Notification handle = 0x002a value: fd
Notification handle = 0x002e value: f9
Notification handle = 0x002a value: 10
Notification handle = 0x002a value: ea
Notification handle = 0x002a value: 22
Notification handle = 0x002a value: ff
Notification handle = 0x002a value: 4d
Notification handle = 0x002e value: df
Notification handle = 0x0032 value: d8
Notification handle = 0x002a value: 03
Notification handle = 0x002e value: ff
Notification handle = 0x0032 value: b6
Notification handle = 0x002a value: 19
Notification handle = 0x002e value: 08
Notification handle = 0x0032 value: f8
Notification handle = 0x002a value: f4
Notification handle = 0x002e value: fb
Notification handle = 0x0032 value: ea
Notification handle = 0x002a value: 01
Notification handle = 0x0032 value: ba
Notification handle = 0x0032 value: c2

--------------------
root@linaro-server:~# /usr/src/bluez-4.101/monitor/btmon
Bluetooth monitor ver 4.101
[hci0] 14:59:31.455948 = New Index: 00:02:72:3E:7F:9B (BR/EDR,USB,hci0)
[hci0] 14:59:37.419288 < HCI Command: LE Create Connection (0x08|0x000d) plen 25
            60 00 30 00 00 00 d3 47 6c e5 c5 78 00 28 00 38  `.0....Gl..x.(.8
            00 00 00 2a 00 00 00 00 00                       ...*.....
[hci0] 14:59:37.426536 > HCI Event: Command Status (0x0f) plen 4
            00 01 0d 20                                      ...
[hci0] 14:59:39.342084 > HCI Event: LE Meta Event (0x3e) plen 19
            01 00 40 00 00 00 d3 47 6c e5 c5 78 36 00 00 00  ..@....Gl..x6...
            2a 00 05                                         *..
{hci0} 14:59:39.342742 @ Device Connected: 78:C5:E5:6C:47:D3 (1) flags 0x0000
[hci0] 14:59:39.356628 < ACL Data: handle 64 flags 0x00 dlen 9
            05 00 04 00 12 2b 00 01 00                       .....+...
[hci0] 14:59:39.511039 > ACL Data: handle 64 flags 0x02 dlen 16
            0c 00 05 00 12 07 08 00 10 00 20 00 00 00 2c 01  .......... ...,.
[hci0] 14:59:39.513756 < ACL Data: handle 64 flags 0x00 dlen 10
            06 00 05 00 13 07 02 00 00 00                    ..........
[hci0] 14:59:39.513982 < HCI Command: LE Connection Update (0x08|0x0013) plen 14
            40 00 10 00 20 00 00 00 2c 01 01 00 01 00        @... ...,.....
[hci0] 14:59:39.515988 > HCI Event: Command Status (0x0f) plen 4
            00 01 13 20                                      ...
[hci0] 14:59:39.578489 > ACL Data: handle 64 flags 0x02 dlen 5
            01 00 04 00 13                                   .....
[hci0] 14:59:39.645900 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 e9                          .....*..
[hci0] 14:59:39.647117 > HCI Event: Number of Completed Packets (0x13) plen 5
            01 40 00 02 00                                   .@...
[hci0] 14:59:39.781014 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f9                          .....*..
[hci0] 14:59:39.915999 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 06                          .....*..
[hci0] 14:59:39.983479 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 db                          .....*..
[hci0] 14:59:40.185988 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 e8                          .....*..
[hci0] 14:59:40.253477 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f0                          .....*..
[hci0] 14:59:40.590870 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 dd                          .....*..
[hci0] 14:59:40.595926 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 fa                          .....*..
[hci0] 14:59:40.793513 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 00                          .....*..
[hci0] 14:59:46.452653 < HCI Command: LE Create Connection (0x08|0x000d) plen 25
            60 00 30 00 00 00 a2 47 6c e5 c5 78 00 28 00 38  `.0....Gl..x.(.8
            00 00 00 2a 00 00 00 00 00                       ...*.....
[hci0] 14:59:46.454025 > HCI Event: Command Status (0x0f) plen 4
            00 01 0d 20                                      ...
[hci0] 14:59:47.507002 > HCI Event: LE Meta Event (0x3e) plen 19
            01 00 41 00 00 00 a2 47 6c e5 c5 78 2d 00 00 00  ..A....Gl..x-...
            2a 00 05                                         *..
[hci0] 14:59:47.516637 < ACL Data: handle 65 flags 0x00 dlen 9
            05 00 04 00 12 2b 00 01 00                       .....+...
{hci0} 14:59:47.507516 @ Device Connected: 78:C5:E5:6C:47:A2 (1) flags 0x0000
[hci0] 14:59:47.964127 > HCI Event: Disconn Complete (0x05) plen 4
            00 41 00 08                                      .A..
{hci0} 14:59:47.974180 @ Device Disconnected: 78:C5:E5:6C:47:A2 (1)
[hci0] 14:59:54.564158 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 b4                          .....*..
[hci0] 14:59:54.698625 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 05                          .....*..
[hci0] 14:59:54.766114 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f7                          .....*..
[hci0] 14:59:54.968591 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 00                          .....*..
[hci0] 14:59:55.171092 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 14                          .....*..
[hci0] 14:59:55.306083 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 02                          .....*..
[hci0] 14:59:55.441107 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 ee                          .....*..
[hci0] 14:59:55.508612 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f8                          .....*..
[hci0] 14:59:55.576088 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 03                          .....*..
[hci0] 14:59:55.711106 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 1b                          .....*..
[hci0] 14:59:55.778607 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 fe                          .....*..
[hci0] 14:59:55.913607 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 0f                          .....*..
[hci0] 14:59:55.981116 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 04                          .....*..
[hci0] 14:59:56.183619 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 fe                          .....*..
[hci0] 15:00:24.952798 < HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7
            01 10 00 10 00 00 00                             .......
[hci0] 15:00:24.954958 > HCI Event: Command Complete (0x0e) plen 4
            01 0b 20 00                                      .. .
[hci0] 15:00:24.959834 < HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2
            01 01                                            ..
[hci0] 15:00:24.962354 > HCI Event: Command Complete (0x0e) plen 4
            01 0c 20 00                                      .. .
{hci0} 15:00:24.963556 @ Discovering: 0x01 (0)
[hci0] 15:00:25.074841 > HCI Event: LE Meta Event (0x3e) plen 15
            02 01 00 00 a2 47 6c e5 c5 78 03 02 01 05 a2     .....Gl..x.....
[hci0] 15:00:25.077321 > HCI Event: LE Meta Event (0x3e) plen 25
            02 01 04 00 a2 47 6c e5 c5 78 0d 0c 09 4f 42 50  .....Gl..x...OBP
            34 32 35 2d 34 37 41 32 a4                       425-47A2.
{hci0} 15:00:25.075571 @ Device Found: 78:C5:E5:6C:47:A2 (1) rssi -94 flags 0x0000
            02 01 05                                         ...
{hci0} 15:00:25.078879 @ Device Found: 78:C5:E5:6C:47:A2 (1) rssi -92 flags 0x0000
            0c 09 4f 42 50 34 32 35 2d 34 37 41 32           ..OBP425-47A2
[hci0] 15:00:29.259153 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f7                          .....*..
[hci0] 15:00:29.394528 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 00                          .....*..
[hci0] 15:00:30.976520 < HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2
            00 01                                            ..
[hci0] 15:00:30.982418 > HCI Event: Command Complete (0x0e) plen 4
            01 0c 20 00                                      .. .
{hci0} 15:00:30.983404 @ Discovering: 0x00 (0)
[hci0] 15:00:33.275402 < HCI Command: LE Create Connection (0x08|0x000d) plen 25
            60 00 30 00 00 00 a2 47 6c e5 c5 78 00 28 00 38  `.0....Gl..x.(.8
            00 00 00 2a 00 00 00 00 00                       ...*.....
[hci0] 15:00:33.279443 > HCI Event: Command Status (0x0f) plen 4
            00 01 0d 20                                      ...
[hci0] 15:00:33.592636 > HCI Event: LE Meta Event (0x3e) plen 19
            01 00 41 00 00 00 a2 47 6c e5 c5 78 2d 00 00 00  ..A....Gl..x-...
            2a 00 05                                         *..
{hci0} 15:00:33.593285 @ Device Connected: 78:C5:E5:6C:47:A2 (1) flags 0x0000
[hci0] 15:00:33.606593 < ACL Data: handle 65 flags 0x00 dlen 9
            05 00 04 00 12 2b 00 01 00                       .....+...
[hci0] 15:00:33.639078 > ACL Data: handle 65 flags 0x02 dlen 16
            0c 00 05 00 12 01 08 00 10 00 20 00 00 00 2c 01  .......... ...,.
[hci0] 15:00:33.645585 < ACL Data: handle 65 flags 0x00 dlen 10
            06 00 05 00 13 01 02 00 00 00                    ..........
[hci0] 15:00:33.645863 < HCI Command: LE Connection Update (0x08|0x0013) plen 14
            41 00 10 00 20 00 00 00 2c 01 01 00 01 00        A... ...,.....
[hci0] 15:00:33.659465 > HCI Event: Command Status (0x0f) plen 4
            00 01 13 20                                      ...
[hci0] 15:00:33.695413 > ACL Data: handle 65 flags 0x02 dlen 5
            01 00 04 00 13                                   .....
[hci0] 15:00:33.751539 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 fa                          ........
[hci0] 15:00:33.752586 > HCI Event: Number of Completed Packets (0x13) plen 5
            01 41 00 02 00                                   .A...
[hci0] 15:00:33.752835 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c1                          .....2..
[hci0] 15:00:34.820181 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 0b                          .....*..
[hci0] 15:00:34.821134 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 e7                          ........
[hci0] 15:00:34.821273 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 da                          .....2..
[hci0] 15:00:34.932695 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 9d                          .....*..
[hci0] 15:00:34.934604 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 80                          ........
[hci0] 15:00:34.934743 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 80                          .....2..
[hci0] 15:00:35.045312 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 ff                          .....*..
[hci0] 15:00:35.045539 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 fa                          ........
[hci0] 15:00:35.047351 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c8                          .....2..
[hci0] 15:00:35.157812 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c1                          .....2..
[hci0] 15:00:36.279077 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 43                          .....*.C
[hci0] 15:00:36.414070 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f4                          .....*..
[hci0] 15:00:36.481571 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 ee                          .....*..
[hci0] 15:00:36.616574 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 e0                          .....*..
[hci0] 15:00:36.684053 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f0                          .....*..
[hci0] 15:00:36.886559 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 fe                          .....*..
[hci0] 15:00:37.021553 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 04                          .....*..
[hci0] 15:00:37.494080 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 fe                          .....*..
[hci0] 15:00:38.870323 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 17                          .....*..
[hci0] 15:00:38.875497 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 35                          .......5
[hci0] 15:00:38.875625 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 83                          .....2..
[hci0] 15:00:38.926466 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 07                          .....*..
[hci0] 15:00:38.927533 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 f5                          ........
[hci0] 15:00:38.927672 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c1                          .....2..
[hci0] 15:00:39.151579 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 ca                          .....2..
[hci0] 15:00:39.263964 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 11                          ........
[hci0] 15:00:39.265848 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c4                          .....2..
[hci0] 15:00:39.265989 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 06                          ........
[hci0] 15:00:39.266111 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 ba                          .....2..
[hci0] 15:00:39.320324 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 fc                          .....*..
[hci0] 15:00:39.321448 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 fb                          ........
[hci0] 15:00:39.321573 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c6                          .....2..
[hci0] 15:00:40.022479 > HCI Event: LE Meta Event (0x3e) plen 10
            03 00 40 00 1e 00 00 00 2c 01                    ..@.....,.
[hci0] 15:00:41.345357 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c0                          .....2..
[hci0] 15:00:42.572098 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 e3                          .....*..
[hci0] 15:00:42.722098 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f7                          .....*..
[hci0] 15:00:43.096607 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 b4                          .....*..
[hci0] 15:00:43.171601 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f8                          .....*..
[hci0] 15:00:43.284093 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 03                          .....*..
[hci0] 15:00:44.971623 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f5                          .....*..
[hci0] 15:00:45.084106 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 0d                          .....*..
[hci0] 15:00:45.234114 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 04                          .....*..
[hci0] 15:00:45.271610 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 fc                          .....*..
[hci0] 15:00:45.497127 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 02                          .....*..
[hci0] 15:00:46.632779 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 ae                          .....*..
[hci0] 15:00:46.634611 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 9f                          ........
[hci0] 15:00:46.634738 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 a5                          .....2..
[hci0] 15:00:46.745405 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 14                          .....*..
[hci0] 15:00:46.747312 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 fb                          ........
[hci0] 15:00:46.747446 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 b2                          .....2..
[hci0] 15:00:46.801502 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 e8                          .....*..
[hci0] 15:00:46.802618 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 a8                          .....2..
[hci0] 15:00:46.970391 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 08                          .....*..
[hci0] 15:00:46.973070 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 0e                          ........
[hci0] 15:00:46.973195 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c4                          .....2..
[hci0] 15:00:47.026653 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 57                          .....*.W
[hci0] 15:00:47.027765 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 7a                          .......z
[hci0] 15:00:47.139021 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 fd                          .....*..
[hci0] 15:00:47.140909 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 f9                          ........
[hci0] 15:00:50.071664 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 10                          .....*..
[hci0] 15:00:50.184154 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 ea                          .....*..
[hci0] 15:00:50.296659 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 22                          .....*."
[hci0] 15:00:50.371649 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 ff                          .....*..
[hci0] 15:00:50.795432 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 4d                          .....*.M
[hci0] 15:00:50.801677 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 df                          ........
[hci0] 15:00:50.801815 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 d8                          .....2..
[hci0] 15:00:50.851667 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 03                          .....*..
[hci0] 15:00:50.852711 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 ff                          ........
[hci0] 15:00:50.852851 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 b6                          .....2..
[hci0] 15:00:50.907932 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 19                          .....*..
[hci0] 15:00:50.909037 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 08                          ........
[hci0] 15:00:50.909177 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 f8                          .....2..
[hci0] 15:00:51.020415 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f4                          .....*..
[hci0] 15:00:51.022325 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 fb                          ........
[hci0] 15:00:51.022470 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 ea                          .....2..
[hci0] 15:00:51.132937 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 01                          .....*..
[hci0] 15:00:51.134846 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 ba                          .....2..
[hci0] 15:00:51.245438 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c2                          .....2..
[hci0] 15:00:58.766551 < HCI Command: Disconnect (0x01|0x0006) plen 3
            40 00 13                                         @..
[hci0] 15:00:58.772294 > HCI Event: Command Status (0x0f) plen 4
            00 01 06 04                                      ....
[hci0] 15:00:58.773594 > HCI Event: Disconn Complete (0x05) plen 4
            00 40 00 16                                      .@..
{hci0} 15:00:58.774541 @ Device Disconnected: 78:C5:E5:6C:47:D3 (1)
[hci0] 15:01:02.796566 < HCI Command: Disconnect (0x01|0x0006) plen 3
            41 00 13                                         A..
[hci0] 15:01:02.803369 > HCI Event: Command Status (0x0f) plen 4
            00 01 06 04                                      ....
[hci0] 15:01:03.170637 > HCI Event: Disconn Complete (0x05) plen 4
            00 41 00 22                                      .A."
{hci0} 15:01:03.179209 @ Device Disconnected: 78:C5:E5:6C:47:A2 (1)



________________________________________
From: Alexander Holler [holler@ahsoftware.de]
Sent: October 30, 2013 10:16 AM
To: Tim Tisdall
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: l2cap sockets not properly multiplexed on ARM

Am 30.10.2013 14:15, schrieb Tim Tisdall:

> The problem exists on the other end of the socket; the kernel side.

Do you have tried using gattool to verify that?

Regards,

Alexander Holler

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 24+ messages in thread

* RE: l2cap sockets not properly multiplexed on ARM
  2013-10-30 15:10           ` Tim Tisdall
@ 2013-10-30 15:16             ` Tim Tisdall
  2013-10-30 18:36               ` Anderson Lizardo
  0 siblings, 1 reply; 24+ messages in thread
From: Tim Tisdall @ 2013-10-30 15:16 UTC (permalink / raw)
  To: Alexander Holler; +Cc: linux-bluetooth

Before someone asks...

root@linaro-server:~# cat /proc/cpuinfo
Processor	: ARMv7 Processor rev 2 (v7l)
BogoMIPS	: 59.90
Features	: swp half thumb fastmult vfp edsp neon vfpv3 tls 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x3
CPU part	: 0xc08
CPU revision	: 2

Hardware	: sun4i
Revision	: 0000
Serial		: 0000000000000000
root@linaro-server:~# lscpu
Architecture:          armv7l
Byte Order:            Little Endian
CPU(s):                1
On-line CPU(s) list:   0
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             1
root@linaro-server:~# uname -a
Linux linaro-server 3.4.43 #6 PREEMPT Mon Aug 19 16:40:34 EDT 2013 armv7l armv7l armv7l GNU/Linux

But this isn't the only ARM machine or only kernel I've had this problem on...

________________________________________
From: linux-bluetooth-owner@vger.kernel.org [linux-bluetooth-owner@vger.kernel.org] on behalf of Tim Tisdall [tim.tisdall@flemingcollege.ca]
Sent: October 30, 2013 11:10 AM
To: Alexander Holler
Cc: linux-bluetooth@vger.kernel.org
Subject: RE: l2cap sockets not properly multiplexed on ARM

Okay, I tried it again with the other notifications on the 2nd device shut off. (same result)  I noticed that if I shut off the 2nd gatttool the notification return back to the first running gatttool.
________________________________________
From: linux-bluetooth-owner@vger.kernel.org [linux-bluetooth-owner@vger.kernel.org] on behalf of Tim Tisdall [tim.tisdall@flemingcollege.ca]
Sent: October 30, 2013 11:06 AM
To: Alexander Holler
Cc: linux-bluetooth@vger.kernel.org
Subject: RE: l2cap sockets not properly multiplexed on ARM

Yes, confirmed with gatttool.  I used 3 terminals with one running btmon and the other 2 gatttool.  I started btmon then ran gatttool on one terminal starting the notifications.  Then I started another gatttool in another terminal and that new one then showed the results of both devices while the first gatttool stopped displaying any new notifications.  You can see in the btmon that the values are coming from 2 different connection handles but the results are all coming through the 2nd gatttool.  Here's the outputs using 3 terminals connected to the device (first listing was connected first):

So it's perfectly clear:  This all works fine on an x86 machine, but is an issue on ARM

--------------------
root@linaro-server:~# gatttool -i 0 -b 78:C5:E5:6C:47:D3 --char-write-req --handle=0x002b --value=0100 --listen
Characteristic value was written successfully
Notification handle = 0x002a value: e9
Notification handle = 0x002a value: f9
Notification handle = 0x002a value: 06
Notification handle = 0x002a value: db
Notification handle = 0x002a value: e8
Notification handle = 0x002a value: f0
Notification handle = 0x002a value: dd
Notification handle = 0x002a value: fa
Notification handle = 0x002a value: 00
Notification handle = 0x002a value: f7
Notification handle = 0x002a value: 00

--------------------
root@linaro-server:~# gatttool -i 0 -b 78:C5:E5:6C:47:A2  --char-write-req --handle=0x002b --value=0100 --listen
Characteristic value was written successfully
Notification handle = 0x002e value: fa
Notification handle = 0x0032 value: c1
Notification handle = 0x002a value: 0b
Notification handle = 0x002e value: e7
Notification handle = 0x0032 value: da
Notification handle = 0x002a value: 9d
Notification handle = 0x002e value: 80
Notification handle = 0x0032 value: 80
Notification handle = 0x002a value: ff
Notification handle = 0x002e value: fa
Notification handle = 0x0032 value: c8
Notification handle = 0x0032 value: c1
Notification handle = 0x002a value: 43
Notification handle = 0x002a value: f4
Notification handle = 0x002a value: ee
Notification handle = 0x002a value: e0
Notification handle = 0x002a value: f0
Notification handle = 0x002a value: fe
Notification handle = 0x002a value: 04
Notification handle = 0x002a value: fe
Notification handle = 0x002a value: 17
Notification handle = 0x002e value: 35
Notification handle = 0x0032 value: 83
Notification handle = 0x002a value: 07
Notification handle = 0x002e value: f5
Notification handle = 0x0032 value: c1
Notification handle = 0x0032 value: ca
Notification handle = 0x002e value: 11
Notification handle = 0x0032 value: c4
Notification handle = 0x002e value: 06
Notification handle = 0x0032 value: ba
Notification handle = 0x002a value: fc
Notification handle = 0x002e value: fb
Notification handle = 0x0032 value: c6
Notification handle = 0x0032 value: c0
Notification handle = 0x002a value: e3
Notification handle = 0x002a value: f7
Notification handle = 0x002a value: b4
Notification handle = 0x002a value: f8
Notification handle = 0x002a value: 03
Notification handle = 0x002a value: f5
Notification handle = 0x002a value: 0d
Notification handle = 0x002a value: 04
Notification handle = 0x002a value: fc
Notification handle = 0x002a value: 02
Notification handle = 0x002a value: ae
Notification handle = 0x002e value: 9f
Notification handle = 0x0032 value: a5
Notification handle = 0x002a value: 14
Notification handle = 0x002e value: fb
Notification handle = 0x0032 value: b2
Notification handle = 0x002a value: e8
Notification handle = 0x0032 value: a8
Notification handle = 0x002a value: 08
Notification handle = 0x002e value: 0e
Notification handle = 0x0032 value: c4
Notification handle = 0x002a value: 57
Notification handle = 0x002e value: 7a
Notification handle = 0x002a value: fd
Notification handle = 0x002e value: f9
Notification handle = 0x002a value: 10
Notification handle = 0x002a value: ea
Notification handle = 0x002a value: 22
Notification handle = 0x002a value: ff
Notification handle = 0x002a value: 4d
Notification handle = 0x002e value: df
Notification handle = 0x0032 value: d8
Notification handle = 0x002a value: 03
Notification handle = 0x002e value: ff
Notification handle = 0x0032 value: b6
Notification handle = 0x002a value: 19
Notification handle = 0x002e value: 08
Notification handle = 0x0032 value: f8
Notification handle = 0x002a value: f4
Notification handle = 0x002e value: fb
Notification handle = 0x0032 value: ea
Notification handle = 0x002a value: 01
Notification handle = 0x0032 value: ba
Notification handle = 0x0032 value: c2

--------------------
root@linaro-server:~# /usr/src/bluez-4.101/monitor/btmon
Bluetooth monitor ver 4.101
[hci0] 14:59:31.455948 = New Index: 00:02:72:3E:7F:9B (BR/EDR,USB,hci0)
[hci0] 14:59:37.419288 < HCI Command: LE Create Connection (0x08|0x000d) plen 25
            60 00 30 00 00 00 d3 47 6c e5 c5 78 00 28 00 38  `.0....Gl..x.(.8
            00 00 00 2a 00 00 00 00 00                       ...*.....
[hci0] 14:59:37.426536 > HCI Event: Command Status (0x0f) plen 4
            00 01 0d 20                                      ...
[hci0] 14:59:39.342084 > HCI Event: LE Meta Event (0x3e) plen 19
            01 00 40 00 00 00 d3 47 6c e5 c5 78 36 00 00 00  ..@....Gl..x6...
            2a 00 05                                         *..
{hci0} 14:59:39.342742 @ Device Connected: 78:C5:E5:6C:47:D3 (1) flags 0x0000
[hci0] 14:59:39.356628 < ACL Data: handle 64 flags 0x00 dlen 9
            05 00 04 00 12 2b 00 01 00                       .....+...
[hci0] 14:59:39.511039 > ACL Data: handle 64 flags 0x02 dlen 16
            0c 00 05 00 12 07 08 00 10 00 20 00 00 00 2c 01  .......... ...,.
[hci0] 14:59:39.513756 < ACL Data: handle 64 flags 0x00 dlen 10
            06 00 05 00 13 07 02 00 00 00                    ..........
[hci0] 14:59:39.513982 < HCI Command: LE Connection Update (0x08|0x0013) plen 14
            40 00 10 00 20 00 00 00 2c 01 01 00 01 00        @... ...,.....
[hci0] 14:59:39.515988 > HCI Event: Command Status (0x0f) plen 4
            00 01 13 20                                      ...
[hci0] 14:59:39.578489 > ACL Data: handle 64 flags 0x02 dlen 5
            01 00 04 00 13                                   .....
[hci0] 14:59:39.645900 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 e9                          .....*..
[hci0] 14:59:39.647117 > HCI Event: Number of Completed Packets (0x13) plen 5
            01 40 00 02 00                                   .@...
[hci0] 14:59:39.781014 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f9                          .....*..
[hci0] 14:59:39.915999 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 06                          .....*..
[hci0] 14:59:39.983479 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 db                          .....*..
[hci0] 14:59:40.185988 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 e8                          .....*..
[hci0] 14:59:40.253477 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f0                          .....*..
[hci0] 14:59:40.590870 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 dd                          .....*..
[hci0] 14:59:40.595926 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 fa                          .....*..
[hci0] 14:59:40.793513 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 00                          .....*..
[hci0] 14:59:46.452653 < HCI Command: LE Create Connection (0x08|0x000d) plen 25
            60 00 30 00 00 00 a2 47 6c e5 c5 78 00 28 00 38  `.0....Gl..x.(.8
            00 00 00 2a 00 00 00 00 00                       ...*.....
[hci0] 14:59:46.454025 > HCI Event: Command Status (0x0f) plen 4
            00 01 0d 20                                      ...
[hci0] 14:59:47.507002 > HCI Event: LE Meta Event (0x3e) plen 19
            01 00 41 00 00 00 a2 47 6c e5 c5 78 2d 00 00 00  ..A....Gl..x-...
            2a 00 05                                         *..
[hci0] 14:59:47.516637 < ACL Data: handle 65 flags 0x00 dlen 9
            05 00 04 00 12 2b 00 01 00                       .....+...
{hci0} 14:59:47.507516 @ Device Connected: 78:C5:E5:6C:47:A2 (1) flags 0x0000
[hci0] 14:59:47.964127 > HCI Event: Disconn Complete (0x05) plen 4
            00 41 00 08                                      .A..
{hci0} 14:59:47.974180 @ Device Disconnected: 78:C5:E5:6C:47:A2 (1)
[hci0] 14:59:54.564158 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 b4                          .....*..
[hci0] 14:59:54.698625 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 05                          .....*..
[hci0] 14:59:54.766114 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f7                          .....*..
[hci0] 14:59:54.968591 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 00                          .....*..
[hci0] 14:59:55.171092 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 14                          .....*..
[hci0] 14:59:55.306083 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 02                          .....*..
[hci0] 14:59:55.441107 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 ee                          .....*..
[hci0] 14:59:55.508612 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f8                          .....*..
[hci0] 14:59:55.576088 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 03                          .....*..
[hci0] 14:59:55.711106 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 1b                          .....*..
[hci0] 14:59:55.778607 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 fe                          .....*..
[hci0] 14:59:55.913607 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 0f                          .....*..
[hci0] 14:59:55.981116 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 04                          .....*..
[hci0] 14:59:56.183619 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 fe                          .....*..
[hci0] 15:00:24.952798 < HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7
            01 10 00 10 00 00 00                             .......
[hci0] 15:00:24.954958 > HCI Event: Command Complete (0x0e) plen 4
            01 0b 20 00                                      .. .
[hci0] 15:00:24.959834 < HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2
            01 01                                            ..
[hci0] 15:00:24.962354 > HCI Event: Command Complete (0x0e) plen 4
            01 0c 20 00                                      .. .
{hci0} 15:00:24.963556 @ Discovering: 0x01 (0)
[hci0] 15:00:25.074841 > HCI Event: LE Meta Event (0x3e) plen 15
            02 01 00 00 a2 47 6c e5 c5 78 03 02 01 05 a2     .....Gl..x.....
[hci0] 15:00:25.077321 > HCI Event: LE Meta Event (0x3e) plen 25
            02 01 04 00 a2 47 6c e5 c5 78 0d 0c 09 4f 42 50  .....Gl..x...OBP
            34 32 35 2d 34 37 41 32 a4                       425-47A2.
{hci0} 15:00:25.075571 @ Device Found: 78:C5:E5:6C:47:A2 (1) rssi -94 flags 0x0000
            02 01 05                                         ...
{hci0} 15:00:25.078879 @ Device Found: 78:C5:E5:6C:47:A2 (1) rssi -92 flags 0x0000
            0c 09 4f 42 50 34 32 35 2d 34 37 41 32           ..OBP425-47A2
[hci0] 15:00:29.259153 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f7                          .....*..
[hci0] 15:00:29.394528 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 00                          .....*..
[hci0] 15:00:30.976520 < HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2
            00 01                                            ..
[hci0] 15:00:30.982418 > HCI Event: Command Complete (0x0e) plen 4
            01 0c 20 00                                      .. .
{hci0} 15:00:30.983404 @ Discovering: 0x00 (0)
[hci0] 15:00:33.275402 < HCI Command: LE Create Connection (0x08|0x000d) plen 25
            60 00 30 00 00 00 a2 47 6c e5 c5 78 00 28 00 38  `.0....Gl..x.(.8
            00 00 00 2a 00 00 00 00 00                       ...*.....
[hci0] 15:00:33.279443 > HCI Event: Command Status (0x0f) plen 4
            00 01 0d 20                                      ...
[hci0] 15:00:33.592636 > HCI Event: LE Meta Event (0x3e) plen 19
            01 00 41 00 00 00 a2 47 6c e5 c5 78 2d 00 00 00  ..A....Gl..x-...
            2a 00 05                                         *..
{hci0} 15:00:33.593285 @ Device Connected: 78:C5:E5:6C:47:A2 (1) flags 0x0000
[hci0] 15:00:33.606593 < ACL Data: handle 65 flags 0x00 dlen 9
            05 00 04 00 12 2b 00 01 00                       .....+...
[hci0] 15:00:33.639078 > ACL Data: handle 65 flags 0x02 dlen 16
            0c 00 05 00 12 01 08 00 10 00 20 00 00 00 2c 01  .......... ...,.
[hci0] 15:00:33.645585 < ACL Data: handle 65 flags 0x00 dlen 10
            06 00 05 00 13 01 02 00 00 00                    ..........
[hci0] 15:00:33.645863 < HCI Command: LE Connection Update (0x08|0x0013) plen 14
            41 00 10 00 20 00 00 00 2c 01 01 00 01 00        A... ...,.....
[hci0] 15:00:33.659465 > HCI Event: Command Status (0x0f) plen 4
            00 01 13 20                                      ...
[hci0] 15:00:33.695413 > ACL Data: handle 65 flags 0x02 dlen 5
            01 00 04 00 13                                   .....
[hci0] 15:00:33.751539 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 fa                          ........
[hci0] 15:00:33.752586 > HCI Event: Number of Completed Packets (0x13) plen 5
            01 41 00 02 00                                   .A...
[hci0] 15:00:33.752835 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c1                          .....2..
[hci0] 15:00:34.820181 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 0b                          .....*..
[hci0] 15:00:34.821134 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 e7                          ........
[hci0] 15:00:34.821273 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 da                          .....2..
[hci0] 15:00:34.932695 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 9d                          .....*..
[hci0] 15:00:34.934604 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 80                          ........
[hci0] 15:00:34.934743 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 80                          .....2..
[hci0] 15:00:35.045312 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 ff                          .....*..
[hci0] 15:00:35.045539 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 fa                          ........
[hci0] 15:00:35.047351 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c8                          .....2..
[hci0] 15:00:35.157812 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c1                          .....2..
[hci0] 15:00:36.279077 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 43                          .....*.C
[hci0] 15:00:36.414070 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f4                          .....*..
[hci0] 15:00:36.481571 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 ee                          .....*..
[hci0] 15:00:36.616574 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 e0                          .....*..
[hci0] 15:00:36.684053 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f0                          .....*..
[hci0] 15:00:36.886559 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 fe                          .....*..
[hci0] 15:00:37.021553 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 04                          .....*..
[hci0] 15:00:37.494080 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 fe                          .....*..
[hci0] 15:00:38.870323 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 17                          .....*..
[hci0] 15:00:38.875497 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 35                          .......5
[hci0] 15:00:38.875625 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 83                          .....2..
[hci0] 15:00:38.926466 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 07                          .....*..
[hci0] 15:00:38.927533 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 f5                          ........
[hci0] 15:00:38.927672 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c1                          .....2..
[hci0] 15:00:39.151579 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 ca                          .....2..
[hci0] 15:00:39.263964 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 11                          ........
[hci0] 15:00:39.265848 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c4                          .....2..
[hci0] 15:00:39.265989 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 06                          ........
[hci0] 15:00:39.266111 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 ba                          .....2..
[hci0] 15:00:39.320324 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 fc                          .....*..
[hci0] 15:00:39.321448 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 fb                          ........
[hci0] 15:00:39.321573 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c6                          .....2..
[hci0] 15:00:40.022479 > HCI Event: LE Meta Event (0x3e) plen 10
            03 00 40 00 1e 00 00 00 2c 01                    ..@.....,.
[hci0] 15:00:41.345357 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c0                          .....2..
[hci0] 15:00:42.572098 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 e3                          .....*..
[hci0] 15:00:42.722098 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f7                          .....*..
[hci0] 15:00:43.096607 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 b4                          .....*..
[hci0] 15:00:43.171601 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f8                          .....*..
[hci0] 15:00:43.284093 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 03                          .....*..
[hci0] 15:00:44.971623 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f5                          .....*..
[hci0] 15:00:45.084106 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 0d                          .....*..
[hci0] 15:00:45.234114 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 04                          .....*..
[hci0] 15:00:45.271610 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 fc                          .....*..
[hci0] 15:00:45.497127 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 02                          .....*..
[hci0] 15:00:46.632779 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 ae                          .....*..
[hci0] 15:00:46.634611 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 9f                          ........
[hci0] 15:00:46.634738 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 a5                          .....2..
[hci0] 15:00:46.745405 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 14                          .....*..
[hci0] 15:00:46.747312 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 fb                          ........
[hci0] 15:00:46.747446 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 b2                          .....2..
[hci0] 15:00:46.801502 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 e8                          .....*..
[hci0] 15:00:46.802618 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 a8                          .....2..
[hci0] 15:00:46.970391 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 08                          .....*..
[hci0] 15:00:46.973070 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 0e                          ........
[hci0] 15:00:46.973195 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c4                          .....2..
[hci0] 15:00:47.026653 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 57                          .....*.W
[hci0] 15:00:47.027765 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 7a                          .......z
[hci0] 15:00:47.139021 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 fd                          .....*..
[hci0] 15:00:47.140909 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 f9                          ........
[hci0] 15:00:50.071664 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 10                          .....*..
[hci0] 15:00:50.184154 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 ea                          .....*..
[hci0] 15:00:50.296659 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 22                          .....*."
[hci0] 15:00:50.371649 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 ff                          .....*..
[hci0] 15:00:50.795432 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 4d                          .....*.M
[hci0] 15:00:50.801677 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 df                          ........
[hci0] 15:00:50.801815 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 d8                          .....2..
[hci0] 15:00:50.851667 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 03                          .....*..
[hci0] 15:00:50.852711 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 ff                          ........
[hci0] 15:00:50.852851 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 b6                          .....2..
[hci0] 15:00:50.907932 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 19                          .....*..
[hci0] 15:00:50.909037 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 08                          ........
[hci0] 15:00:50.909177 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 f8                          .....2..
[hci0] 15:00:51.020415 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f4                          .....*..
[hci0] 15:00:51.022325 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 fb                          ........
[hci0] 15:00:51.022470 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 ea                          .....2..
[hci0] 15:00:51.132937 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 01                          .....*..
[hci0] 15:00:51.134846 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 ba                          .....2..
[hci0] 15:00:51.245438 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c2                          .....2..
[hci0] 15:00:58.766551 < HCI Command: Disconnect (0x01|0x0006) plen 3
            40 00 13                                         @..
[hci0] 15:00:58.772294 > HCI Event: Command Status (0x0f) plen 4
            00 01 06 04                                      ....
[hci0] 15:00:58.773594 > HCI Event: Disconn Complete (0x05) plen 4
            00 40 00 16                                      .@..
{hci0} 15:00:58.774541 @ Device Disconnected: 78:C5:E5:6C:47:D3 (1)
[hci0] 15:01:02.796566 < HCI Command: Disconnect (0x01|0x0006) plen 3
            41 00 13                                         A..
[hci0] 15:01:02.803369 > HCI Event: Command Status (0x0f) plen 4
            00 01 06 04                                      ....
[hci0] 15:01:03.170637 > HCI Event: Disconn Complete (0x05) plen 4
            00 41 00 22                                      .A."
{hci0} 15:01:03.179209 @ Device Disconnected: 78:C5:E5:6C:47:A2 (1)



________________________________________
From: Alexander Holler [holler@ahsoftware.de]
Sent: October 30, 2013 10:16 AM
To: Tim Tisdall
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: l2cap sockets not properly multiplexed on ARM

Am 30.10.2013 14:15, schrieb Tim Tisdall:

> The problem exists on the other end of the socket; the kernel side.

Do you have tried using gattool to verify that?

Regards,

Alexander Holler

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: l2cap sockets not properly multiplexed on ARM
  2013-10-30 15:16             ` Tim Tisdall
@ 2013-10-30 18:36               ` Anderson Lizardo
  0 siblings, 0 replies; 24+ messages in thread
From: Anderson Lizardo @ 2013-10-30 18:36 UTC (permalink / raw)
  To: Tim Tisdall; +Cc: Alexander Holler, linux-bluetooth

Hi Tim,

On Wed, Oct 30, 2013 at 11:16 AM, Tim Tisdall
<tim.tisdall@flemingcollege.ca> wrote:
> root@linaro-server:~# uname -a
> Linux linaro-server 3.4.43 #6 PREEMPT Mon Aug 19 16:40:34 EDT 2013 armv7l armv7l armv7l GNU/Linux

Are you using this same kernel version on x86?


PS: please follow mailing list etiquette and refrain from top-posting
and only quote the part of emails you want to comment on. See e.g.
http://linux.sgms-centre.com/misc/netiquette.php#toppost

Best Regards,
-- 
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: l2cap sockets not properly multiplexed on ARM
  2013-10-30 15:06         ` Tim Tisdall
  2013-10-30 15:10           ` Tim Tisdall
@ 2013-10-30 19:40           ` Marcel Holtmann
  2013-10-30 20:45             ` Tim Tisdall
  2013-10-30 23:06             ` Alexander Holler
  1 sibling, 2 replies; 24+ messages in thread
From: Marcel Holtmann @ 2013-10-30 19:40 UTC (permalink / raw)
  To: Tim Tisdall; +Cc: Alexander Holler, linux-bluetooth

Hi Tim,

> Yes, confirmed with gatttool.  I used 3 terminals with one running btmon and the other 2 gatttool.  I started btmon then ran gatttool on one terminal starting the notifications.  Then I started another gatttool in another terminal and that new one then showed the results of both devices while the first gatttool stopped displaying any new notifications.  You can see in the btmon that the values are coming from 2 different connection handles but the results are all coming through the 2nd gatttool.  Here's the outputs using 3 terminals connected to the device (first listing was connected first):
> 
> So it's perfectly clear:  This all works fine on an x86 machine, but is an issue on ARM

you must be hitting some non obvious race condition. My first guess is that we have some sort of unaligned access somewhere that ends up that we put the data into the wrong L2CAP channel.

Can you have a look at Documentation/dynamic-debug-howto.txt and enable the debug section for the bluetooth.ko kernel module. I wonder if we see something fishy in there.

In the end we have to trace the whole flow of the packets and figure out at which point this ended up being send to the wrong channel.

Do you have the chance to run bluetooth-next tree for testing purposes? I rather debug this against the latest tree. I have no ARM platform lying around. So you have to be my test subject ;)

Regards

Marcel


^ permalink raw reply	[flat|nested] 24+ messages in thread

* RE: l2cap sockets not properly multiplexed on ARM
  2013-10-30 19:40           ` Marcel Holtmann
@ 2013-10-30 20:45             ` Tim Tisdall
  2013-10-30 20:57               ` Marcel Holtmann
  2013-10-30 23:06             ` Alexander Holler
  1 sibling, 1 reply; 24+ messages in thread
From: Tim Tisdall @ 2013-10-30 20:45 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: Alexander Holler, linux-bluetooth

> Can you have a look at Documentation/dynamic-debug-howto.txt and enable t=
he debug section for the bluetooth.ko kernel module. I wonder if we see som=
ething fishy in there.=0A=
=0A=
That document looks rather long and confusing...  what exactly do I need to=
 type to get the debugging statements working for bluetooth.ko?=0A=
=0A=
>Do you have the chance to run bluetooth-next tree for testing purposes? I =
rather debug this against the latest tree. I have no ARM platform lying aro=
und. So you have to be my test subject ;)=0A=
=0A=
My understanding is that the latest versions of the bluetooth code require =
kernel versions past 3.4, is this correct?  Most of the devices I have only=
 have the 3.0 kernel available because they're intended to run Android.  Or=
 is it possible to run it with the 3.4 kernel?  In either case, where can I=
 find the bluetooth-next tree?=0A=

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: l2cap sockets not properly multiplexed on ARM
  2013-10-30 20:45             ` Tim Tisdall
@ 2013-10-30 20:57               ` Marcel Holtmann
  0 siblings, 0 replies; 24+ messages in thread
From: Marcel Holtmann @ 2013-10-30 20:57 UTC (permalink / raw)
  To: Tim Tisdall; +Cc: Alexander Holler, linux-bluetooth

Hi Tim,

>> Can you have a look at Documentation/dynamic-debug-howto.txt and enable the debug section for the bluetooth.ko kernel module. I wonder if we see something fishy in there.
> 
> That document looks rather long and confusing...  what exactly do I need to type to get the debugging statements working for bluetooth.ko?

This how you enable it based on file name:

echo -n "file l2cap_core.c +pfl" > /sys/kernel/debug/dynamic_debug/control
echo -n "file l2cap_sock.c +pfl" > /sys/kernel/debug/dynamic_debug/control

Or enabling for the whole module like this:

echo -n “module bluetooth +pfl" > /sys/kernel/debug/dynamic_debug/control

>> Do you have the chance to run bluetooth-next tree for testing purposes? I rather debug this against the latest tree. I have no ARM platform lying around. So you have to be my test subject ;)
> 
> My understanding is that the latest versions of the bluetooth code require kernel versions past 3.4, is this correct?  Most of the devices I have only have the 3.0 kernel available because they're intended to run Android.  Or is it possible to run it with the 3.4 kernel?  In either case, where can I find the bluetooth-next tree?

You can always run older userspace on newer kernel. At least that is what is suppose to work. So newer kernel should expose the same interface. Unless we are talking like 5 years old userspace. Then we might be in trouble. However running a bluetooth-next instead of 3.0 or 3.4 is certainly possible.

You find the latest kernel code here:

git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git

We need to find the spot where we for some reason send the SKB to the wrong socket. And that only for ARM as it seems. Seriously, this is a strange behavior.

Btw. sending on the socket works just fine? Meaning btmon shows it going out with the correct ACL handle to the right remote LE device?

Regards

Marcel


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: l2cap sockets not properly multiplexed on ARM
  2013-10-30 19:40           ` Marcel Holtmann
  2013-10-30 20:45             ` Tim Tisdall
@ 2013-10-30 23:06             ` Alexander Holler
  2013-10-31 13:31               ` Tim Tisdall
  1 sibling, 1 reply; 24+ messages in thread
From: Alexander Holler @ 2013-10-30 23:06 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: Tim Tisdall, linux-bluetooth

Am 30.10.2013 20:40, schrieb Marcel Holtmann:

...
>> So it's perfectly clear:  This all works fine on an x86 machine, but is an issue on ARM
...
> Do you have the chance to run bluetooth-next tree for testing purposes?

As Anderson Lizardo already mentioned, maybe first verify that the x86
kernel 3.4 doesn't have the same problem and that it's really a problem
of the ARM kernel. Up to now he didn't say what kernel version he uses
on x86.

Regards.

Alexander Holler

^ permalink raw reply	[flat|nested] 24+ messages in thread

* RE: l2cap sockets not properly multiplexed on ARM
  2013-10-30 23:06             ` Alexander Holler
@ 2013-10-31 13:31               ` Tim Tisdall
  2013-10-31 14:14                 ` Tim Tisdall
  2013-10-31 14:20                 ` Marcel Holtmann
  0 siblings, 2 replies; 24+ messages in thread
From: Tim Tisdall @ 2013-10-31 13:31 UTC (permalink / raw)
  To: Alexander Holler, Marcel Holtmann; +Cc: linux-bluetooth

> As Anderson Lizardo already mentioned, maybe first verify that the x86=0A=
> kernel 3.4 doesn't have the same problem and that it's really a problem=
=0A=
> of the ARM kernel. Up to now he didn't say what kernel version he uses=0A=
> on x86.=0A=
=0A=
here's my desktop version:=0A=
$ uname -a=0A=
Linux tzing 3.8.0-32-generic #47-Ubuntu SMP Tue Oct 1 22:35:23 UTC 2013 x86=
_64 x86_64 x86_64 GNU/Linux=0A=
=0A=
I'm trying to get an older version of the kernel running on another machine=
 and then I'll report back=0A=

^ permalink raw reply	[flat|nested] 24+ messages in thread

* RE: l2cap sockets not properly multiplexed on ARM
  2013-10-31 13:31               ` Tim Tisdall
@ 2013-10-31 14:14                 ` Tim Tisdall
  2013-10-31 14:18                   ` Tim Tisdall
  2013-10-31 14:19                   ` Marcel Holtmann
  2013-10-31 14:20                 ` Marcel Holtmann
  1 sibling, 2 replies; 24+ messages in thread
From: Tim Tisdall @ 2013-10-31 14:14 UTC (permalink / raw)
  To: Alexander Holler, Marcel Holtmann; +Cc: linux-bluetooth

Okay, I got the same issue on an x86 machine running "Linux debian 3.2.0-4-486 #1 Debian 3.2.51-1 i686 GNU/Linux".  So, it's not only the ARM machines.

What versions of the kernel are currently supported by the bluetooth team?  (ie when there are bug fixes, how far back will you backport those fixes?)  Am I coming across some issue that's already been fixed in newer versions of the kernel?

-Tim

^ permalink raw reply	[flat|nested] 24+ messages in thread

* RE: l2cap sockets not properly multiplexed on ARM
  2013-10-31 14:14                 ` Tim Tisdall
@ 2013-10-31 14:18                   ` Tim Tisdall
  2013-10-31 14:19                   ` Marcel Holtmann
  1 sibling, 0 replies; 24+ messages in thread
From: Tim Tisdall @ 2013-10-31 14:18 UTC (permalink / raw)
  To: Alexander Holler, Marcel Holtmann; +Cc: linux-bluetooth

Sorry, forgot to mention how I set up my testing environment...  I download=
ed the latest version of Debian 7.2 which uses the 3.2 kernel and ran it as=
 a live image off a USB drive.  So, you guys should be able to recreate it =
(if you wish) by snagging http://cdimage.debian.org/debian-cd/current-live/=
i386/iso-hybrid/debian-live-7.2-i386-standard.iso and then following http:/=
/www.debian.org/CD/faq/#write-usb to create a live usb image.=0A=
=0A=

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: l2cap sockets not properly multiplexed on ARM
  2013-10-31 14:14                 ` Tim Tisdall
  2013-10-31 14:18                   ` Tim Tisdall
@ 2013-10-31 14:19                   ` Marcel Holtmann
  1 sibling, 0 replies; 24+ messages in thread
From: Marcel Holtmann @ 2013-10-31 14:19 UTC (permalink / raw)
  To: Tim Tisdall; +Cc: Alexander Holler, linux-bluetooth

Hi Tim,

> Okay, I got the same issue on an x86 machine running "Linux debian 3.2.0-4-486 #1 Debian 3.2.51-1 i686 GNU/Linux".  So, it's not only the ARM machines.
> 
> What versions of the kernel are currently supported by the bluetooth team?  (ie when there are bug fixes, how far back will you backport those fixes?)  Am I coming across some issue that's already been fixed in newer versions of the kernel?

the upstream people are not backporting anything. The closest you get with upstream is if a patch is cheery picked into -stable. For everything else it is the distro’s job to backport.

Regards

Marcel


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: l2cap sockets not properly multiplexed on ARM
  2013-10-31 13:31               ` Tim Tisdall
  2013-10-31 14:14                 ` Tim Tisdall
@ 2013-10-31 14:20                 ` Marcel Holtmann
  2013-10-31 14:29                   ` Tim Tisdall
  2013-11-01 11:03                   ` Anderson Lizardo
  1 sibling, 2 replies; 24+ messages in thread
From: Marcel Holtmann @ 2013-10-31 14:20 UTC (permalink / raw)
  To: Tim Tisdall; +Cc: Alexander Holler, linux-bluetooth

Hi Tim,

>> As Anderson Lizardo already mentioned, maybe first verify that the x86
>> kernel 3.4 doesn't have the same problem and that it's really a problem
>> of the ARM kernel. Up to now he didn't say what kernel version he uses
>> on x86.
> 
> here's my desktop version:
> $ uname -a
> Linux tzing 3.8.0-32-generic #47-Ubuntu SMP Tue Oct 1 22:35:23 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
> 
> I'm trying to get an older version of the kernel running on another machine and then I'll report back

I actually need to know if bluetooth-next tree still has this issue. That is first and foremost the one thing that needs to be checked.

Regards

Marcel


^ permalink raw reply	[flat|nested] 24+ messages in thread

* RE: l2cap sockets not properly multiplexed on ARM
  2013-10-31 14:20                 ` Marcel Holtmann
@ 2013-10-31 14:29                   ` Tim Tisdall
  2013-10-31 14:41                     ` Marcel Holtmann
  2013-11-01 11:03                   ` Anderson Lizardo
  1 sibling, 1 reply; 24+ messages in thread
From: Tim Tisdall @ 2013-10-31 14:29 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: Alexander Holler, linux-bluetooth

> I actually need to know if bluetooth-next tree still has this issue. That=
 is first and foremost the one thing that needs to be checked.=0A=
=0A=
I really doubt it's an issue with bluetooth-next as it's only been an issue=
 with kernel versions 3.4.X and older.=0A=
=0A=
I'm not familiar with how kernel development goes, so I'm not sure I comple=
tely understand what "bluetooth-next" entails.  Aren't there different main=
tainers for the different major versions of the kernel and don't they updat=
e the in-built modules where ever possible?  Is "bluetooth-next" tied to a =
particular kernel version or does it support a range of versions as it's a =
module?=

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: l2cap sockets not properly multiplexed on ARM
  2013-10-31 14:29                   ` Tim Tisdall
@ 2013-10-31 14:41                     ` Marcel Holtmann
  0 siblings, 0 replies; 24+ messages in thread
From: Marcel Holtmann @ 2013-10-31 14:41 UTC (permalink / raw)
  To: Tim Tisdall; +Cc: Alexander Holler, linux-bluetooth

Hi Tim,

>> I actually need to know if bluetooth-next tree still has this issue. That is first and foremost the one thing that needs to be checked.
> 
> I really doubt it's an issue with bluetooth-next as it's only been an issue with kernel versions 3.4.X and older.
> 
> I'm not familiar with how kernel development goes, so I'm not sure I completely understand what "bluetooth-next" entails.  Aren't there different maintainers for the different major versions of the kernel and don't they update the in-built modules where ever possible?  Is "bluetooth-next" tied to a particular kernel version or does it support a range of versions as it's a module?

bluetooth-next is what will become kernel 3.13 at some point when Linus releases it. It is code that is on its way towards official Linux trees.

If bluetooth-next works as expected, then you could just git bisect and root cause the patch that fixed it. However first you have to establish if bluetooth-next kernel works or not.

Regards

Marcel


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: l2cap sockets not properly multiplexed on ARM
  2013-10-31 14:20                 ` Marcel Holtmann
  2013-10-31 14:29                   ` Tim Tisdall
@ 2013-11-01 11:03                   ` Anderson Lizardo
  2013-11-01 13:35                     ` Tim Tisdall
  1 sibling, 1 reply; 24+ messages in thread
From: Anderson Lizardo @ 2013-11-01 11:03 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: Tim Tisdall, Alexander Holler, linux-bluetooth

Hi Marcel,

On Thu, Oct 31, 2013 at 10:20 AM, Marcel Holtmann <marcel@holtmann.org> wrote:
> Hi Tim,
>
>>> As Anderson Lizardo already mentioned, maybe first verify that the x86
>>> kernel 3.4 doesn't have the same problem and that it's really a problem
>>> of the ARM kernel. Up to now he didn't say what kernel version he uses
>>> on x86.
>>
>> here's my desktop version:
>> $ uname -a
>> Linux tzing 3.8.0-32-generic #47-Ubuntu SMP Tue Oct 1 22:35:23 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
>>
>> I'm trying to get an older version of the kernel running on another machine and then I'll report back
>
> I actually need to know if bluetooth-next tree still has this issue. That is first and foremost the one thing that needs to be checked.

I asked Tim to mention the kernel version on x86 vs. the version on
ARM, because I vaguely remember this same issue being reported last
year (or even 2011) and being fixed (If I find the patch, I will let
you know). As Tim mentions later on, on x86 the issue does not happen
on 3.8, but it is present on 3.2 (and I suspect it will also be
present on 3.4 on x86 as well).

Best Regards,
-- 
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil

^ permalink raw reply	[flat|nested] 24+ messages in thread

* RE: l2cap sockets not properly multiplexed on ARM
  2013-11-01 11:03                   ` Anderson Lizardo
@ 2013-11-01 13:35                     ` Tim Tisdall
  2013-11-01 14:11                       ` Tim Tisdall
  0 siblings, 1 reply; 24+ messages in thread
From: Tim Tisdall @ 2013-11-01 13:35 UTC (permalink / raw)
  To: Anderson Lizardo, Marcel Holtmann; +Cc: Alexander Holler, linux-bluetooth

>> I actually need to know if bluetooth-next tree still has this issue. Tha=
t is first and foremost the one thing that needs to be checked.=0A=
=0A=
> I asked Tim to mention the kernel version on x86 vs. the version on=0A=
> ARM, because I vaguely remember this same issue being reported last=0A=
> year (or even 2011) and being fixed (If I find the patch, I will let=0A=
> you know). As Tim mentions later on, on x86 the issue does not happen=0A=
> on 3.8, but it is present on 3.2 (and I suspect it will also be=0A=
> present on 3.4 on x86 as well).=0A=
=0A=
I was going to say yesterday (until my computer suddenly died due to overhe=
ating):  Can't it be assumed that it's okay in bluetooth-next since the iss=
ue seems to be gone with kernels > 3.4?=0A=
=0A=
I was trying to get a 3.4.67 kernel running on one ARM device but unfortuna=
tely I can't seem to get the bluetooth dongle to be recognized (something t=
o do with the USB code, I suspect).  It's probably still an issue, though, =
so I'd really appreciate if you managed to find that patch!=0A=
=0A=
-Tim=0A=
=0A=

^ permalink raw reply	[flat|nested] 24+ messages in thread

* RE: l2cap sockets not properly multiplexed on ARM
  2013-11-01 13:35                     ` Tim Tisdall
@ 2013-11-01 14:11                       ` Tim Tisdall
  0 siblings, 0 replies; 24+ messages in thread
From: Tim Tisdall @ 2013-11-01 14:11 UTC (permalink / raw)
  To: Anderson Lizardo, Marcel Holtmann; +Cc: Alexander Holler, linux-bluetooth

> I was trying to get a 3.4.67 kernel running on one ARM device but unfortu=
nately I can't seem to get the bluetooth dongle to be recognized (something=
 to do with the USB code, I suspect).  It's probably still an issue, though=
, so I'd really appreciate if you managed to find that patch!=0A=
=0A=
Okay, I found out that I could get my bluetooth dongle working if I used a =
powered hub (the internal USB sockets are working but have no power).  So, =
I tried it out and have the same issue with mixed up L2CAP sockets.=0A=
=0A=
-Tim=

^ permalink raw reply	[flat|nested] 24+ messages in thread

* l2cap sockets not properly multiplexed on ARM
@ 2013-10-29 13:43 Tim Tisdall
  0 siblings, 0 replies; 24+ messages in thread
From: Tim Tisdall @ 2013-10-29 13:43 UTC (permalink / raw)
  To: linux-bluetooth

[-- Attachment #1: Type: text/plain, Size: 2988 bytes --]

I was talking to Marcel on the freenode chat and he suggested I post this issue to the mailing list...

I have some code where I make LE L2CAP connections to multiple sensor devices.  On my laptop and any other x86-like device I have no problems with the code and everything works correctly.  When I try to run the same code on several different ARM machines I have the same problem where the L2CAP sockets seem to get merged and all data returns on the last connected one.

Marcel asked for me to post the btmon logs of my problem but the logs essentially show that things are working correctly because I think it's getting all the data on the HCI level.  You can see the 2 sensors have connection handles 64 and 65.  However here is some output from my code (it's all coming down one file descriptor corresponding to the "78:c5:e5:6c:47:d3" device and the earlier file descriptor now receives nothing):

2013-10-28 20:18:54+0000 [-] 78:c5:e5:6c:47:d3 x-axis: -1
2013-10-28 20:18:54+0000 [-] 78:c5:e5:6c:47:d3 y-axis: -9
2013-10-28 20:18:54+0000 [-] 78:c5:e5:6c:47:d3 z-axis: -64
2013-10-28 20:18:54+0000 [-] 78:c5:e5:6c:47:d3 x-axis: -7
2013-10-28 20:18:54+0000 [-] 78:c5:e5:6c:47:d3 y-axis: -51
2013-10-28 20:18:54+0000 [-] 78:c5:e5:6c:47:d3 x-axis: 2
2013-10-28 20:18:54+0000 [-] 78:c5:e5:6c:47:d3 y-axis: -8
2013-10-28 20:19:10+0000 [-] 78:c5:e5:6c:47:d3 x-axis: -7
2013-10-28 20:19:10+0000 [-] 78:c5:e5:6c:47:d3 x-axis: -1

which corresponds to the btmon output:
[hci0] 20:18:54.359162 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 ff                          .....*..        
[hci0] 20:18:54.359454 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 f7                          ........        
[hci0] 20:18:54.360633 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c0                          .....2..        
[hci0] 20:18:54.561663 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f9                          .....*..        
[hci0] 20:18:54.564898 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 cd                          ........        
[hci0] 20:18:54.696646 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 02                          .....*..        
[hci0] 20:18:54.698873 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 f8                          ........        
[hci0] 20:19:10.383417 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f9                          .....*..        
[hci0] 20:19:10.439511 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 ff                          .....*..        


The ATT_OP_WRITE_CMD command to get the notifications are sent down the L2CAP sockets so communication towards the sensors seems to work correctly, it's just the data coming the other way is the issue.

-Tim

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: btmon.log --]
[-- Type: text/x-log; name="btmon.log", Size: 16650 bytes --]

Bluetooth monitor ver 4.101
[hci0] 20:18:14.338542 = New Index: 00:02:72:3E:7F:9B (BR/EDR,USB,hci0)
[hci0] 20:18:25.230025 < HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7
            00 10 00 10 00 00 00                             .......         
[hci0] 20:18:25.230989 > HCI Event: Command Complete (0x0e) plen 4
            01 0b 20 00                                      .. .            
[hci0] 20:18:25.231782 < HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2
            01 00                                            ..              
[hci0] 20:18:25.232986 > HCI Event: Command Complete (0x0e) plen 4
            01 0c 20 00                                      .. .            
{hci0} 20:18:25.233050 @ Discovering: 0x01 (0)
[hci0] 20:18:37.428871 > HCI Event: LE Meta Event (0x3e) plen 15
            02 01 00 00 a2 47 6c e5 c5 78 03 02 01 05 a6     .....Gl..x..... 
{hci0} 20:18:37.429647 @ Device Found: 78:C5:E5:6C:47:A2 (1) rssi -90 flags 0x0000
            02 01 05                                         ...             
[hci0] 20:18:37.637286 > HCI Event: LE Meta Event (0x3e) plen 15
            02 01 00 00 a2 47 6c e5 c5 78 03 02 01 05 a4     .....Gl..x..... 
{hci0} 20:18:37.638128 @ Device Found: 78:C5:E5:6C:47:A2 (1) rssi -92 flags 0x0000
            02 01 05                                         ...             
[hci0] 20:18:37.661732 < HCI Command: LE Create Connection (0x08|0x000d) plen 25
            60 00 30 00 00 00 a2 47 6c e5 c5 78 00 28 00 38  `.0....Gl..x.(.8
            00 00 00 2a 00 00 00 00 00                       ...*.....       
[hci0] 20:18:37.663267 > HCI Event: Command Status (0x0f) plen 4
            00 01 0d 20                                      ...             
[hci0] 20:18:37.743164 > HCI Event: LE Meta Event (0x3e) plen 19
            01 00 40 00 00 00 a2 47 6c e5 c5 78 36 00 00 00  ..@....Gl..x6...
            2a 00 05                                         *..             
{hci0} 20:18:37.746828 @ Device Connected: 78:C5:E5:6C:47:A2 (1) flags 0x0000
[hci0] 20:18:37.802830 < ACL Data: handle 64 flags 0x00 dlen 9
            05 00 04 00 52 2b 00 01 00                       ....R+...       
[hci0] 20:18:37.830466 < ACL Data: handle 64 flags 0x00 dlen 9
            05 00 04 00 52 33 00 01 00                       ....R3...       
[hci0] 20:18:37.831004 < ACL Data: handle 64 flags 0x00 dlen 9
            05 00 04 00 52 2f 00 01 00                       ....R/...       
[hci0] 20:18:37.831305 < ACL Data: handle 64 flags 0x00 dlen 9
            05 00 04 00 52 20 00 01 00                       ....R ...       
[hci0] 20:18:37.831434 < ACL Data: handle 64 flags 0x00 dlen 13
            09 00 04 00 0e 2a 00 32 00 2e 00 1f 00           .....*.2.....   
[hci0] 20:18:37.821898 > ACL Data: handle 64 flags 0x02 dlen 16
            0c 00 05 00 12 01 08 00 10 00 20 00 00 00 2c 01  .......... ...,.
[hci0] 20:18:37.832516 < ACL Data: handle 64 flags 0x00 dlen 10
            06 00 05 00 13 01 02 00 00 00                    ..........      
[hci0] 20:18:37.832721 < HCI Command: LE Connection Update (0x08|0x0013) plen 14
            40 00 10 00 20 00 00 00 2c 01 01 00 01 00        @... ...,.....  
[hci0] 20:18:37.865257 > HCI Event: Command Status (0x0f) plen 4
            00 01 13 20                                      ...             
[hci0] 20:18:37.889123 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 dd                          ........        
[hci0] 20:18:37.889670 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 cd                          .....2..        
[hci0] 20:18:37.957320 > HCI Event: Number of Completed Packets (0x13) plen 5
            01 40 00 02 00                                   .@...           
[hci0] 20:18:37.959205 > HCI Event: Number of Completed Packets (0x13) plen 5
            01 40 00 02 00                                   .@...           
[hci0] 20:18:38.092097 > ACL Data: handle 64 flags 0x02 dlen 9
            05 00 04 00 0f 00 cd dd 51                       ........Q       
[hci0] 20:18:38.094177 > HCI Event: Number of Completed Packets (0x13) plen 5
            01 40 00 02 00                                   .@...           
[hci0] 20:18:38.094463 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 c8                          .....*..        
[hci0] 20:18:38.094586 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 85                          ........        
[hci0] 20:18:38.159057 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 16                          .....2..        
[hci0] 20:18:38.160390 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 02                          .....*..        
[hci0] 20:18:38.160518 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 fe                          ........        
[hci0] 20:18:38.194021 > HCI Event: LE Meta Event (0x3e) plen 15
            02 01 00 00 a2 47 6c e5 c5 78 03 02 01 05 a9     .....Gl..x..... 
{hci0} 20:18:38.194736 @ Device Found: 78:C5:E5:6C:47:A2 (1) rssi -87 flags 0x0000
            02 01 05                                         ...             
[hci0] 20:18:38.294342 > HCI Event: Disconn Complete (0x05) plen 4
            00 40 00 13                                      .@..            
{hci0} 20:18:38.296381 @ Device Disconnected: 78:C5:E5:6C:47:A2 (1)
[hci0] 20:18:38.299183 > HCI Event: LE Meta Event (0x3e) plen 15
            02 01 00 00 a2 47 6c e5 c5 78 03 02 01 05 ba     .....Gl..x..... 
{hci0} 20:18:38.323501 @ Device Found: 78:C5:E5:6C:47:A2 (1) rssi -70 flags 0x0000
            02 01 05                                         ...             
[hci0] 20:18:38.402894 > HCI Event: LE Meta Event (0x3e) plen 15
            02 01 00 00 a2 47 6c e5 c5 78 03 02 01 05 b3     .....Gl..x..... 
{hci0} 20:18:38.403917 @ Device Found: 78:C5:E5:6C:47:A2 (1) rssi -77 flags 0x0000
            02 01 05                                         ...             
[hci0] 20:18:38.465634 < HCI Command: LE Create Connection (0x08|0x000d) plen 25
            60 00 30 00 00 00 a2 47 6c e5 c5 78 00 28 00 38  `.0....Gl..x.(.8
            00 00 00 2a 00 00 00 00 00                       ...*.....       
[hci0] 20:18:38.467407 > HCI Event: Command Status (0x0f) plen 4
            00 01 0d 20                                      ...             
[hci0] 20:18:38.511164 > HCI Event: LE Meta Event (0x3e) plen 15
            02 01 00 00 a2 47 6c e5 c5 78 03 02 01 05 ba     .....Gl..x..... 
{hci0} 20:18:38.514909 @ Device Found: 78:C5:E5:6C:47:A2 (1) rssi -70 flags 0x0000
            02 01 05                                         ...             
[hci0] 20:18:38.615794 > HCI Event: LE Meta Event (0x3e) plen 15
            02 01 00 00 a2 47 6c e5 c5 78 03 02 01 05 b4     .....Gl..x..... 
{hci0} 20:18:38.617512 @ Device Found: 78:C5:E5:6C:47:A2 (1) rssi -76 flags 0x0000
            02 01 05                                         ...             
[hci0] 20:18:38.718783 > HCI Event: LE Meta Event (0x3e) plen 19
            01 00 40 00 00 00 a2 47 6c e5 c5 78 36 00 00 00  ..@....Gl..x6...
            2a 00 05                                         *..             
{hci0} 20:18:38.722401 @ Device Connected: 78:C5:E5:6C:47:A2 (1) flags 0x0000
[hci0] 20:18:38.766767 > ACL Data: handle 64 flags 0x02 dlen 16
            0c 00 05 00 12 02 08 00 10 00 20 00 00 00 2c 01  .......... ...,.
[hci0] 20:18:38.770494 < ACL Data: handle 64 flags 0x00 dlen 10
            06 00 05 00 13 02 02 00 00 00                    ..........      
[hci0] 20:18:38.770750 < HCI Command: LE Connection Update (0x08|0x0013) plen 14
            40 00 10 00 20 00 00 00 2c 01 01 00 01 00        @... ...,.....  
[hci0] 20:18:38.774270 > HCI Event: Command Status (0x0f) plen 4
            00 01 13 20                                      ...             
[hci0] 20:18:38.782653 < ACL Data: handle 64 flags 0x00 dlen 9
            05 00 04 00 52 2b 00 01 00                       ....R+...       
[hci0] 20:18:38.810351 < ACL Data: handle 64 flags 0x00 dlen 9
            05 00 04 00 52 33 00 01 00                       ....R3...       
[hci0] 20:18:38.813370 < ACL Data: handle 64 flags 0x00 dlen 9
            05 00 04 00 52 2f 00 01 00                       ....R/...       
[hci0] 20:18:38.815045 < ACL Data: handle 64 flags 0x00 dlen 9
            05 00 04 00 52 20 00 01 00                       ....R ...       
[hci0] 20:18:38.825889 < ACL Data: handle 64 flags 0x00 dlen 13
            09 00 04 00 0e 2a 00 32 00 2e 00 1f 00           .....*.2.....   
[hci0] 20:18:38.834141 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 f8                          ........        
[hci0] 20:18:38.834673 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c1                          .....2..        
[hci0] 20:18:38.970272 > HCI Event: Number of Completed Packets (0x13) plen 5
            01 40 00 02 00                                   .@...           
[hci0] 20:18:38.972162 > HCI Event: Number of Completed Packets (0x13) plen 5
            01 40 00 02 00                                   .@...           
[hci0] 20:18:39.038229 > HCI Event: Number of Completed Packets (0x13) plen 5
            01 40 00 02 00                                   .@...           
[hci0] 20:18:39.104245 > ACL Data: handle 64 flags 0x02 dlen 9
            05 00 04 00 0f 02 c1 f8 4a                       ........J       
[hci0] 20:18:47.897759 > HCI Event: LE Meta Event (0x3e) plen 15
            02 01 00 00 d3 47 6c e5 c5 78 03 02 01 05 b1     .....Gl..x..... 
{hci0} 20:18:47.898481 @ Device Found: 78:C5:E5:6C:47:D3 (1) rssi -79 flags 0x0000
            02 01 05                                         ...             
[hci0] 20:18:48.006000 > HCI Event: LE Meta Event (0x3e) plen 15
            02 01 00 00 d3 47 6c e5 c5 78 03 02 01 05 b1     .....Gl..x..... 
{hci0} 20:18:48.006766 @ Device Found: 78:C5:E5:6C:47:D3 (1) rssi -79 flags 0x0000
            02 01 05                                         ...             
[hci0] 20:18:48.022528 < HCI Command: LE Create Connection (0x08|0x000d) plen 25
            60 00 30 00 00 00 d3 47 6c e5 c5 78 00 28 00 38  `.0....Gl..x.(.8
            00 00 00 2a 00 00 00 00 00                       ...*.....       
[hci0] 20:18:48.024317 > HCI Event: Command Status (0x0f) plen 4
            00 01 0d 20                                      ...             
[hci0] 20:18:48.111376 > HCI Event: LE Meta Event (0x3e) plen 15
            02 01 00 00 d3 47 6c e5 c5 78 03 02 01 05 b3     .....Gl..x..... 
{hci0} 20:18:48.114928 @ Device Found: 78:C5:E5:6C:47:D3 (1) rssi -77 flags 0x0000
            02 01 05                                         ...             
[hci0] 20:18:48.212831 > HCI Event: LE Meta Event (0x3e) plen 15
            02 01 00 00 d3 47 6c e5 c5 78 03 02 01 05 b4     .....Gl..x..... 
{hci0} 20:18:48.216182 @ Device Found: 78:C5:E5:6C:47:D3 (1) rssi -76 flags 0x0000
            02 01 05                                         ...             
[hci0] 20:18:48.323916 > HCI Event: LE Meta Event (0x3e) plen 19
            01 00 41 00 00 00 d3 47 6c e5 c5 78 2d 00 00 00  ..A....Gl..x-...
            2a 00 05                                         *..             
{hci0} 20:18:48.327495 @ Device Connected: 78:C5:E5:6C:47:D3 (1) flags 0x0000
[hci0] 20:18:48.333284 > ACL Data: handle 65 flags 0x02 dlen 16
            0c 00 05 00 12 01 08 00 10 00 20 00 00 00 2c 01  .......... ...,.
[hci0] 20:18:48.349300 < ACL Data: handle 65 flags 0x00 dlen 10
            06 00 05 00 13 01 02 00 00 00                    ..........      
[hci0] 20:18:48.352607 < HCI Command: LE Connection Update (0x08|0x0013) plen 14
            41 00 10 00 20 00 00 00 2c 01 01 00 01 00        A... ...,.....  
[hci0] 20:18:48.383669 < ACL Data: handle 65 flags 0x00 dlen 9
            05 00 04 00 52 2b 00 01 00                       ....R+...       
[hci0] 20:18:48.388568 < ACL Data: handle 65 flags 0x00 dlen 9
            05 00 04 00 52 33 00 01 00                       ....R3...       
[hci0] 20:18:48.387350 > HCI Event: Command Status (0x0f) plen 4
            00 01 13 20                                      ...             
[hci0] 20:18:48.418589 < ACL Data: handle 65 flags 0x00 dlen 9
            05 00 04 00 52 2f 00 01 00                       ....R/...       
[hci0] 20:18:48.425317 < ACL Data: handle 65 flags 0x00 dlen 9
            05 00 04 00 52 20 00 01 00                       ....R ...       
[hci0] 20:18:48.430541 < ACL Data: handle 65 flags 0x00 dlen 13
            09 00 04 00 0e 2a 00 32 00 2e 00 1f 00           .....*.2.....   
[hci0] 20:18:48.502347 > HCI Event: Number of Completed Packets (0x13) plen 5
            01 41 00 02 00                                   .A...           
[hci0] 20:18:48.504306 > HCI Event: Number of Completed Packets (0x13) plen 5
            01 41 00 02 00                                   .A...           
[hci0] 20:18:48.557946 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 f9                          ........        
[hci0] 20:18:48.559036 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 bd                          .....2..        
[hci0] 20:18:48.560295 > HCI Event: Number of Completed Packets (0x13) plen 5
            01 41 00 02 00                                   .A...           
[hci0] 20:18:48.614345 > ACL Data: handle 65 flags 0x02 dlen 9
            05 00 04 00 0f 00 bd f9 46                       ........F       
[hci0] 20:18:54.291631 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 ee                          .....*..        
[hci0] 20:18:54.292623 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 ec                          ........        
[hci0] 20:18:54.292750 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c9                          .....2..        
[hci0] 20:18:54.359162 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 ff                          .....*..        
[hci0] 20:18:54.359454 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 f7                          ........        
[hci0] 20:18:54.360633 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 32 00 c0                          .....2..        
[hci0] 20:18:54.561663 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f9                          .....*..        
[hci0] 20:18:54.564898 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 cd                          ........        
[hci0] 20:18:54.696646 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 02                          .....*..        
[hci0] 20:18:54.698873 > ACL Data: handle 64 flags 0x02 dlen 8
            04 00 04 00 1b 2e 00 f8                          ........        
[hci0] 20:19:10.383417 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 f9                          .....*..        
[hci0] 20:19:10.439511 > ACL Data: handle 65 flags 0x02 dlen 8
            04 00 04 00 1b 2a 00 ff                          .....*..        
[hci0] 20:19:26.411547 < HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2
            00 00                                            ..              
[hci0] 20:19:26.414730 > HCI Event: Command Complete (0x0e) plen 4
            01 0c 20 00                                      .. .            
{hci0} 20:19:26.415494 @ Discovering: 0x00 (0)
[hci0] 20:19:28.193302 < HCI Command: Disconnect (0x01|0x0006) plen 3
            41 00 13                                         A..             
[hci0] 20:19:28.197097 > HCI Event: Command Status (0x0f) plen 4
            00 01 06 04                                      ....            
[hci0] 20:19:28.215607 > HCI Event: Disconn Complete (0x05) plen 4
            00 41 00 16                                      .A..            
{hci0} 20:19:28.216171 @ Device Disconnected: 78:C5:E5:6C:47:D3 (1)
[hci0] 20:19:28.313364 < HCI Command: Disconnect (0x01|0x0006) plen 3
            40 00 13                                         @..             
[hci0] 20:19:28.315515 > HCI Event: Command Status (0x0f) plen 4
            00 01 06 04                                      ....            
[hci0] 20:19:28.380626 > HCI Event: Disconn Complete (0x05) plen 4
            00 40 00 16                                      .@..            
{hci0} 20:19:28.381835 @ Device Disconnected: 78:C5:E5:6C:47:A2 (1)


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2013-11-01 14:11 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-29 20:44 l2cap sockets not properly multiplexed on ARM Tim Tisdall
2013-10-30 11:24 ` Alexander Holler
2013-10-30 11:46   ` Alexander Holler
2013-10-30 13:15     ` Tim Tisdall
2013-10-30 14:16       ` Alexander Holler
2013-10-30 15:06         ` Tim Tisdall
2013-10-30 15:10           ` Tim Tisdall
2013-10-30 15:16             ` Tim Tisdall
2013-10-30 18:36               ` Anderson Lizardo
2013-10-30 19:40           ` Marcel Holtmann
2013-10-30 20:45             ` Tim Tisdall
2013-10-30 20:57               ` Marcel Holtmann
2013-10-30 23:06             ` Alexander Holler
2013-10-31 13:31               ` Tim Tisdall
2013-10-31 14:14                 ` Tim Tisdall
2013-10-31 14:18                   ` Tim Tisdall
2013-10-31 14:19                   ` Marcel Holtmann
2013-10-31 14:20                 ` Marcel Holtmann
2013-10-31 14:29                   ` Tim Tisdall
2013-10-31 14:41                     ` Marcel Holtmann
2013-11-01 11:03                   ` Anderson Lizardo
2013-11-01 13:35                     ` Tim Tisdall
2013-11-01 14:11                       ` Tim Tisdall
  -- strict thread matches above, loose matches on Subject: below --
2013-10-29 13:43 Tim Tisdall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.