baljeetverma / android-notifier

Automatically exported from code.google.com/p/android-notifier
0 stars 0 forks source link

An error ocurred while recieving bluetooth notification #217

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install Android Software
2. Install PC Software 
3. Send "Send Test Notification" command

What is the expected output? What do you see instead?
Not sure what the expected output is. 
When pressing the "Send Test Notification" command on my phone, my computer 
displays the pop-up error message "An error ocurred while receiving bluetooth 
notification.". No matter what I try, including multiple reboots of both phone 
and computer, re-install both phone and computer software, I either get that 
error message, or nothing at all (no response, and no log entry). 

Looking at the log file (below), it appears that the Android side is not 
registering the proper bluetooth protocol message limits, causing the WinXP 
side to fail the transfer. This only works when pressing the "Send Test 
Notification" command. I get no other notifications doing multiple phone, sms, 
and email tests (everything is selected on both programs). 
Testing not possible with WiFi. 

What version of the product are you using? On what operating system?
Phone: HTC Hero (Sprint)
Phone OS: Android 2.1
android-notifier (phone): 0.2.8

Computer: PC (Dell)
Computer OS: WinXP Pro, SP3
Android Notifier (computer): 0.5.1

Bluetooth Device: Generic USB dongle, reported as "Cambridge Silicon Radio Ltd."

Please provide any additional information below.
Typical error message is: 
2010-10-07 13:18:44,711 ERROR [BluetoothNotificationReceiver] - Error handling 
bluetooth notification
com.notifier.desktop.exception.ParseException: 
com.google.protobuf.InvalidProtocolBufferException: While parsing a protocol 
message, the input ended unexpectedly in the middle of a field.  This could 
mean either than the input has been truncated or that an embedded message 
misreported its own length.
    at com.notifier.desktop.parsing.MultiNotificationParser.parse(MultiNotificationParser.java:53)
    at com.notifier.desktop.parsing.MultiNotificationParser.parse(MultiNotificationParser.java:27)
    at com.notifier.desktop.notification.bluetooth.BluetoothNotificationReceiver$1.run(BluetoothNotificationReceiver.java:87)
    at java.lang.Thread.run(Unknown Source)
Caused by: com.google.protobuf.InvalidProtocolBufferException: While parsing a 
protocol message, the input ended unexpectedly in the middle of a field.  This 
could mean either than the input has been truncated or that an embedded message 
misreported its own length.
    at com.google.protobuf.InvalidProtocolBufferException.truncatedMessage(InvalidProtocolBufferException.java:49)
    at com.google.protobuf.CodedInputStream.refillBuffer(CodedInputStream.java:691)
    at com.google.protobuf.CodedInputStream.readRawByte(CodedInputStream.java:714)
    at com.google.protobuf.CodedInputStream.readRawVarint32(CodedInputStream.java:318)
    at com.notifier.desktop.parsing.MultiNotificationParser.parse(MultiNotificationParser.java:42)
    ... 3 more
2010-10-07 13:18:44,711 DEBUG [bluetooth] - closing RFCOMM Connection 224
2010-10-07 13:18:44,711 DEBUG [bluetooth] - connection closed, open now 0
2010-10-07 13:18:44,711 DEBUG [bluetooth] - socket[224] close
2010-10-07 13:18:44,711 DEBUG [bluetooth] - socket[400] accept

Original issue reported on code.google.com by Meulf...@gmail.com on 7 Oct 2010 at 8:45

GoogleCodeExporter commented 9 years ago
Could you please try this file?
http://dl.dropbox.com/u/1401233/android-notifier-desktop.exe

Copy it to where you installed android notifier in your desktop replacing the 
file that is there. This is the 32-bit version.

Original comment by lehph...@gmail.com on 7 Oct 2010 at 9:31

GoogleCodeExporter commented 9 years ago
I downloaded the file, copied it over the original file (actually, renamed the 
original .exe.old), but with the same result...

Original comment by Meulf...@gmail.com on 7 Oct 2010 at 10:16

GoogleCodeExporter commented 9 years ago
Is it the exact same error? Could you attach your log file in this issue?

Original comment by lehph...@gmail.com on 7 Oct 2010 at 11:07

GoogleCodeExporter commented 9 years ago
Yes, it was the exact same error. 

An update: 
I had my phone plugged into the USB port for charging, and at 2010-10-07 
16:06:16, received a phone call. That call registered an error (identical to 
the one above). I unplugged the phone to answer, and received a valid Battery 
notification (seen at 2010-10-07 16:06:19). 

So after the call, I tried plugging/unplugging the USB several more times, and 
several pings, and received error messages for each.

Please see the attached log. 

Original comment by Meulf...@gmail.com on 7 Oct 2010 at 11:16

Attachments:

GoogleCodeExporter commented 9 years ago
Ok, some HTC devices are not sending the notification content over bluetooth, 
that's why you are seeing these errors, though it works sometimes (you got a 
battery notification just fine).

I changed the code to log a message saying an empty notification was received, 
you should see it instead of these errors with this new exe file: 
http://dl.dropbox.com/u/1401233/android-notifier-desktop.2.exe Please, give it 
a try.

The bluetooth problem is still not resolved, but an android developer said HTC 
is aware of it in issue 3, you may want to star that issue to get emails about 
possible fixes.

Original comment by lehph...@gmail.com on 8 Oct 2010 at 12:44

GoogleCodeExporter commented 9 years ago
I have just tried the version you put in dropbox. Thanks. The error  does show 
up in the logs, but not as a message. Would it be possible to show a message 
saying that a notification of unknown type was received? This would be useful 
for those of us who work with headphones on. At least we would know that the 
phone had *something* to tell us, and could then look at it to see what it 
wanted ... 

But I also have had two or three bluetooth ping notifications through, without 
errors, which is nice. There seems to be no pattern to their success, though. 

Original comment by seatr...@gmail.com on 8 Oct 2010 at 2:04

GoogleCodeExporter commented 9 years ago
Well, this should not happen but I've changed the code to show an error message 
in a dialog box. This change will be available in next release.

Original comment by lehph...@gmail.com on 8 Oct 2010 at 2:31

GoogleCodeExporter commented 9 years ago
I installed android-notifier-desktop2.exe, and tried several pings. I'm not 
getting the "An error ocurred while receiving bluetooth notification" pop-up 
notification anymore, but like seatrout, I'm also not getting it as a system 
dialog message. I did receive one proper notification, recorded in the log at 
2010-10-08 08:16:54 (I don't remember the exact text, but it looked like it 
registered properly), but all the rest are recording as Warn messages in the 
log (attached again). 

One thing I haven't mentioned that may be worth it: I'm running the HTC-built 
Android 2.1; I don't have a rooted phone. I know others who have rooted Hero's 
that this does work with. 

I have Starred Issue 3, and will follow that development. 

Original comment by Meulf...@gmail.com on 8 Oct 2010 at 3:40

Attachments: