Date: Fri, 10 Dec 2010 09:59:49 +0000 (GMT) From: Iain Hibbert <plunky@rya-online.net> To: bluetooth@freebsd.org Subject: obexapp: handle 32-bit uuid in ProtocolDescriptorList Message-ID: <alpine.NEB.2.00.1012100938420.1298@galant.ukfsn.org>
index | next in thread | raw e-mail
[-- Attachment #1 --]
Hi
I found that Mac OS X (10.3.5 at least, more recent probably not) provides
a 32-bit UUID for L2CAP in the OBEX records, this defeats obexapp trying
to send a file, eg from hcidump output
< ACL data: handle 13 flags 0x02 dlen 24
L2CAP(d): cid 0x0040 len 20 [psm 1]
SDP SSA Req: tid 0x1 len 0xf
pat uuid-16 0x1106 (OBEXObjTrnsf)
max 653
aid(s) 0x0004 - 0x0004
cont 00
> ACL data: handle 13 flags 0x02 dlen 40
L2CAP(d): cid 0x0044 len 36 [psm 1]
SDP SSA Rsp: tid 0x1 len 0x1f
count 28
record #0
aid 0x0004 (ProtocolDescList)
< < uuid-32 0x0100 (L2CAP) > <
uuid-16 0x0003 (RFCOMM) uint 0xf > <
uuid-16 0x0008 (OBEX) > >
cont 00
which returns 'Could not obtain RFCOMM channel' error
patch attached fixes this..
regards,
iain
[-- Attachment #2 --]
--- sdp.c 2010-10-19 18:48:27.000000000 +0100
+++ sdp.c 2010-12-10 09:34:15.000000000 +0000
@@ -230,7 +230,16 @@ rfcomm_proto_list_parse(uint8_t *start,
goto next_protocol;
break;
- case SDP_DATA_UUID32: /* XXX FIXME can we have 32-bit UUID */
+ case SDP_DATA_UUID32:
+ if (end - start < 5)
+ rfcomm_proto_list_parse_exit(EINVAL);
+
+ SDP_GET32(value, start); len -= sizeof(uint32_t);
+ if (value != SDP_UUID_PROTOCOL_RFCOMM)
+ goto next_protocol;
+
+ break;
+
case SDP_DATA_UUID128: /* XXX FIXME can we have 128-bit UUID */
default:
rfcomm_proto_list_parse_exit(ENOATTR);
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.NEB.2.00.1012100938420.1298>
