Eymir / android-notifier

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

Bluetooth notifications not delivered #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The Android app doesn't seem to be able to send Bluetooth notifications on a 
Nexus One.

The phone is paired with just one computer, and bluetooth works in general.  
(E.g., I can transfer files with OBEX.)  PacketLogger doesn't show any 
bluetooth 
traffic from the phone when I send a test notification, so I'm pretty sure this 
is 
a bug on the handset side, not the computer side.

Tested on a Nexus One running Android 2.1 (build ERD79).  On the computer 
side, I tested with both a Mac Mini (Macmini2,1) running 10.5.8 and a Mac 
Book Pro (MacBookPro5,4) running 10.5.8.

Original issue reported on code.google.com by satw...@disjoint.net on 28 Jan 2010 at 9:08

GoogleCodeExporter commented 9 years ago
So apparently this is an issue with having multiple bluetooth devices paired. 
I'm adding 
bluetooth device selection soon, but I'm attaching your patch for review in the 
meantime.

Original comment by rdamazio@gmail.com on 2 Feb 2010 at 2:31

Attachments:

GoogleCodeExporter commented 9 years ago
Patch reviewed and appears to work in my device, submitted as r67

Original comment by rdamazio@gmail.com on 2 Feb 2010 at 2:41

GoogleCodeExporter commented 9 years ago
r68 adds bluetooth target device selection.
r72 adds a possible regression - if lots of notifications are sent very quickly 
(unlikely), 
some of them may fail.

Please let me know if the latest version works on the N1.

Original comment by rdamazio@gmail.com on 7 Feb 2010 at 12:35

GoogleCodeExporter commented 9 years ago
Apparently r72 introduced a bug which breaks all delayed notifications. 
Preparing 
another fix.

Original comment by rdamazio@gmail.com on 18 Feb 2010 at 12:29

GoogleCodeExporter commented 9 years ago
Maybe, just maybe, r83 will fix what you're experiencing. Please update from 
the market 
and let me know.

Original comment by rdamazio@gmail.com on 22 Feb 2010 at 1:59

GoogleCodeExporter commented 9 years ago
I have a motorola droid running 2.0.1 and bugless beast rom 1.1 everything 
seems to connect fine to my mac 
mini. i run test notification for pairing with mac app. it finds device fine. i 
have growl running. no notifications 
display though. please help.

Original comment by lunacy...@gmail.com on 12 Mar 2010 at 10:50

GoogleCodeExporter commented 9 years ago
lunacyent, can you paste or attach the log output of the mac application here, 
after a 
notification is received (but not displayed)? You can find it by running 
Applications > 
Utilites > Console, then searching for MacDroidNotifier.

Do test notifications also not display?

Original comment by rdamazio@gmail.com on 15 Mar 2010 at 3:14

GoogleCodeExporter commented 9 years ago
Installed from market and from apk here - nexus one owner also reports no 
receipt of
bluetooth notifications. Wifi to specific IP, fine.

Original comment by gavin.co...@gmail.com on 24 Mar 2010 at 4:53

GoogleCodeExporter commented 9 years ago
Test notifications and regular notifications both are not received (tho phone 
reports
they are sent)

Original comment by gavin.co...@gmail.com on 24 Mar 2010 at 7:52

GoogleCodeExporter commented 9 years ago
I still haven't been able to reproduce this, even on the Nexus One - could you 
attach 
or paste the output of the android log after sending a (real or test) 
notification this 
way?
You can get the log by installing an app called alogcat from the market, which 
allows 
you to e-mail it.

Are you using any other bluetooth devices, like a headset?

(I'm also assuming you checked the basics - that bluetooth is enabled, that the 
devices are paired, etc.)

Original comment by rdamazio@gmail.com on 24 Mar 2010 at 8:10

GoogleCodeExporter commented 9 years ago
Raising the priority since more people are reporting the issue.

Original comment by rdamazio@gmail.com on 24 Mar 2010 at 8:11

GoogleCodeExporter commented 9 years ago
Bruno has a Nexus One and was able to reproduce it. He has kindly volunteered 
to 
investigate and fix the problem.

Original comment by rdamazio@gmail.com on 25 Mar 2010 at 2:28

GoogleCodeExporter commented 9 years ago
We just tried multiple times with the Nexus One, both with the current and a 
future version of Android, and we're 
still unable to reproduce. Can someone provide a log output?

