vaxxabait / blue-remote

Automatically exported from code.google.com/p/blue-remote
GNU General Public License v2.0
0 stars 0 forks source link

Why doesn't this work with Treo 700p or Centro? #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I was just wondering what is keeping blue-remote from working newer models of 
the Treo/Centro. Is there something that can be done to get it to work with the 
newer devices or is it impossible?

I appreciate this program and love the idea of it. I would just like to know if 
something can be done to update the source code.

Original issue reported on code.google.com by GoodMayo...@gmail.com on 25 Jul 2010 at 7:37

GoogleCodeExporter commented 9 years ago
As far as I know, all the Bluetooth APIs are still there in the newer devices, 
so it's likely just a trivial bug in BlueRemote. There could be some API-level 
incompatibilities as well: the stack behaves slightly differently on my ancient 
Tungsten T2, too, but it wasn't too hard to make BlueRemote work on it.

We simply need someone with one of those newer devices and a bit of coding 
experience to sit down and find the problem. The latest Palm OS device I have 
is a Treo 650, so I can't fix this myself.  (You can't test Bluetooth 
functionality on a simulator: you need an actual device.)

If you're volunteering to help, I'm more than happy to provide assistance with 
setting up a development environment and understanding BlueRemote's codebase. 
If you have no C programming experience, we can also attempt to debug the 
problem by email using BlueRemote's logging facilities.

BTW, can you tell me how does the latest build fail on a 700p/Centro? Does it 
still simply crash on initialization?

Original comment by Karoly.Lorentey on 27 Jul 2010 at 7:38

GoogleCodeExporter commented 9 years ago
Thanks for responding to my questions. Its nice to hear that the newer devices 
don't inherently prevent blue-remote from working. Unfortunately, I don't have 
any experience in C, nor do I have experience programing for PalmOS, but I do 
have coding experience in other languages and I'm not afraid to dive in head 
first. It might just take me a long time. Any debugging we can do via email 
would be great too.

Problems running Blue-Remote on my Treo 700p begin immediately. The device 
hangs indefinitely while initializing the Bluetooth radio. The only option is 
to cancel the operation. If I attempt to run Blue-Remote again, after canceling 
the bluetooth initialization, an error occurs and a message reads "Could not 
register management calback: Callback is already registered (0x3111)" 

This error messages occurs every time I attempt to run Blue-Remote, until I go 
into the system preferences, turn off bluetooth, then turn it back on again or 
my phone crashes and it has to restart. More often it crashes and restarts.

I imagine that if Blue-Remote could get past that point there would probably be 
little else to go wrong, but I can't know for sure. 

Here is a link to a YouTube post illustrating the problem:
http://www.youtube.com/watch?v=pEkmN8-Cv6A

Please let me know how else I can help.

Original comment by GoodMayo...@gmail.com on 27 Jul 2010 at 8:54

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Centro gets a similar crash problem. When my centro run this program for the 
first time, it kept initializing the bluetooth just as the above video showed. 
Then I quitted and then re-entered the program, it reported an error: "Could 
not register management callback: callback is already registered (0x3111)". 

It is so frustrating that this application cannot run on centro, so that people 
can use it to control an itouch, iphone or a tablet PC. 

I have some experience in programming but not in Palm's. I wish I could 
understand the source codes. Thanks for your generous help, Karoly Lorentey!

Original comment by jerry.et...@gmail.com on 10 Sep 2010 at 5:20

GoogleCodeExporter commented 9 years ago
Hi, I'm supprised of finding this group, thank you very much for it.

About the problem
I also got the same message when the bluetooth is off and is turned on from the 
application.
If the bluetooth is already turned on it just keep saying "Initializing radio" 
with blue balls moving on the screen until I cancel it.

Thank you again!

I have very little coding experience, but I'm willing to learn, I'm installing 
Garnett OS SDK to take a look.

Original comment by edwin...@gmail.com on 12 Sep 2010 at 4:59

GoogleCodeExporter commented 9 years ago
I've prepared a debug build for testing: could you please download 
BlueRemote-2.0alpha2-debug.prc and run it on your Centro/700p devices?

This build shows log messages on the screen and also saves them in a file 
called "BlueRemoteLog.pdb" on the SD card. I'd like to get this log file from a 
failed run on Centro/700p, preferably after a fresh reboot of the device. (You 
can simply attach the log file to this issue report, or if you prefer you can 
send it in email to karoly.lorentey@gmail.com.) Hopefully the logs will let us 
fix this problem.

Thanks!

Original comment by Karoly.Lorentey on 27 Sep 2010 at 3:51

GoogleCodeExporter commented 9 years ago
FYI, here is a direct link to the debug build:

