-
Notifications
You must be signed in to change notification settings - Fork 574
Not able to receive #8
Comments
I have just found the cause of my problem: the sender was not finishing the transfer with a CR (newline)... so somehow the local (android's) bluetooth had the info, but did not delivered it to the upper layers. Do you know where this limitation come from? Is it Android's limitation or is it the BluetoothSPP library? If it's the second, can this be parametrized/tuned? For example, on the Arduino side I look for a 0x00 character, but if it does not arrive it returns whatever is in the buffer after 0.1s without receiving data. I guess the biggest problem is quite the opposite: what happens if I want to send a \n (CR) in the middle of the message, does it force a split in two different messages? The second does not probably have a nice solution, but first one does. Thanks! |
Hello naevtamarkus. Have you fixed the problem? Because I happened to meet the same problem with you.... Should I just send CR to the other device? |
No, the problem is not fixed AFAIK... but this has been clearly understood on Issue #13 |
Thanks! |
I had a fix for this problem. Please read my comment on: |
hi lazy21r, I have done what you have suggest like below
but I am still not getting data, will you please help me what should be problem I am getting below logs in LOGCAT
|
hi @siddhpuraamitr, it's been a while so I don't really remember all the project. please refer to my working source files first. If still no success, you could forward me your source files so i can give you a clue. |
lazy21tr: public void setOnDataReceivedListener (OnDataReceivedListener listener) { |
This worked for me Change this ArrayList arr_byte = new ArrayList(); To Log.e(BluetoothService.TAG, "BEGIN mConnectedThread");
|
Hi,
I am sure I am making something wrong... so this is more a question than an "issue". Anyway, here it goes.
I have an activity with (some code stripped):
The problem is that I am able to send (on the other end I see "blah") but not able to receive. I have tried with both the sample BluetoothChat from googlecode and from my HC-05 device: same with both.
The thing that drives me mad is that I ACTUALLY see the data getting into the device (I enabled Bluetooth Debugging and see the packet with the data in the /sdcard) but the data does not reach my activity.
Is there anything I am doing wrong?
The only strange thing I see in the logcat is:
W/BluetoothAdapter﹕ getBluetoothService() called with no BluetoothManagerCallback
It would actually help if you tell me what's the minimum methods and the right order to call them in order to have I/O working. If I understand correctly (I am not an Android expert) I am doing the following:
I tried shuffling the setupService and startService up and down with the same result.
Thanks!
The text was updated successfully, but these errors were encountered: