GithubHelp home page GithubHelp logo

bluetooth's People

Contributors

luopeiqin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bluetooth's Issues

关于收发数据的问题

作者你好,请问一下我如果只使用readme中提到的"方式二:原始数据收发"的话还需要实现Protocol相关的东西吗?我现在只OnBluetoothTransmitListener的话在收到数据的时候会报错如下:
java.lang.NullPointerException: Attempt to invoke virtual method 'com.stag.bluetooth.protocol.ParseResult com.stag.bluetooth.protocol.Protocol.parse(byte[])' on a null object reference
at com.stag.bluetooth.BluetoothTransfer$2.run(BluetoothTransfer.java:158)
我只想接收原始数据的情况下应该如何处理呢,请作者帮忙谢谢。

运行时 偶尔会报错

E/AndroidRuntime: FATAL EXCEPTION: Thread-14
Process: com.zdyb.app, PID: 3465
java.nio.BufferOverflowException
at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:164)
at java.nio.ByteBuffer.put(ByteBuffer.java:732)
at com.stag.bluetooth.BluetoothTransfer.addRecvData(BluetoothTransfer.java:274)
at com.stag.bluetooth.helper.BluetoothHelper.recv(BluetoothHelper.java:62)
at com.stag.bluetooth.helper.TraditionHelper$2.run(TraditionHelper.java:126)
at java.lang.Thread.run(Thread.java:930)
E/AndroidRuntime: --->onUncaughtExceptionHappened:Thread[Thread-14,5,main]<---
java.nio.BufferOverflowException
at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:164)
at java.nio.ByteBuffer.put(ByteBuffer.java:732)
at com.stag.bluetooth.BluetoothTransfer.addRecvData(BluetoothTransfer.java:274)
at com.stag.bluetooth.helper.BluetoothHelper.recv(BluetoothHelper.java:62)
at com.stag.bluetooth.helper.TraditionHelper$2.run(TraditionHelper.java:126)
at java.lang.Thread.run(Thread.java:930)

支持分包处理数据?

我用你的demo就没连接成功过设备

有些设备直接就连接不上

有些设备报错了
2021-07-14 14:16:58.085 8128-8745/com.luo.bluetooth W/System.err: java.lang.InterruptedException
2021-07-14 14:16:58.085 8128-8745/com.luo.bluetooth W/System.err: at java.lang.Thread.sleep(Native Method)
2021-07-14 14:16:58.085 8128-8745/com.luo.bluetooth W/System.err: at java.lang.Thread.sleep(Thread.java:386)
2021-07-14 14:16:58.085 8128-8745/com.luo.bluetooth W/System.err: at java.lang.Thread.sleep(Thread.java:327)
2021-07-14 14:16:58.086 8128-8745/com.luo.bluetooth W/System.err: at com.stag.bluetooth.helper.BleHelper$3.run(BleHelper.java:174)
2021-07-14 14:16:58.086 8128-8745/com.luo.bluetooth D/LPQ: timeout:true isResumeTimeoutCount:false
2021-07-14 14:16:58.089 8128-8178/com.luo.bluetooth D/BluetoothGatt: close()
2021-07-14 14:16:58.089 8128-8178/com.luo.bluetooth D/BluetoothGatt: unregisterApp() - mClientIf=7
2021-07-14 14:16:58.093 8128-8128/com.luo.bluetooth D/MainActivitylpq: onBluetoothConnect: 蓝牙连接结果:false
2021-07-14 14:16:59.137 8128-8128/com.luo.bluetooth D/LPQ: discontect from broadca

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.