http://blue-remote.googlecode.com/files/BlueRemote-2.0alpha2-debug.prc

Original comment by Karoly.Lorentey on 27 Sep 2010 at 3:52

GoogleCodeExporter commented 9 years ago
The latest build is still not working on the 700p. Still stuck at 
initialization of the Bluetooth radio. The log messages are visible but reads 
"Saved preferences loaded" while the initializing animation runs.

What do the preferences show up as in a list of saved/unsaved preferences? One 
that uses four letters?

A second attempt at running BlueRemote returns the error "Could not 
register...(0x3111)" and a log message flashes "log synchronized."

Looking at my log it seems that the problem starts at E2010-09-27 21:08:35.51 
and at D2010-09-27 21:08:37.32 the log says, "Treo event notify callback 
unregistered." After that it looks like everything clears and closes.

The log file was fount on the device memory and NOT on the SD card.

Here is another YouTube post to illustrate:
http://www.youtube.com/watch?v=heGLSLq4t2w

Original comment by GoodMayo...@gmail.com on 28 Sep 2010 at 6:32

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Log1 is from a fresh run after a restart then log2 from a run that returns the 
0x3111 error.

Original comment by GoodMayo...@gmail.com on 28 Sep 2010 at 5:35

Attachments:

GoogleCodeExporter commented 9 years ago
Here's another log after a 0x3111 error.

Original comment by GoodMayo...@gmail.com on 28 Sep 2010 at 5:43

Attachments:

GoogleCodeExporter commented 9 years ago
It seems like, from BlueRemoteLog1 that the Bluetooth radio initializes, "Radio 
initialized successfully," but then it doesn't continue. I guess that the "Treo 
event notify callback unregistered" is from when I press cancel because it 
seems to appear after a short delay, probably how long I waited before I 
pressed cancel. So if "Treo event notify callback unregistered" is from when I 
pressed cancel, the log makes it look like everything else before that is going 
fine, but it still won't go past that initializing progress screen.

I hope this helps.

Original comment by GoodMayo...@gmail.com on 28 Sep 2010 at 6:20

GoogleCodeExporter commented 9 years ago
OK, it looks like the problem is that the Bluetooth interface on Centro does 
not automatically send a radio accessibility change notification after 
BlueRemote sets up its management callback.  (The stray report can confuse the 
state when later BlueRemote tries to turn on the radio itself, so the app waits 
until this notification arrives before proceeding.)

This was easy enough to fix by adding a short timeout. I've uploaded 2.0alpha3 
— please try it and see if it works!

Original comment by Karoly.Lorentey on 29 Sep 2010 at 2:58

GoogleCodeExporter commented 9 years ago
Working!

I'm not sure what a radio accessibility change notification is but I'm glad you 
got it figured out. 

I'm typing this on my computer, using my Treo. For some reason the period key 
on the Treo keyboard just opened the start menu, but whatever, it's mostly 
perfect.

I'll let you know if I spot anything else. Here's a log of the first successful 
run.

Original comment by GoodMayo...@gmail.com on 29 Sep 2010 at 7:11

Attachments:

GoogleCodeExporter commented 9 years ago
I just noticed that when I exit from BlueRemote the Bluetooth on the Treo stays 
engaged, while the computer reports the connection closed. I didn't notice and 
my battery died a few hours or so later.
When I open BlueRemote back up it reestablishes the connection fine but I think 
it should be closing the connection when I close BlueRemote, right?
If I disconnect from the BlueRemote menu, then exit the program, the Treo shows 
the connection closed. So right now, I have to disconnect from the computer 
every time I close the program.

Other than that and the period button opening the start menu, everything seems 
fine.

Original comment by GoodMayo...@gmail.com on 30 Sep 2010 at 12:27

GoogleCodeExporter commented 9 years ago
I'm glad it works! That went easier than I expected.

The period button is intentionally mapped to the Windows modifier key (a.k.a 
the command key on Macs), for easy access to the Windows Start menu and 
shortcuts such as Win-E or Cmd-C/Cmd-V). Press Alt-. to get an actual period. 
(It wouldn't be hard to add a preference option to disable this if you find it 
annoying.)

I'll look into the power issue (it sounds like BlueRemote leaves the physical 
connection active on your device). Meanwhile, if you suspect there is a 
lingering connection, disabling/reenabling Bluetooth on the device after you've 
finished using BlueRemote is guaranteed to get rid of it.

Original comment by Karoly.Lorentey on 30 Sep 2010 at 12:57

GoogleCodeExporter commented 9 years ago

Original comment by Karoly.Lorentey on 30 Sep 2010 at 12:58