Comments (17)
Did you have error log from LogCat of this problem?
from bluetoothspplibrary.
bt.setOnDataReceivedListener(new OnDataReceivedListener() {
public void onDataReceived(byte[] data, String message) {
//Toast.makeText(MainActivity.this, message, Toast.LENGTH_SHORT).show();
byte[] readBuf = (byte[]) data;
try
{
valore_a_16 = ((readBuf[1] & 0xFF) << 8) | (readBuf[0] & 0xFF);
a++;
}
catch(IndexOutOfBoundsException ioob){
ioob.printStackTrace();
}
String str = String.valueOf(a);
// Log.d("byte", str);
text.setText(str);
}
});
I solved in this way, but I do not understand why I do not get all the data that my tool sends the bluetooth. My tool transfers data every 1-2ms. The library is not so fast in transferring the data?
from bluetoothspplibrary.
Hai did you use the bluetooth terminal in getting the data ??????
from bluetoothspplibrary.
yes, why?
from bluetoothspplibrary.
Im working on, a bluetooth mobile to get a data from a receiver.
I also uses Bluetooth Terminal.
But it seems I cant get the data after I send a command..
This is the command..
GetTruckInfo xx.xx.xx
and I expect some result.
But I don’t get it.
Can you help?
Besst Regards,
Mae
From: davix10
Sent: Wednesday, November 19, 2014 1:03 AM
To: akexorcist/Android-BluetoothSPPLibrary
Cc: Cherrie Mae Dinoy
Subject: Re: [Android-BluetoothSPPLibrary] Data received error (#2)
yes, why?
—
Reply to this email directly or view it on GitHub.
from bluetoothspplibrary.
What do not you understand?
from bluetoothspplibrary.
I am a newbie in bluetooth android.
I build a program using eclipse.
and I want to read and write a data to a bluetooth device.
Do you know how i can do that?
I already achieve the pairing and scanning the devices,\
But sending a commands and getting the data in a bluetooth devices doesnt work.
Do you know how i can do that??
from bluetoothspplibrary.
I want to ask some question for sure. Did your device communicate with Bluetooth Serial Port Profile? Because I never seen any bluetooth device which using XML Format on Serial Port Profile. May it using another bluetooth protocol?
from bluetoothspplibrary.
Hello akexocist,
I had my weekends and never able to checked my mail. Sorry for the late reply,.
Yes, my device communicate via bluetooth serial port profile. I tried to download your bluetooth terminal and it was connected . I even
tried it to any SPP application.(Bluetooth chat, blueterm ) I was connected but my problem is. he is not accepting my commands.
Or I don’t even get any responds. Yes it is connected. but when I try to send any “String” I don’t get any respond.
if it is using another bluetooth protocol?
How is that??
From: Akexorcist
Sent: Saturday, November 22, 2014 6:24 AM
To: akexorcist/Android-BluetoothSPPLibrary
Cc: Cherrie Mae Dinoy
Subject: Re: [Android-BluetoothSPPLibrary] Data received error (#2)
I want to ask some question for sure. Did your device communicate with Bluetooth Serial Port Profile? Because I never seen any bluetooth device which using XML Format on Serial Port Profile. May it using another bluetooth protocol?
—
Reply to this email directly or view it on GitHub.
from bluetoothspplibrary.
Try to check on your device datasheet that really Serial Port Profile? I think your device is work on Bluetooth 4.0 Low Energy. If yes, that's not Serial Port Profile. but it's worked on Bluetooth Low Energy Protocol.
from bluetoothspplibrary.
Hello Akexorcit,
http://teholabs.com/docs/bluescripts:overview, Ive seen an example. This one sends XML Format commands, That was a BluetoothScript.
But the scripts really differs,
He has this script:
<script>
Script Name
some ASCII message
<action>...</action>
</script>
<script>...</script>
...
but my script is so different
GetReceiverParameters
05.1A.8C
I wonder if this are de same,
From: Akexorcist
Sent: Sunday, November 23, 2014 10:36 PM
To: akexorcist/Android-BluetoothSPPLibrary
Cc: Cherrie Mae Dinoy
Subject: Re: [Android-BluetoothSPPLibrary] Data received error (#2)
Try to check on your device datasheet that really Serial Port Profile? I think your device is work on Bluetooth 4.0 Low Energy. If yes, that's not Serial Port Profile. but it's worked on Bluetooth Low Energy Protocol.
—
Reply to this email directly or view it on GitHub.
from bluetoothspplibrary.
Oh! Bluetooth Script, I never heard that before. So you need to built xml script file and sent to your target device.
from bluetoothspplibrary.
But sir I still have problem. In his script he has standard format. This one:
<script> Say Hello 00:11:22:33:44:55 Hello SSP Radio </script> but my command is like this: GetReceiverParameters 05.1A.8CIve tired my command but its not working..
From: Akexorcist
Sent: Sunday, November 23, 2014 11:21 PM
To: akexorcist/Android-BluetoothSPPLibrary
Cc: Cherrie Mae Dinoy
Subject: Re: [Android-BluetoothSPPLibrary] Data received error (#2)
Oh! Bluetooth Script, I never heard that before. So you need to built xml script file and sent to your target device.
—
Reply to this email directly or view it on GitHub.
from bluetoothspplibrary.
Don't worry about data format. It's depending on target device. Just try it.
from bluetoothspplibrary.
Okay I will try . I will follow the XML Command that my device accepts.
Thanks akexorcist.
Best Regards,
Mae
From: Akexorcist
Sent: Monday, November 24, 2014 9:21 AM
To: akexorcist/Android-BluetoothSPPLibrary
Cc: Cherrie Mae Dinoy
Subject: Re: [Android-BluetoothSPPLibrary] Data received error (#2)
Don't worry about data format. It's depending on target device. Just try it.
—
Reply to this email directly or view it on GitHub.
from bluetoothspplibrary.
its not working. Now I find it really imposible to send the XML command using mobile.
Am I correct bluetooth only accepts “AT Commands”?
because I notice , that commads was sent using terminal in a loptop
or I guess that was a Putty Configuration. They use to send the command den they get some result.
Is it posible to android to work like putty / SSH terminal using my phone?
From: Akexorcist
Sent: Monday, November 24, 2014 9:21 AM
To: akexorcist/Android-BluetoothSPPLibrary
Cc: Cherrie Mae Dinoy
Subject: Re: [Android-BluetoothSPPLibrary] Data received error (#2)
Don't worry about data format. It's depending on target device. Just try it.
—
Reply to this email directly or view it on GitHub.
from bluetoothspplibrary.
Using Android-BluetoothSPPLibrary, that's the biggest mistake we made. ;-)
from bluetoothspplibrary.
Related Issues (20)
- 이 블루투스 라이브러리를 사용하려는 한국인들을 위해 HOT 1
- transfer intent
- take multiple masseges on recived data
- Bt
- Context HOT 1
- NullPointerException at app.akexorcist.bluetotohspp.library.BluetoothService$AcceptThread.run (BluetoothService.java:2)
- Not scanning or discoverying nearby bluetooth devices. (startActivityForResult) HOT 2
- Prematurely terminating data packets with byte values of 10 (LF) and 13 (CR) HOT 2
- Can't read data from a BT barcode reader
- Activity crashed A/libc: Fatal signal 11 (SIGSEGV), code 1 HOT 1
- thank u
- getBluetoothService() called with no BluetoothManagerCallback HOT 1
- targetSdkVersion < 4
- the package name is spelled incorrectly...
- ConnectThread NullPointerException when the BT has been manually disabled
- How to make own Reciver
- bt.setupService()
- Fixing send function HOT 1
- How do you solve the issue of broken packets/messages? HOT 1
- Question: Will this library give me serial port in PC when my android device connected to PC using BT?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bluetoothspplibrary.