Original comment by rdamazio@gmail.com on 30 Mar 2010 at 8:09

GoogleCodeExporter commented 9 years ago
Ping? Any logs?

Original comment by rdamazio@gmail.com on 7 Apr 2010 at 6:05

GoogleCodeExporter commented 9 years ago
I have the exact same issue being reported here. Here are the relevant logs. No 
logs
are being generated when I send a test notification. However in the list of 
bluetooth
devices in System Preferences -> Bluetooth, the connection status goes from red 
to
green for my Nexus One whenever I send a test notification. This probably means 
the
test notification reaches the mac, but the desktop app fails to receive the 
notification.

4/7/10 10:56:51 PM MacDroidNotifier[2525] Saving preferences 
4/7/10 10:56:51 PM MacDroidNotifier[2525] Pairing set to required but no devices
paired, switching to not required. 
4/7/10 10:56:51 PM MacDroidNotifier[2525] Pairing set to required but no devices
paired, switching to not required. 
4/7/10 10:57:31 PM MacDroidNotifier[2640] started listening for WiFi 
notifications 
4/7/10 10:57:31 PM MacDroidNotifier[2640] Started listening for Bluetooth 
notifications 

Original comment by krishn...@gmail.com on 7 Apr 2010 at 5:35

GoogleCodeExporter commented 9 years ago
From Console.app:
4/13/10 4:11:03 PM MacDroidNotifier[46560] started listening for WiFi 
notifications 
4/13/10 4:11:05 PM MacDroidNotifier[46560] Started listening for Bluetooth 
notifications 

Attached is the droid log grepped for remotenotifier|bluetooth, let me know if 
this
isn't enough of the log.

Original comment by Matthew....@gmail.com on 13 Apr 2010 at 11:31

Attachments:

GoogleCodeExporter commented 9 years ago
Since I can't reproduce this, I'm taking a guess at what the problem may be - 
can one of you test the attached 
APK and see if it solves the problem?

Thanks

Original comment by rdamazio@gmail.com on 14 Apr 2010 at 2:12

Attachments:

GoogleCodeExporter commented 9 years ago
Works :) Thanks!

Original comment by gavin.co...@gmail.com on 14 Apr 2010 at 7:08

GoogleCodeExporter commented 9 years ago
Weird.  Downloaded it and it still doesn't work for me.  I'll uninstall and
re-install instead of doing an update/replace.

Original comment by tchentc...@gmail.com on 14 Apr 2010 at 8:05

GoogleCodeExporter commented 9 years ago
What this new binary does it just try again (up to 10 times) if sending the 
notification fails.

Original comment by rdamazio@gmail.com on 14 Apr 2010 at 9:21

GoogleCodeExporter commented 9 years ago
Does this app generate a log file I can drop on here for your review?

Original comment by tchentc...@gmail.com on 14 Apr 2010 at 9:51

GoogleCodeExporter commented 9 years ago
Yes it does. To get the log you have to use an app such as alogcat (available 
from the market).

Original comment by rdamazio@gmail.com on 14 Apr 2010 at 11:31

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Same here with moto droid user using a custom rom. Wifi works fine though.

Original comment by ekimia1987@gmail.com on 28 Apr 2010 at 8:36

GoogleCodeExporter commented 9 years ago
Does this still happen after the 0.2.5 update of the mac app (please choose 
check for updates from the menu, I 
posted the update yesterday) and version 0.2.3 of the android app?

Original comment by rdamazio@gmail.com on 28 Apr 2010 at 9:08

GoogleCodeExporter commented 9 years ago
Still failing to get the message, though I'm getting an interesting new error 
in my
console app:

4/28/10 2:18:26 PM kernel IOMemoryDescriptor: attempt to create 32b virtual in 
64b
task, use ::withAddressRange() 
4/28/10 2:18:26 PM kernel Backtrace 0x430605 0x4304f5 0x42ff40 0x54df97f3 
0x54df96bd
0x54df8fec 0x427525 
4/28/10 2:18:26 PM kernel Kernel loadable modules in backtrace (with 
dependencies): 
4/28/10 2:18:26 PM kernel
com.apple.iokit.IOBluetoothFamily(2.1.9f10)@0x54dd0000->0x54e09fff

I should note: I don't appear to be running the 64 bit OS (at least it's not
explicitly saying I am in About).  Also, I'm still running on 10.5.8 here.

Original comment by lordost...@gmail.com on 28 Apr 2010 at 9:25

