|
Announcements Members & Reports Project Schedule Meetings Documents Contacts Links |
| RFCOMM: |
| -A RFCOMM Packet sits on top of a Connectionless Data L2CAP packet. |
| -It's contained in the Information payload of the L2CAP Packet. |
| -To identify a RFCOMM packet, we must check the PSM Value of the Connection Request L2CAP Packet (A type of signalling command packet). If the PSM value = 0x0003, then the Connectionless data L2CAP packets that follow are contain RFCOMM packets in their payloads. They will continue to be RFCOMM packets until we receive another Connection Request L2CAP Packet that has a PSM value different than 0x0003. |
| -Now that we know where the RFCOMM packets are, we have to figure out how to parse them. |
| -We can follow the TS 101 369 V6.3.0 to figure that out (page 21 of those specs) and the Bluetooth specs (page 406). |
| -The Address Field doesn't need to be converted to anything. We can just print that out. |
| -The Control field can be parsed according to the table in section 5.2.1.3 of the TS 101 369 V6.3.0. The Length field can be parsed according to the table in section 5.2.1.5 of the TS 101 369 V6.3.0. |
| -The Length indicator field may contain 1 or 2 bytes. To figure that out, we break the first byte into bits. If the first bit (in LSB order) is 0, then the length contains 2 bytes: 1 bit for the actual indicator and the other 14 bits for the actual length of the "Information" field, which follows the length indicator field. If the first bit is 1, then the length contains 1 byte: the first bit is the actual indicator, the other 7 bits are the actual length |
| -The Information field is the payload of an RFCOMM packet |
| -The FCS field is one byte long. We just have to display what that field is, we don't have to parse it |
| -Exactly one (no more, no less) RFCOMM packet can be inside one L2CAP packet |
| -Channel ID stuff: When the iniator device requests a a Connection (Connection Request), it transmits its Source CID. This source CID is to be used by the receiver if it wants to communicate back with the initiator. Next, The receiver responds to the request with ah Connection Response. It contains the Destination CID, which should match the Source CID sent by the initiator, and a "new" Source CID, which is the channel ID of the receiver. This new source CID is to be used by the initiator if it wants to communicate back with the receiver. |
| -After a few more Signalling command L2CAP packets, Connectionless data L2CAP packets are transmitted, wchich contain the RFCOMM Packets |
| -At the end, the initiator will send a Disconnection Request to the receiver. The receiver responds with a Disconnection Response. The trasmission is completed |
| HCI: |
![]() |
| -File reader -read whole line @ a time |
| -Parsinator - sorting in linear operation |