⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bluetoothserver.java

📁 蓝牙协议栈可是要钱的喔
💻 JAVA
字号:
/*
*  (c) Copyright 2003 Christian Lorenz  ALL RIGHTS RESERVED.
* 
* This file is part of the JavaBluetooth Stack.
* 
* The JavaBluetooth Stack is free software; you can redistribute it 
* and/or modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
* 
* The JavaBluetooth Stack is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
* 
*/


package org.javabluetooth.demo;

import org.javabluetooth.distributed.BluetoothTCPServer;
import org.javabluetooth.stack.hci.HCIDriver;
import org.javabluetooth.stack.hci.UARTTransport;

/** @author Christian Lorenz */
public class BluetoothServer {
    public static final void main(String[] args) throws Exception {
        HCIDriver.init(new UARTTransport("serial0"));
        HCIDriver hciDriver = HCIDriver.getHCIDriver();
        hciDriver.send_HCI_HC_Reset();
        //SDPServer sddb = SDPServer.getSDPServer();	
        //byte[] dummyHandle={(byte) 0x00,(byte) 0x01,(byte)0x00,(byte)0x00};
        //UUID browseUUID=new UUID(0x1002);
        //UUID socketUUID=new UUID(0x1101);
        //sddb.registerServiceHandle(browseUUID,dummyHandle);
        //sddb.registerServiceHandle(socketUUID,dummyHandle);
        BluetoothTCPServer server = new BluetoothTCPServer(2600);
        while (true) { Thread.sleep(10000); }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -