btpand problem
Iain Hibbert
plunky at rya-online.net
Fri Oct 12 09:03:14 UTC 2012
On Thu, 11 Oct 2012, Maksim Yevmenkin wrote:
> On Thu, Oct 11, 2012 at 3:32 PM, Andreas Longwitz <longwitz at incore.de> wrote:
> > Thanks for quick answer !
> >
> >> Can you tell what l2cap Mtu was negotiated on both ends?
> >
> > HCIDump - HCI packet analyzer ver 1.5
> > ...
> >> ACL data: handle 0x002a flags 0x02 dlen 18
> > L2CAP(s): Config rsp: scid 0x004f flags 0x0000 result 0 clen 4
> > MTU 672
> >> ACL data: handle 0x002a flags 0x02 dlen 16
> > L2CAP(s): Config req: dcid 0x004f flags 0x0000 clen 4
> > MTU 256
> > ....
> > < ACL data: handle 0x002a flags 0x02 dlen 16
> > L2CAP(s): Config req: dcid 0x0203 flags 0x0000 clen 4
> > MTU 1691
> >> HCI Event: Number of Completed Packets(0x13) plen 5
> >> ACL data: handle 0x002a flags 0x02 dlen 18
> > L2CAP(s): Config rsp: scid 0x0050 flags 0x0000 result 0 clen 4
> > MTU 1691
> >> ACL data: handle 0x002a flags 0x02 dlen 16
> > L2CAP(s): Config req: dcid 0x0050 flags 0x0000 clen 4
> > MTU 1691
> > ....
> >
> > My panserver is an iPhone 4S in hotspot mode.
Is this more than one connection, can you show the entire dump? (the first
one is a rsp from the other side, then it sends a req later..?)
> well, it looks like your device told btpand(8) that it can not accept
> more than 672 bytes (default l2cap mtu) at a time. hence the emsgsize
> error, i.e. datagram, btpand(8) is trying to send, is too big for
> remote device to accept. quick fix would be to adjust mtu on the tap
> interface to make sure btpand(8) never tries to send more than 672
> bytes of payload.
except that client_init() requires that the negotiated outgoing MTU be at
least the BNEP minimum MTU (1691), and bnep_send will fail if the packet
is larger than the channel MTU ..
Andreas, can you add some debug to the end of bnep_send() something like
if (nw == -1) {
uint16_t mtu;
socklen_t len = sizeof(mtu);
getsockopt(fd, BTPROTO_L2CAP, SO_L2CAP_OMTU, &mtu, &len);
log_err("writev failed: %m (mtu %d)\n", mtu);
}
?
iain
More information about the freebsd-bluetooth
mailing list