Examples of HCIException


Examples of org.javabluetooth.stack.hci.HCIException

     * @param psm
     * @return
     */
    public void connectL2CAPChannel(L2CAPChannel channel, short psm) throws HCIException {
        try { send_L2CAP_Connection_Request(channel, psm); }
        catch (IOException e) { throw new HCIException("L2CAPChannel Connection Request Failed."); }
        int timeout = 0;
        while (channel.channelState != L2CAPChannel.OPEN) {
            try {
                Thread.sleep(1000);
                timeout++;
            }
            catch (InterruptedException e) { }
            if (timeout > 50) throw new HCIException("L2CAPChannel Connection Request timed out.");
        }
    }
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.