GoogleCodeExporter commented 9 years ago
Just downloaded this, and I'm having problems. I got everything installed, but 
notifications aren't being sent 
over bluetooth. I'm not somewhere that I can try WiFi for sure, but creating a 
network with "Internet Sharing" 
on my Macbook Pro doesn't work.

Here are relevant log entries from the Bluetooth attempts:

05-03 00:12:42.030 D/RemoteNotifier( 1314): Connecting to Bluetooth device owing
05-03 00:12:42.135 D/RemoteNotifier( 1314): Waiting to retry
05-03 00:12:42.135 D/RemoteNotifier( 1314): java.io.IOException: Service 
discovery failed
05-03 00:12:42.135 D/RemoteNotifier( 1314): at 
android.bluetooth.BluetoothSocket$SdpHelper.doSdp(BluetoothSocket.java:377)
05-03 00:12:42.135 D/RemoteNotifier( 1314): at 
android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:201)
05-03 00:12:42.135 D/RemoteNotifier( 1314): at 
org.damazio.notifier.notification.BluetoothNotificationMethod.doSendNotification
(BluetoothNotificationMethod
.java:163)
05-03 00:12:42.135 D/RemoteNotifier( 1314): at 
org.damazio.notifier.notification.BluetoothNotificationMethod.sendNotification(B
luetoothNotificationMethod.ja
va:99)
05-03 00:12:42.135 D/RemoteNotifier( 1314): at 
org.damazio.notifier.notification.MethodEnablingNotifier.onTick(MethodEnablingNo
tifier.java:50)
05-03 00:12:42.135 D/RemoteNotifier( 1314): at 
android.os.CountDownTimer$1.handleMessage(CountDownTimer.java:124)
05-03 00:12:42.135 D/RemoteNotifier( 1314): at 
android.os.Handler.dispatchMessage(Handler.java:99)
05-03 00:12:42.135 D/RemoteNotifier( 1314): at 
android.os.Looper.loop(Looper.java:123)
05-03 00:12:42.135 D/RemoteNotifier( 1314): at 
org.damazio.notifier.notification.Notifier$1.run(Notifier.java:63)
05-03 00:12:42.143 V/BluetoothEventRedirector( 1075): Received 
android.bleutooth.device.action.UUID
05-03 00:12:42.308 D/BluetoothService( 1017): Registering opush record
05-03 00:12:42.338 E/BluetoothEventLoop.cpp( 1017): event_filter: Received 
signal 
org.bluez.Adapter:PropertyChanged from /org/bluez/1392/hci0
05-03 00:12:42.807 D/BluetoothService( 1017): Registering pbap record

And then it repeats. I hope this is relevant to this thread. Let me know if I 
should post somewhere else.

Original comment by thetaco...@gmail.com on 3 May 2010 at 4:31

GoogleCodeExporter commented 9 years ago
Thanks for the log, it definitely helps.

Good news is, I just updated my milestone to 2.1-update1, so I'm hoping that 
I'll be able to reproduce these 
issues more easily.

Original comment by rdamazio@gmail.com on 3 May 2010 at 5:18

GoogleCodeExporter commented 9 years ago
Forgot to mention. I'm using Moto Droid 2.1-update1 and Macbook Pro with 
10.5.8. Both phone app and 
laptop app are newest version.

I have my phone and laptop paired. Notifier is set to do bluetooth with my 
laptop as the target. Laptop has 
bluetooth on (and it connects when a message is trying to be sent). Laptop 
application settings are: Bluetooth 
only, all "Display in Growl" on, Receive notifications from any device. This 
application generates no logs during 
test message.

Is there anything additional you need from me?

Original comment by thetaco...@gmail.com on 3 May 2010 at 4:54

GoogleCodeExporter commented 9 years ago
Can't get the bluetooth notifications working on Froyo (Nexus One).
Tried updating to the attached apk, didn't help.

W/Settings( 5997): Setting android_id has moved from 
android.provider.Settings.System to 
android.provider.Settings.Secure, returning read-only value.
D/RemoteNotifier( 5997): Sending notification: 
e3dcc85417e9d0a4/4246a74c55603/PING/Test notification
E/BluetoothService.cpp(   78): stopDiscoveryNative: D-Bus error in 
StopDiscovery: org.bluez.Error.Failed 
(Invalid discovery session)
E/RemoteNotifier( 5997): Unable to find bluetooth device 'any' to send 
notifications to

