Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/gwt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法将BlackBerry手机与Bluetooth SPP设备连接_Blackberry_Bluetooth_Spp - Fatal编程技术网

无法将BlackBerry手机与Bluetooth SPP设备连接

无法将BlackBerry手机与Bluetooth SPP设备连接,blackberry,bluetooth,spp,Blackberry,Bluetooth,Spp,我正在尝试使用以下代码从blackberry 9900手机连接到蓝牙设备 public final class AppMainScreen extends MainScreen { private BluetoothspInfo[] spInfo; private StreamConnection bConn; private DataInputStream diStream; private String text; public AppMainScreen(

我正在尝试使用以下代码从blackberry 9900手机连接到蓝牙设备

public final class AppMainScreen extends MainScreen {
private BluetoothspInfo[] spInfo;
    private StreamConnection bConn;
    private DataInputStream diStream;
    private String text;

    public AppMainScreen() {

        spInfo = BluetoothSerialPort.getSerialPortInfo();

        try {
            bConn = (StreamConnection) Connector.open(
                    spInfo[0].toString(), Connector.READ);
        } catch (IOException e) {
            e.printStackTrace();
        } catch (Exception e) {
            e.printStackTrace();
        }

        UiApplication.getUiApplication().invokeLater(new TextScanner());
    }

    // ...
    // ...
    // ...
}
但是它总是抛出异常
java.io.IOException:无法连接。
我无法获得完整跟踪。 这里有什么问题,有人能给我指一下正确的方向吗。 我正在使用平台版本为4.5的BlackBerry Java on BlackBerry Eclipse插件