android中socket的另一面是什么?

时间:2014-02-19 04:35:49

标签: android sockets bluetooth linux-kernel asyncsocket

我正在将GB设备移植到ICS,并且遇到蓝牙问题。

当本机方法 - connectNative尝试连接创建的侦听音频流的套接字时,会出现问题。

套接字是在文件

中创建的
  

android_bluetooth_BluetoothSocket.cpp

使用

socket(PF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_SCO)

但是当调用connectNative函数时,它会抛出错误 - 93 - 不支持协议。

The exception reported in the framework is as follows:
Bluetooth HS/HF: BEFORE mOutgoingSco.connect()
BluetoothSocket.cpp: --> INSIDE connectNative IN android_bluetooth_BluetoothSocket.cpp
BluetoothSocket.cpp: connectNative
BluetoothSocket.cpp: --> TYPE_SCO_WBS | TYPE_SCO
BluetoothSocket.cpp: ...connect(161, SCO) = 93 (errno 93)
BluetoothSocket.cpp: --> INSIDE connectNative ABOUT TO THROW jniThrowIOException(env, errno);
Bluetooth HS/HF: BluetoothSocket could not connect
Bluetooth HS/HF: IOException - Printing StackTrace
System.err: java.io.IOException: Protocol not supported
System.err:     at android.bluetooth.BluetoothSocket.connectNative(Native Method)
System.err:     at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:233)
System.err:     at com.android.phone.BluetoothHandsfree$ScoSocketConnectThread.run(BluetoothHandsfree.java:476)

从哪个部分的android代码中读取套接字并写入?

0 个答案:

没有答案