Original comment by lahdekorpi on 31 May 2010 at 9:00

GoogleCodeExporter commented 9 years ago
Hi. I have this Issue too. After sending notification from phone, it's 
connectiong device.. and then disconnect.. but there is no notification... It's 
work for tcp/udp.. but not for bluetooth. My device is HTC-Hero with VillianRom 
(Android 2.1), an computer is MacBooc Pro. 

Doyou need some more feedback? Some more logs or something?

Original comment by Wojciech...@gmail.com on 7 Aug 2010 at 5:08

GoogleCodeExporter commented 9 years ago
Yes, please send logs, I'm still unable to reproduce this on my Nexus One (2.2) 
or Motorola Milestone (2.1).
The app has a report bug option which will copy logs to the clipboard 
automatically. The mac app outputs logs which you can see in the Console app 
(under Applications > Utilities).

Can you also confirm the android and mac app versions you're using?
Also, a few more questions: does this happen for test notifications too? Are 
you selecting the specific bluetooth device to send to, or are you using "Any"?

Thanks, and sorry for not having solved this one yet.

Original comment by rdamazio@gmail.com on 7 Aug 2010 at 7:38

GoogleCodeExporter commented 9 years ago
Issue 21 has been merged into this issue.

Original comment by rdamazio@gmail.com on 7 Aug 2010 at 7:39

GoogleCodeExporter commented 9 years ago
Still trying to figure this one out. If anyone here happens to be a bluetooth 
expert, please let me know. Otherwise, I'm keeping some findings here:

1) Apparently this stops happening if I put the mac in discoverable mode (can 
someone confirm if discovery mode fixes it for them as well?). It's quite hard 
to make it *start* happening again, though, meaning I'm still having trouble 
reproducing.

2) (1) suggests that it's an issue with the phone finding the bluetooth service 
on the computer. The fact that it starts working with discoverable mode 
suggests that SDP on the device is caching information sent by the Mac's SDP, 
and not properly updating it (e.g. maybe the app started while the phone had 
bluetooth off or wasn't in range, so the mac broadcast a service update but the 
phone never received it). Can someone confirm if doing the bluetooth pairing 
(bluetooth, not the app's pairing) AFTER the app is already running changes 
anything?

3) SDP registration is done by a weird-format plist file, which I don't fully 
understand. I tried making Android itself expose an RFCOMM service, assuming 
that it'd always be able to connect to a service declared in the same way it 
exposes. 

The service exposed by Android had two entries:

        {
            0x0000 = uint32(65544),
            0x0100 = string(My Test),
            0x0005 = { uuid16(10 02) },
            0x0001 = { uuid128(e8 d5 15 b4 47 c1 48 13 b6 d6 3e ab 32 f8 95 3e) },
            0x0004 = { { uuid16(01 00) }, { uuid16(00 03), uint8(24) } }
        },
        {
            0x0000 = uint32(65545),
            0x0100 = string(My Test),
            0x0005 = { uuid16(10 02) },
            0x0001 = { uuid128(e8 d5 15 b4 47 c1 48 13 b6 d6 3e ab 32 f8 95 3e) },
            0x0004 = { { uuid16(01 00) }, { uuid16(00 03), uint8(3) } }
        }

    (all exactly the same except for attribute 4)

The one I'm exposing on the Mac side is the following (based on Apple's 
example):

0x0000 = 0x00010005,
0x0100 = "rdamazio AndroidNotifierService",
0x0005 = { <1002> },
0x0001 = { <7674047e6e474bf0831f209e3f9dd23f> },
0x0004 = { { <0100> }, { <0003>, 0x04 } }
0x0009 = { { <0dad43655df111d69f6e00039353e858>, 0x0100 } },
0x0006 = { 0x656e, 0x006a, 0x0100 },
0x0303 = { 0xff },

which has also a different attribute 4, in addition to 3 extra attributes (9, 
6, 303). (the UUID is different because I made it so)

Does anyone have any idea what the effect of these attributes is?

Can you guys try these 2 possible solutions (discoverable, and pairing after 
the app is running) and let me know if it fixes the problem? If any of those 
do, I can look for a more user-friendly solution.

Thanks

Original comment by rdamazio@gmail.com on 23 Aug 2010 at 3:28

GoogleCodeExporter commented 9 years ago
Issue 23 has been merged into this issue.

