Problems with Bluetooth LAN access
Denis Fokin
sanvean at mail.ru
Mon Apr 4 14:14:12 PDT 2005
Hello, Maksim!
First of all thank yoy for your kindness.
> why are you using sdptool? there is nothing wrong with it, but FreeBSD
> 5.3 has its own sdp server (sdpd(8)) and client (sdpcontrol(8)).
I have read a very old manual, nothing was stated there about sdpcontrol.
Right from now I will know about this tool :)
> > Fine, let's bring up the service:
> >
> > sanvean% sdptool add --channel 7 LAN
>
> again why sdptool? in 5.3 rfcommm_pppd(8) should register LAN service
> automatically with local sdpd(8).
Fully agree! I have figured it out in experimental way, while writting my own script to enable bluetooth service at startup :)
>
> btw, if you had used "hcidump -X" or "hcidump -A" you would have noticed
> that right away :)
Again, thank you for a nice hint.
> also how did you manage to start rfcomm_pppd(8)? it should exit if it
> cant register service with local sdpd(8). i do not see you mentioned
> sdpd(8) anywhere.
Sorry, I have forget to tell, that both sdpd and hcisecd are started without problems.
> > Have tried another services: OBEX, Serial - no luck :(
> > My devices can connect to each other, but cannot communicate.
>
> so, is everything works now?
semi-works...
OPUSH sessions work. I can do "getdefault" and put my own contacts
But FTRN does not work completely. Here is my log:
sanvean% sdpcontrol -a 00:04:3e:80:45:d1 browse
Record Handle: 0x00010000
Service Class ID List:
Serial Port (0x1101)
Protocol Descriptor List:
L2CAP (0x0100)
RFCOMM (0x0003)
Protocol specific parameter #1: u/int8/bool 1
Bluetooth Profile Descriptor List:
Serial Port (0x1101) ver. 1.0
Record Handle: 0x00010001
Service Class ID List:
OBEX Object Push (0x1105)
Protocol Descriptor List:
L2CAP (0x0100)
RFCOMM (0x0003)
Protocol specific parameter #1: u/int8/bool 2
OBEX (0x0008)
Bluetooth Profile Descriptor List:
OBEX Object Push (0x1105) ver. 1.0
Record Handle: 0x00010002
Service Class ID List:
OBEX File Transfer (0x1106)
Protocol Descriptor List:
L2CAP (0x0100)
RFCOMM (0x0003)
Protocol specific parameter #1: u/int8/bool 3
OBEX (0x0008)
Bluetooth Profile Descriptor List:
OBEX File Transfer (0x1106) ver. 1.0
Record Handle: 0x00010003
Service Class ID List:
GN (0x1117)
Protocol Descriptor List:
L2CAP (0x0100)
Protocol specific parameter #1: u/int/uuid16 15
BNEP (0x000f)
Protocol specific parameter #1: u/int/uuid16 256
Protocol specific parameter #2: 0x09 0x08 00 0x09 0x08 0x06
Bluetooth Profile Descriptor List:
GN (0x1117) ver. 1.0
Record Handle: 0x00010004
Service Class ID List:
PANU (0x1115)
Protocol Descriptor List:
L2CAP (0x0100)
Protocol specific parameter #1: u/int/uuid16 15
BNEP (0x000f)
Protocol specific parameter #1: u/int/uuid16 256
Protocol specific parameter #2: 0x09 0x08 00 0x09 0x08 0x06
Bluetooth Profile Descriptor List:
PANU (0x1115) ver. 1.0
sanvean% obexapp -c -a 00:04:3e:80:45:d1 -C OPUSH
obex> getdefault
getdefault: local file> defcard.txt
Success, response: OK, Success (0x20)
obex> put
put: local file> defcard.txt
put: remote file> defcard.txt
Success, response: OK, Success (0x20)
obex> di
Success, response: OK, Success (0x20)
sanvean% obexapp -c -a 00:04:3e:80:45:d1 -C FTRN
Could not connect to the remote OBEX server. Response: Unknown response (0x53). Service: None
--------------------------------DUMP OF UNSUCCESSFULL FTRN SESSION---------------------------------------
HCIDump - HCI packet analyzer ver 1.5
device: any snap_len: 65535 filter: 0xffffffff
< HCI Command: Create Connection(0x01|0x0005) plen 13
D1 45 80 3E 04 00 18 CC 00 00 00 00 01
> HCI Event: Command Status(0x0f) plen 4
00 01 05 04
> HCI Event: Connect Complete(0x03) plen 11
00 04 00 D1 45 80 3E 04 00 01 00
< HCI Command: Write Link Policy Settings(0x02|0x000d) plen 4
04 00 0F 00
< ACL data: handle 0x0004 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 1 scid 0x0089
> HCI Event: Command Complete(0x0e) plen 6
01 0D 08 00 04 00
> HCI Event: Number of Completed Packets(0x13) plen 5
01 04 00 01 00
> HCI Event: Max Slots Change(0x1b) plen 3
04 00 05
> ACL data: handle 0x0004 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0089 result 0 status 0
< ACL data: handle 0x0004 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0040 flags 0x0000 clen 0
> ACL data: handle 0x0004 flags 0x02 dlen 20
L2CAP(s): Config req: dcid 0x0089 flags 0x0000 clen 8
MTU 512 FlushTO 65535
< ACL data: handle 0x0004 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0040 flags 0x0000 result 0 clen 0
> HCI Event: Number of Completed Packets(0x13) plen 5
01 04 00 01 00
> HCI Event: Number of Completed Packets(0x13) plen 5
01 04 00 01 00
> ACL data: handle 0x0004 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0089 flags 0x0000 result 0 clen 0
< ACL data: handle 0x0004 flags 0x02 dlen 26
L2CAP(d): cid 0x40 len 22 [psm 1]
SDP SSA Req: tid 0x0 len 0x11
pat uuid-16 0x1106 (OBEXObjTrnsf)
max 0xffff
aid(s) 0x0004 - 0x0004
cont 00
> HCI Event: Number of Completed Packets(0x13) plen 5
01 04 00 01 00
> ACL data: handle 0x0004 flags 0x02 dlen 39
L2CAP(d): cid 0x89 len 35 [psm 1]
SDP SSA Rsp: tid 0x0 len 0x1e
cnt 0x1b
srv rec #0
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) > <
uuid-16 0x0003 (RFCOMM) uint 0x3 > <
uuid-16 0x0008 (OBEX) > >
cont 00
< ACL data: handle 0x0004 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x0040 scid 0x0089
< ACL data: handle 0x0004 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 3 scid 0x008a
> HCI Event: Number of Completed Packets(0x13) plen 5
01 04 00 01 00
> HCI Event: Number of Completed Packets(0x13) plen 5
01 04 00 01 00
> ACL data: handle 0x0004 flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0089
> ACL data: handle 0x0004 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0041 scid 0x008a result 0 status 0
< ACL data: handle 0x0004 flags 0x02 dlen 16
L2CAP(s): Config req: dcid 0x0041 flags 0x0000 clen 4
MTU 132
> ACL data: handle 0x0004 flags 0x02 dlen 16
L2CAP(s): Config req: dcid 0x008a flags 0x0000 clen 4
MTU 1691
< ACL data: handle 0x0004 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0041 flags 0x0000 result 0 clen 0
> HCI Event: Number of Completed Packets(0x13) plen 5
01 04 00 01 00
> HCI Event: Number of Completed Packets(0x13) plen 5
01 04 00 01 00
> ACL data: handle 0x0004 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x008a flags 0x0000 result 0 clen 0
< ACL data: handle 0x0004 flags 0x02 dlen 8
L2CAP(d): cid 0x41 len 4 [psm 3]
RFCOMM(s): SABM: cr 1 dlci 0 pf 1 ilen 0 fcs 0x1c
> HCI Event: Number of Completed Packets(0x13) plen 5
01 04 00 01 00
> ACL data: handle 0x0004 flags 0x02 dlen 8
L2CAP(d): cid 0x8a len 4 [psm 3]
RFCOMM(s): UA: cr 1 dlci 0 pf 1 ilen 0 fcs 0xd7
< ACL data: handle 0x0004 flags 0x02 dlen 18
L2CAP(d): cid 0x41 len 14 [psm 3]
RFCOMM(s): PN CMD: cr 1 dlci 0 pf 0 ilen 10 fcs 0x70 mcc_len 8
dlci 6 frame_type 0 credit_flow 15 pri 7 ack_timer 0 frame_size 127 max_retrans 0 credits 7
> HCI Event: Number of Completed Packets(0x13) plen 5
01 04 00 01 00
> ACL data: handle 0x0004 flags 0x02 dlen 18
L2CAP(d): cid 0x8a len 14 [psm 3]
RFCOMM(s): PN RSP: cr 0 dlci 0 pf 0 ilen 10 fcs 0xaa mcc_len 8
dlci 6 frame_type 0 credit_flow 14 pri 0 ack_timer 0 frame_size 127 max_retrans 0 credits 7
< ACL data: handle 0x0004 flags 0x02 dlen 8
L2CAP(d): cid 0x41 len 4 [psm 3]
RFCOMM(s): SABM: cr 1 dlci 6 pf 1 ilen 0 fcs 0xd3
> HCI Event: Number of Completed Packets(0x13) plen 5
01 04 00 01 00
> ACL data: handle 0x0004 flags 0x02 dlen 8
L2CAP(d): cid 0x8a len 4 [psm 3]
RFCOMM(s): UA: cr 1 dlci 6 pf 1 ilen 0 fcs 0x18
< ACL data: handle 0x0004 flags 0x02 dlen 12
L2CAP(d): cid 0x41 len 8 [psm 3]
RFCOMM(s): MSC CMD: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
dlci 6 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
< ACL data: handle 0x0004 flags 0x02 dlen 15
L2CAP(d): cid 0x41 len 11 [psm 3]
RFCOMM(d): UIH: cr 1 dlci 6 pf 0 ilen 7 fcs 0x8f
80 00 07 11 00 04 00
> HCI Event: Number of Completed Packets(0x13) plen 5
01 04 00 01 00
> HCI Event: Number of Completed Packets(0x13) plen 5
01 04 00 01 00
> ACL data: handle 0x0004 flags 0x02 dlen 12
L2CAP(d): cid 0x8a len 8 [psm 3]
RFCOMM(s): MSC RSP: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
dlci 6 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
> ACL data: handle 0x0004 flags 0x02 dlen 12
L2CAP(d): cid 0x8a len 8 [psm 3]
RFCOMM(s): MSC CMD: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
dlci 6 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
< ACL data: handle 0x0004 flags 0x02 dlen 12
L2CAP(d): cid 0x41 len 8 [psm 3]
RFCOMM(s): MSC RSP: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
dlci 6 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
> ACL data: handle 0x0004 flags 0x02 dlen 9
L2CAP(d): cid 0x8a len 5 [psm 3]
RFCOMM(d): UIH: cr 0 dlci 6 pf 1 ilen 0 fcs 0x49 credits 38
> ACL data: handle 0x0004 flags 0x02 dlen 15
L2CAP(d): cid 0x8a len 11 [psm 3]
RFCOMM(d): UIH: cr 0 dlci 6 pf 0 ilen 7 fcs 0x55
D3 00 07 10 00 00 00
< ACL data: handle 0x0004 flags 0x02 dlen 9
L2CAP(d): cid 0x41 len 5 [psm 3]
RFCOMM(d): UIH: cr 1 dlci 6 pf 1 ilen 0 fcs 0x93 credits 34
< ACL data: handle 0x0004 flags 0x02 dlen 8
L2CAP(d): cid 0x41 len 4 [psm 3]
RFCOMM(s): DISC: cr 1 dlci 6 pf 1 ilen 0 fcs 0x32
> HCI Event: Number of Completed Packets(0x13) plen 5
01 04 00 01 00
> HCI Event: Number of Completed Packets(0x13) plen 5
01 04 00 01 00
> HCI Event: Number of Completed Packets(0x13) plen 5
01 04 00 01 00
> ACL data: handle 0x0004 flags 0x02 dlen 8
L2CAP(d): cid 0x8a len 4 [psm 3]
RFCOMM(s): UA: cr 1 dlci 6 pf 1 ilen 0 fcs 0x18
< ACL data: handle 0x0004 flags 0x02 dlen 8
L2CAP(d): cid 0x41 len 4 [psm 3]
RFCOMM(s): DISC: cr 1 dlci 0 pf 1 ilen 0 fcs 0xfd
> HCI Event: Number of Completed Packets(0x13) plen 5
01 04 00 01 00
> ACL data: handle 0x0004 flags 0x02 dlen 8
L2CAP(d): cid 0x8a len 4 [psm 3]
RFCOMM(s): UA: cr 1 dlci 0 pf 1 ilen 0 fcs 0xd7
< ACL data: handle 0x0004 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x0041 scid 0x008a
> HCI Event: Number of Completed Packets(0x13) plen 5
01 04 00 01 00
> ACL data: handle 0x0004 flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x008a
> HCI Event: Disconn Complete(0x05) plen 4
00 04 00 13
--------------------------------DUMP OF UNSUCCESSFULL FTRN SESSION---------------------------------------
Also I have tried to connect to my Motorola v600 phone, but without success. I can successfully upload files to it using OPUSH,
but cannot download files. For any my action (using OPUSH and FTRN) I receive Forbidden(0x43) response. Maybe the cause is Motorola's
implementation of those protocols? Or some kind of security on the phone? In nearest future I will try to use my phone as GPRS modem.
of OPUSH?
Bye!
Denis
More information about the freebsd-bluetooth
mailing list