Package org.javabluetooth.stack.l2cap

Examples of org.javabluetooth.stack.l2cap.L2CAPLink.connectL2CAPChannel()


    /** @see org.javabluetooth.stack.BluetoothStack#open_L2CAPChannel(long, short) */
    public void connectL2CAPChannel(L2CAPChannel channel, RemoteDevice remoteDevice, short psm) throws HCIException {
        L2CAPLink link = hciTransport.getL2CAPLink(remoteDevice.bdAddrLong, remoteDevice.pageScanRepMode,
            remoteDevice.pageScanMode, remoteDevice.clockOffset);
        link.connectL2CAPChannel(channel, psm);
    }

    /**
     * @see org.javabluetooth.stack.BluetoothStack#openL2CAPService(org.javabluetooth.stack.l2cap.L2CAPChannel, short,
     * short, byte[])
View Full Code Here


        BluetoothTCPChannel l2capChannel = new BluetoothTCPChannel(this, channelHandel);
        if (channels[channelHandel] != null) channels[channelHandel].close();
        channels[channelHandel] = l2capChannel;
        try {
            L2CAPLink link = hciTransport.getL2CAPLink(remoteAddress, pageScanRepMode, pageScanMode, clockOffset);
            link.connectL2CAPChannel(l2capChannel, psm);
        }
        catch (HCIException e) {
            l2capChannel.channelState = L2CAPChannel.FAILED;
            System.err.println("BluetoothTCPServerThread: Failed to Connect L2CAP Channel. " + e);
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.