Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MainActivity中执行connectAndWrite()方法出现“java.lang.Exception: Cannot connect device with error status: 133” #2

Open
duzhigang opened this issue Sep 24, 2019 · 0 comments

Comments

@duzhigang
Copy link

将你这个项目的代码clone下来后,然后编译运行,可以扫描发现,但是“点击“WRITE DATA”按钮时,出现以下错误:
2019-09-24 13:57:39.245 2029-2029/com.billin.www.rxble D/ViewRootImpl@cfba1a[MainActivity]: ViewPostIme pointer 0
2019-09-24 13:57:39.372 2029-2029/com.billin.www.rxble D/ViewRootImpl@cfba1a[MainActivity]: ViewPostIme pointer 1
2019-09-24 13:57:39.380 2029-2029/com.billin.www.rxble D/MainActivity: connect test onSubscribe:
2019-09-24 13:57:39.386 2029-2121/com.billin.www.rxble D/BluetoothLe: connect: in thread Thread[bluetooth worker,5,main]
2019-09-24 13:57:39.386 2029-2121/com.billin.www.rxble D/BluetoothLe: Trying to create a new connection.
2019-09-24 13:57:39.397 2029-2121/com.billin.www.rxble D/BluetoothGatt: connect() - device: 00:42:79:CA:17:86, auto: false
2019-09-24 13:57:39.397 2029-2121/com.billin.www.rxble D/BluetoothAdapter: isSecureModeEnabled
2019-09-24 13:57:39.399 2029-2121/com.billin.www.rxble D/BluetoothGatt: registerApp()
2019-09-24 13:57:39.400 2029-2121/com.billin.www.rxble D/BluetoothGatt: registerApp() - UUID=d2abe0d2-ac29-435e-a27c-6d318a2d26f7
2019-09-24 13:57:39.408 2029-2053/com.billin.www.rxble D/BluetoothGatt: onClientRegistered() - status=0 clientIf=6
2019-09-24 13:57:39.610 2029-2053/com.billin.www.rxble D/BluetoothGatt: onClientConnectionState() - status=133 clientIf=6 device=00:42:79:CA:17:86
2019-09-24 13:57:39.613 2029-2121/com.billin.www.rxble D/BluetoothLe: onConnectionStateChange: thread Thread[bluetooth worker,5,main] status 0
2019-09-24 13:57:39.614 2029-2121/com.billin.www.rxble D/BluetoothLe: disconnect: in thread Thread[bluetooth worker,5,main]
2019-09-24 13:57:39.614 2029-2121/com.billin.www.rxble D/BluetoothGatt: cancelOpen() - device: 00:42:79:CA:17:86
2019-09-24 13:57:39.620 2029-2121/com.billin.www.rxble D/BluetoothLe: close: in thread Thread[bluetooth worker,5,main]
2019-09-24 13:57:39.620 2029-2121/com.billin.www.rxble D/BluetoothGatt: close()
2019-09-24 13:57:39.621 2029-2121/com.billin.www.rxble D/BluetoothGatt: unregisterApp() - mClientIf=6
2019-09-24 13:57:39.624 2029-2121/com.billin.www.rxble E/BluetoothLe: Cannot connect device with error status: 133
2019-09-24 13:57:39.625 2029-2121/com.billin.www.rxble E/MainActivity: connect test onError:
java.lang.Exception: Cannot connect device with error status: 133
at com.billin.www.rxble.ble.BluetoothClientBLEV2Adapter$2$2.onError(BluetoothClientBLEV2Adapter.java:151)
at com.billin.www.rxble.ble.originV2.BluetoothLeConnector$1$1.run(BluetoothLeConnector.java:151)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.os.HandlerThread.run(HandlerThread.java:65)
2019-09-24 13:57:47.886 2029-2029/com.billin.www.rxble D/ViewRootImpl@cfba1a[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 0
2019-09-24 13:57:47.930 2029-2156/com.billin.www.rxble D/OpenGLRenderer: eglDestroySurface = 0x738b1a5940
2019-09-24 13:57:47.943 2029-2029/com.billin.www.rxble D/ViewRootImpl@cfba1a[MainActivity]: Relayout returned: old=[0,0][1080,1920] new=[0,0][1080,1920] result=0x5 surface={valid=false 0} changed=true
2019-09-24 13:57:48.011 2029-2029/com.billin.www.rxble D/ViewRootImpl@cfba1a[MainActivity]: Relayout returned: old=[0,0][1080,1920] new=[0,0][1080,1920] result=0x1 surface={valid=false 0} changed=false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant