myl142857 / android-notifier

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

AND fails to receive Bluetooth notifications after resuming from standby #284

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start AND on Windows, ensure that Bluetooth notifications work
2. Have the computer enter standby, and then resume
3. Test Bluetooth notifications

What is the expected output? What do you see instead?

The test notification should appear; nothing is received

What version of the product are you using? On what operating system?

Android Notifier Desktop 0.5.1, on Windows 7 x64.

Please provide the log output if possible (from the alogcat app on android,
Show Log menu on the multiplatform client, or Console on native mac app):

I've added comments explaining the progression of events.

//program is started
...
//Bluetooth notifications work:
2010-11-09 17:07:21,303 INFO [NotificationManagerImpl] - Notification received: 
notificationId=36785907411877175, type=SMS
2010-11-09 17:07:21,303 DEBUG [bluetooth] - closing RFCOMM Connection 776
2010-11-09 17:07:21,303 DEBUG [bluetooth] - connection closed, open now 0
2010-11-09 17:07:21,304 DEBUG [bluetooth] - socket[776] close
2010-11-09 17:07:21,304 DEBUG [bluetooth] - socket[1052] accept
2010-11-09 18:13:15,431 DEBUG [bluetooth] - connection accepted
2010-11-09 18:13:15,435 DEBUG [bluetooth] - socket[776] getpeeraddress
2010-11-09 18:13:15,435 DEBUG [bluetooth] - connection open, open now 1
2010-11-09 18:13:15,435 DEBUG [bluetooth] - socket[776] recv 
(byte[],int,int=4096)
2010-11-09 18:13:15,454 DEBUG [bluetooth] - socket[776] recv 
(byte[],int,int=4096)
2010-11-09 18:13:15,456 DEBUG [bluetooth] - Connection closed
2010-11-09 18:13:15,458 INFO [NotificationManagerImpl] - Notification received: 
notificationId=36786025593412681, type=SMS
2010-11-09 18:13:15,458 DEBUG [bluetooth] - closing RFCOMM Connection 776
2010-11-09 18:13:15,459 DEBUG [bluetooth] - connection closed, open now 0
2010-11-09 18:13:15,459 DEBUG [bluetooth] - socket[776] close
2010-11-09 18:13:15,460 DEBUG [bluetooth] - socket[1052] accept
/* System went to sleep here, and was woken up; a test notification
 * was then sent but clearly nothing was received.
 * App was then restarted...
 */
2010-11-10 12:34:28,735 INFO [ApplicationImpl] - Shutting down...
2010-11-10 12:34:28,736 INFO [ApplicationImpl] - Hiding tray icon
2010-11-10 12:34:28,745 DEBUG [ServiceServerImpl] - Stopping service server
2010-11-10 12:34:28,805 INFO [ApplicationImpl] - Stopping [bluetooth] receiver
2010-11-10 12:34:28,805 INFO [ApplicationImpl] - Stopping [System default] 
broadcaster
2010-11-10 12:34:28,806 INFO [ApplicationImpl] - Stopping SWT
2010-11-10 12:34:41,557 INFO [ApplicationImpl] - Starting SWT
2010-11-10 12:34:41,979 INFO [ApplicationImpl] - Showing tray icon
2010-11-10 12:34:42,178 DEBUG [ServiceServerImpl] - Starting service server on 
port [10700]
2010-11-10 12:34:42,207 DEBUG [InetAddresses] - Looking for local address
2010-11-10 12:34:42,250 INFO [ApplicationImpl] - Starting [System default] 
broadcaster
2010-11-10 12:34:42,250 INFO [ApplicationImpl] - Starting [bluetooth] receiver
2010-11-10 12:34:42,308 DEBUG [bluetooth] - Java 1.4+ detected: 1.6.0_21; Java 
HotSpot(TM) Client VM; Sun Microsystems Inc.
2010-11-10 12:34:42,328 DEBUG [bluetooth] - Use stack ClassLoader
2010-11-10 12:34:42,336 DEBUG [bluetooth] - set dll dir 
C:\Users\Jonathan\AppData\Local\Temp\bluecove_Jonathan_0
2010-11-10 12:34:42,360 DEBUG [bluetooth] - Library loaded from 
C:\Users\Jonathan\AppData\Local\Temp\bluecove_Jonathan_0\intelbth.dll
2010-11-10 12:34:42,361 DEBUG [bluetooth] - nativeDebugCallback ON
2010-11-10 12:34:42,366 DEBUG [bluetooth] - BluetoothStack detected 1
2010-11-10 12:34:42,507 DEBUG [bluetooth] - initializationStatus 1
2010-11-10 12:34:42,513 DEBUG [bluetooth] - socket
2010-11-10 12:34:42,514 DEBUG [bluetooth] - socket[952] opened
2010-11-10 12:34:42,514 DEBUG [bluetooth] - socket[952] bind
2010-11-10 12:34:42,515 DEBUG [bluetooth] - socket[952] getsockaddress
2010-11-10 12:34:42,522 DEBUG [bluetooth] - receive buffer 8192
2010-11-10 12:34:42,522 DEBUG [bluetooth] - send buffer 8192
2010-11-10 12:34:42,522 DEBUG [bluetooth] - socket[952] close
2010-11-10 12:34:42,525 INFO [ApplicationImpl] - Removing from startup
2010-11-10 12:34:42,527 DEBUG [bluetooth] - open using BlueCove 
javax.microedition.io.Connector
2010-11-10 12:34:42,528 DEBUG [bluetooth] - connecting 
btspp://localhost:7674047e6e474bf0831f209e3f9dd23f;name=AndroidNotifierService;a
uthenticate=true;encrypt=true
2010-11-10 12:34:42,544 DEBUG [bluetooth] - socket
2010-11-10 12:34:42,545 DEBUG [bluetooth] - socket[1084] opened
2010-11-10 12:34:42,545 DEBUG [bluetooth] - socket[1084] bind
2010-11-10 12:34:42,546 DEBUG [bluetooth] - socket[1084] listen
2010-11-10 12:34:42,546 DEBUG [bluetooth] - socket[1084] getsockchannel
2010-11-10 12:34:42,547 DEBUG [bluetooth] - service channel  1
2010-11-10 12:34:42,607 DEBUG [bluetooth] - registerService
2010-11-10 12:34:42,614 DEBUG [bluetooth] - socket[1084] accept
2010-11-10 12:34:43,060 DEBUG [InetAddresses] - Local address found
2010-11-10 12:34:47,607 DEBUG [bluetooth] - connection accepted
2010-11-10 12:34:47,614 DEBUG [bluetooth] - socket[772] getpeeraddress
2010-11-10 12:34:47,617 DEBUG [bluetooth] - new RemoteDevice C0E422584321
2010-11-10 12:34:47,618 DEBUG [bluetooth] - new devicesCashed 0xc0e422584321
2010-11-10 12:34:47,621 DEBUG [bluetooth] - connection open, open now 1
2010-11-10 12:34:47,627 DEBUG [bluetooth] - socket[772] recv 
(byte[],int,int=4096)
2010-11-10 12:34:47,628 DEBUG [bluetooth] - socket[772] recv 
(byte[],int,int=4096)
2010-11-10 12:34:47,628 DEBUG [bluetooth] - Connection closed
2010-11-10 12:34:48,588 INFO [NotificationManagerImpl] - Notification received: 
notificationId=1186708530375227, type=Ping
2010-11-10 12:34:48,591 DEBUG [bluetooth] - closing RFCOMM Connection 772
2010-11-10 12:34:48,591 DEBUG [bluetooth] - connection closed, open now 0
2010-11-10 12:34:48,592 DEBUG [bluetooth] - socket[772] close
2010-11-10 12:34:48,592 DEBUG [bluetooth] - socket[1084] accept
//...and bluetooth notifications began to work again.

Please provide any additional information below.

The Bluetooth target device setting does not affect the outcome.

Original issue reported on code.google.com by ionotha...@gmail.com on 10 Nov 2010 at 5:45

GoogleCodeExporter commented 9 years ago
There is no log between 2010-11-09 18:13:15,460 and 2010-11-10 12:34:28,735? 
Did you try to disable Bluetooth in "Notification Reception Methods" in 
preferences and enable it again when your system woke up? Does it always happen?

I tried to reproduce this on my desktop running Windows 7 with the same 
bluetooth stack but no notifications were lost. My system went to sleep for 
only 5 minutes though.

Original comment by lehph...@gmail.com on 25 Nov 2010 at 10:37

GoogleCodeExporter commented 9 years ago
Sorry for the delay - life happened.

1) Yes - there were no log entries for that timeframe.
2) No, I haven't tried that, because:
3) apparently I can't reproduce the problem anymore, and believe me, I 
reproduced it plenty of times before filing the bug. It works perfectly now - I 
actually got a notification without realizing the server or client were active. 
The only thing I can think of is that I may have changed Bluetooth stacks? 

I'll update this if anything changes. Let me know if you want me to try 
anything.

Original comment by ionotha...@gmail.com on 4 Jan 2011 at 4:20

GoogleCodeExporter commented 9 years ago
Taking over lehphyro's issues.

Original comment by rdamazio@gmail.com on 11 Jan 2011 at 4:31