Re: Treo 300: pilot-link works, gnome-pilot doesn't
- From: Adam C Powell IV <hazelsct mit edu>
- To: gnome-pilot-list gnome org
- Subject: Re: Treo 300: pilot-link works, gnome-pilot doesn't
- Date: Sat, 22 Mar 2003 21:04:48 -0500
JP Rosevear wrote:
On Fri, 2003-03-14 at 09:30, Adam C Powell IV wrote:
So we have a device which doesn't give its name. What to do? It seems
we can either:
* Make an "exception" loop, after the main loop which checks the
names for a match; this exception loop would trigger if the main
loop didn't see anything and check for the one (or more?) Vendor
and ProdIDs which correspond to devices without names.
* Switch entirely to using Vendor and ProdID instead of name,
copying in some of the values from kernel visor.h.
Of these, the second is the better option, the tungsten has the same
problem.
Okay. I did the first early last week, and it didn't work. But I
didn't have time to follow through with a detailed analysis of why it
didn't work...
So I just did the second, patch attached, including all the devices in
Greg KH's latest kernel patch. The patch works, but gpilotd doesn't,
and I can't figure out why. Again, this is for a device where
pilot-xfer seems to be working...
I stuck in a printf to give the visor_exists status after reading
/proc/bus/usb/devices, here's the output:
gpilotd-Message: gnome-pilot 0.1.71 starting...
gpilotd-Message: compiled for pilot-link version 0.11.7
gpilotd-Message: compiled with [VFS] [USB] [IrDA] [Network]
gpilotd-Message: Activating CORBA server
gpilotd-Message: Watching Cradle (/dev/ttyUSB1)
visor_exists=0 [here I pressed the hotsync button, and after ~2 seconds:]
visor_exists=1
gpilotd-Message: setting PILOTRATE=57600
gpilotd-WARNING **: pi_accept_to: Connection timed out
gpilotd-WARNING **: pi_accept_to: timeout was 2 secs [~5 more seconds]
visor_exists=0
simultaneously the Treo says:
The connection between your handheld computer and the desktop could not
be established. Please check your setup and try again.
So I looked through gpilotd.c for the errors, and found them at lines
187-188 after the call to pi_accept_to(). So I replaced device->timeout
with 30, but it seemed to make no difference, the visor_exists,
gpilotd-Message and WARNINGs again all appeared about 2 seconds after
pressing hotsync.
What could be going wrong? Should I try the Handspring developer site?
Will printing the USB traffic (in kern.log) help any of you help me? I
looked in the pilot-link source for clues, but it looks like the
functions in pilot-xfer I've tested are all quite simple compared to the
handshaking going on in gnome-pilot...
Thanks,
--
-Adam P.
GPG fingerprint: D54D 1AEE B11C CE9B A02B C5DD 526F 01E8 564E E4B6
Welcome to the best software in the world today cafe!
<http://lyre.mit.edu/%7Epowell/The_Best_Stuff_In_The_World_Today_Cafe.ogg>
--- gnome-pilot-0.1.71/gpilotd/gpilotd.c~ Thu Dec 12 08:53:21 2002
+++ gnome-pilot-0.1.71/gpilotd/gpilotd.c Sat Mar 22 20:00:50 2003
@@ -837,11 +837,25 @@
#ifdef WITH_USB_VISOR
#ifdef linux
-static const char *product_names[] =
+static const char *vendor_product_ids[] =
{
- "Handspring Visor",
- "Handspring Treo",
- "Palm Handheld",
+ "Vendor=082d ProdID=0100", /* Handspring Visor/Treo 300 */
+ "Vendor=082d ProdID=0200", /* Handspring Treo */
+ "Vendor=0830 ProdID=0001", /* Palm M500 */
+ "Vendor=0830 ProdID=0002", /* Palm M505 */
+ "Vendor=0830 ProdID=0003", /* Palm M515 */
+ "Vendor=0830 ProdID=0020", /* Palm I705 */
+ "Vendor=0830 ProdID=0040", /* Palm M125 */
+ "Vendor=0830 ProdID=0050", /* Palm M130 */
+ "Vendor=0830 ProdID=0060", /* Palm Tungsten T */
+ "Vendor=0830 ProdID=0031", /* Palm Tungsten Z */
+ "Vendor=0830 ProdID=0070", /* Palm Zire */
+ "Vendor=054C ProdID=0038", /* Sony Clie 3.5 */
+ "Vendor=054C ProdID=0066", /* Sony Clie 4.0 */
+ "Vendor=054C ProdID=0095", /* Sony Clie S360 */
+ "Vendor=054C ProdID=009A", /* Sony Clie 4.1 */
+ "Vendor=054C ProdID=00DA", /* Sony Clie NX60 */
+ "Vendor=04E8 ProdID=8001", /* Samsung SCH-I330 */
NULL
};
@@ -850,6 +864,20 @@
FALSE,
TRUE,
TRUE,
+ TRUE,
+ TRUE,
+ TRUE,
+ TRUE,
+ TRUE,
+ TRUE,
+ TRUE,
+ TRUE,
+ TRUE,
+ TRUE,
+ TRUE,
+ TRUE,
+ TRUE,
+ TRUE,
-1
};
@@ -878,13 +906,13 @@
f = fopen ("/proc/bus/usb/devices", "r");
while (fgets (line, 255, f) != NULL && !visor_exists) {
- if (line[0] != 'S')
+ if (line[0] != 'P')
continue;
- for (i = 0; product_names[i] != NULL; i++) {
- if (!strncmp (line + strlen ("S: Product="),
- product_names[i],
- strlen (product_names[i]))) {
+ for (i = 0; vendor_product_ids[i] != NULL; i++) {
+ if (!strncmp (line + strlen ("P: "),
+ vendor_product_ids[i],
+ strlen (vendor_product_ids[i]))) {
visor_exists = TRUE;
visor_net = product_net[i];
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]