Original comment by rdamazio@gmail.com on 23 Aug 2010 at 5:06

GoogleCodeExporter commented 9 years ago
Issue 10 has been merged into this issue.

Original comment by rdamazio@gmail.com on 23 Aug 2010 at 5:08

GoogleCodeExporter commented 9 years ago
Hi there

I have a HTC Wildfire

Wildfire claims bluetooth messages sent - but they never appear.

Have a coding history so happy to help beta test / trouble shoot. Discovery 
mode does not seem to help me.

Original comment by mrwait...@gmail.com on 7 Sep 2010 at 6:36

GoogleCodeExporter commented 9 years ago
Discovery mode does not help me either. I believe that the problem lies with 
the computer service. My computer is receiving the test notifications, but it's 
not displaying them for some reason.

Phone: Motorola Droid (Froyo)
Computer: Dell XPS m1330, Ubuntu 10.04

Output of "lsusb | grep -i blue":
Bus 003 Device 028: ID 413c:8126 Dell Computer Corp. Wireless 355 Bluetooth
Bus 003 Device 027: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of 
BCM2046 Bluetooth)

Original comment by seanc...@gmail.com on 7 Sep 2010 at 11:08

GoogleCodeExporter commented 9 years ago
Hi,
I get the notification via Bluetooth but after 10-20 seconds. It's OK for 
anything except for call notifications.

Phone: N1, CyanogenMod 6
Android Notifier: 0.2.4
Computer: Mac, 10.6.4
Android Notifier: 0.2.6

Original comment by christia...@gmail.com on 8 Sep 2010 at 8:50

GoogleCodeExporter commented 9 years ago
I have this same issue where the phone and Mac are paired, and the Bluetooth 
notification is going out, and Bluetooth preferences on the Mac show it being 
received, but Growl itself is not displaying a notification. Is there something 
wrong with the formatting of the notification?

Original comment by pro...@gmail.com on 8 Sep 2010 at 4:36

GoogleCodeExporter commented 9 years ago
I was having trouble sending notifications as well, but after removing the 
device pairing from both my laptop and phone and repairing them, it seems to be 
working fine.

Original comment by matthew....@gmail.com on 9 Sep 2010 at 12:48

GoogleCodeExporter commented 9 years ago
Issue 53 has been merged into this issue.

Original comment by rdamazio@gmail.com on 9 Sep 2010 at 1:05

GoogleCodeExporter commented 9 years ago
Issue 58 has been merged into this issue.

Original comment by rdamazio@gmail.com on 9 Sep 2010 at 12:32

GoogleCodeExporter commented 9 years ago
Im not sure im having the same problem in this thread but its similar. Im using 
an Evo 2.2, with a MBP 10.6, my bluetooth settings show it not connected but 
paired and only connected for a few seconds before it disconnects again. It 
seems to me this is an issue on the phone, maybe with froyo?

Original comment by chicagof...@gmail.com on 9 Sep 2010 at 4:13

GoogleCodeExporter commented 9 years ago
@chicago yea sounds like my issue on incredible w/ 2.2. does your WiFi 
notification work if your WiFi isn't turned on, but WiFi set to turn on for 
notification push?

Original comment by Loesc...@gmail.com on 9 Sep 2010 at 4:29

GoogleCodeExporter commented 9 years ago
@Loesch, I have not tested it wifi, my wifi is a battery drainer and I really 
cant wait for the usb interface, but no I have not even tried wifi, I will 
later when I get home, but im not going to mess around in the office network

Original comment by chicagof...@gmail.com on 9 Sep 2010 at 4:38

GoogleCodeExporter commented 9 years ago
@chicago yea my WiFi is the same. There is an option in the WiFi menu that 
enables the program to just turn on the WiFi for a second to send the 
notification, then turn it off, but as far as battery use I donno because this 
won't work either. Let me know what ya find out tonight tho.

Original comment by Loesc...@gmail.com on 9 Sep 2010 at 5:04

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I can't get notifications to work either, for both Wifi and Bluetooth

HTC Incredible, android 2.2
Windows 7

Original comment by antoine....@gmail.com on 9 Sep 2010 at 5:31

GoogleCodeExporter commented 9 years ago
Im willing to bet this is an issue with Froyo, or the bluetooth settings on the 
Evo/froyo, Im trying to see if my buddys iphone will stay connected as well

Original comment by chicagof...@gmail.com on 9 Sep 2010 at 6:03