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
Error when start acquisition mode #4
Comments
Hi @VadymKuriy, Are you using the API's sample app? You can only send a command to the API after receiving the device's description. For example in the sample-app module of this repository under src/java/info.plux.pluxapi.sampleapp in the DeviceActivity Class, after line 249 you have an example of an implementation that catches the description intent:
It only is secure to start an acquisition and perform any other commands once you received this description. If the problem still persists, please let me know. Best regards, |
So when I have this exception I need to start once more?
Because now I use only one device. |
Hi @VadymKuriy, when you select the device in the Scan Activity, a new activity is started, the Device Activity, once in this activity you need to click on the Connect button, as the description will be show in the TextView available bellow the buttons in the view. After this you can start your acquisition. The way to go is to uncomment the lines that are commented in the section of code that I added in my previous comment. Best regards, |
Hi @GTelo
Than when status is connected I use
And also have receiver
But I recieved only 3 BITalinoFrame's and than device disconect.
Thx, |
The start should be only called after you receive the BITalino's description:
This behaviour is used as a a check of the device's firmware version and only after that you can give commands. For this reason, you should only give the start command after that. |
I have the same problem. Device after acquisition mode return 3 data frames and disconect. Log's are the same. 05-02 14:37:26.801 -> ACQUISITION_OK |
Which BITalino version are you using? |
@GTelo 3.3. |
The problem is fixed. If you update your local project it will work fine. Thank you for your feedback. Best regards, |
@GTelo Thx. Everything works!!! |
Hello, when I do bitalino.start(new int[]{2}, 100) (status is connected) always have in BTHCommunication this exception:
java.io.IOException: bt socket closed, read return: -1
at android.bluetooth.BluetoothSocket.read(BluetoothSocket.java:733)
at android.bluetooth.BluetoothInputStream.read(BluetoothInputStream.java:96)
at java.io.InputStream.read(InputStream.java:162)
at info.plux.pluxapi.bitalino.bth.BTHCommunication$ConnectedThread.run(BTHCommunication.java:727)
Thx.
The text was updated successfully, but these errors were encountered: