CONNECT

Name

CONNECT -- Connected to other device

Synopsis

This is not a command.

Description

CONNECT is not a command, but rather a reply broadcast to you when CALL successfully establishes the connection. Remember to check that the link_id matches your CALL.

On RFCOMM/L2CAP connections, there is an additional parameter called port. Port refers to the TCP socket port number, which is used to send and receive data to and from the remote device. Connect to the port just like you connected to the iWRAP server. The connection is "raw", which means that no processing of incoming or outgoing data is made.

Note: In the case of L2CAP connections, the data is handled as packets. Therefore, both the incoming and outgoing data must follow the "HDR+L2CAPDATA" format, where HDR is two bytes; first the low byte, and then the high byte of the L2CAPDATA packet length. L2CAPDATA contains the actual L2CAP packet.

Reply

CONNECT link_id SDP
CONNECT link_id RFCOMM port
CONNECT link_id L2CAP port
CONNECT link_id PPP
CONNECT link_id FORK
CONNECT link_id PAN-PANU
CONNECT link_id PAN-GN
CONNECT link_id PAN-NAP
        

Example


          READY.
          CALL 00:07:80:80:bf:01 SDP
          CALL 0
          RINGING 0
          CONNECT 0 SDP
          CALL 00:07:80:80:bf:01 LAN PPP
          CALL 1
          RINGING 1
          CONNECT 1 PPP
          CALL 00:07:80:80:bf:01 1 RFCOMM
          CALL 2
          RINGING 2
          CONNECT 2 RFCOMM 1042
          <Client can open socket connection to port 1042>
          CALL 00:07:80:80:bf:01 2 FORK /bin/login
          CALL 3
          RINGING 3
          CONNECT 3 FORK
          CALL 00:07:80:80:bf:01 PAN-NAP
          CALL 5
          RINGING 5
          CONNECT 5 PAN-NAP
          CALL 00:07:80:80:bf:02 PAN-NAP PAN-NAP
          CALL 6
          RINGING 6
          CONNECT 6 PAN-NAP