Skip to contentSkip to conversation

RFCOMM between PCs returns DM

Bluez-users Andrew William 1 participant 1 message Apr 1, 2008 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hi,

I have compiled and installed bluez-utils-3.25 on myPC and a custom board based on ARM.I can connect to a mobile phoneusing 'rfcomm connect' from the board and PC.But when I try to connectthe PC to the board or from the board to the PC,the connect-rfcommsocket call fails with connection refused( ECONNREFUSED).Passkey agentsare running on both sides.

hcidump shows that SABM ,UA ,PNCMD,frames are exchanged.But after PN CMD the initiator gets a DM frameback instead of PN RSP .So the disconnection.The hcidump is

HCI sniffer - Bluetooth packet analyzer ver 1.40
device: hci0 snap_len: 1028 filter: 0xffffffff < HCI Command: Create Connection (0x01|0x0005) plen 13

Quoted 2 lines

HCI Event: Command Status (0x0f) plen 4
HCI Event: Connect Complete (0x03) plen 11

< ACL data: handle 1 flags 0x02 dlen 12

    L2CAP(s): Connect req: psm 3 scid 0x0040

< HCI Command: Write Link Policy Settings (0x02|0x000d) plen 4

Quoted 4 lines

HCI Event: Command Complete (0x0e) plen 6
HCI Event: Max Slots Change (0x1b) plen 3
HCI Event: Number of Completed Packets (0x13) plen 5 HCI Event: Connection Packet Type Changed (0x1d) plen 5

< HCI Command: Remote Name Request (0x01|0x0019) plen 10

Quoted 1 line

ACL data: handle 1 flags 0x02 dlen 16

    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
      Connection successful
Quoted 1 line

HCI Event: Command Status (0x0f) plen 4

< ACL data: handle 1 flags 0x02 dlen 16

    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 1013
Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 1 flags 0x02 dlen 18

    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4
      Success
      MTU 1013
Quoted 2 lines

HCI Event: Remote Name Req Complete (0x07) plen 255 ACL data: handle 1 flags 0x02 dlen 16

    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 1013
< ACL data: handle 1 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
      Success
< ACL data: handle 1 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): SABM: cr 1 dlci 0 pf 1 ilen 0 fcs 0x1c
Quoted 3 lines

HCI Event: Number of Completed Packets (0x13) plen 5 HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 1 flags 0x02 dlen 8

    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): UA: cr 1 dlci 0 pf 1 ilen 0 fcs 0xd7

< ACL data: handle 1 flags 0x02 dlen 18
L2CAP(d): cid 0x0040 len 14 [psm 3]
RFCOMM(s): PN CMD: cr 1 dlci 0 pf 0 ilen 10 fcs 0x70 mcc_len 8 dlci 20 frame_type 0 credit_flow 15 pri 7 ack_timer 0 frame_size 1008 max_retrans 0 credits 7

Quoted 2 lines

HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 1 flags 0x02 dlen 8

    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): DM: cr 1 dlci 20 pf 1 ilen 0 fcs 0xd7
< ACL data: handle 1 flags 0x02 dlen 8
    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): DISC: cr 1 dlci 0 pf 1 ilen 0 fcs 0xfd
< ACL data: handle 1 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0040 scid 0x0040
Quoted 3 lines

HCI Event: Number of Completed Packets (0x13) plen 5 HCI Event: Number of Completed Packets (0x13) plen 5 ACL data: handle 1 flags 0x02 dlen 8

    L2CAP(d): cid 0x0040 len 4 [psm 3]
      RFCOMM(s): UA: cr 1 dlci 0 pf 1 ilen 0 fcs 0xd7
Quoted 1 line

ACL data: handle 1 flags 0x02 dlen 12

    L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0040

< HCI Command: Disconnect (0x01|0x0006) plen 3

Quoted 2 lines

HCI Event: Command Status (0x0f) plen 4
HCI Event: Disconn Complete (0x05) plen 4

What could be the problem here?

Thank you for your time,
Regards,
Andrew.

Explore your hobbies and interests. Go to http://in.promos.yahoo.com/groups

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users