GNOME Bugzilla – Bug 322904
Some default settings should be changed to USB in Gnome Pilot Settings
Last modified: 2006-09-04 09:23:20 UTC
Please describe the problem: Some default settings should be changed in Cradle Settings of Gnome Pilot Settings as follows: 1. Port: usb: 2. Type: USB should be set Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Created attachment 55460 [details] [review] proposed patch It works for this bug on Solairs platform.
Version details: gnome-pilot 2.0.13 Distribution/Version: Solaris NV 22 This happen every time.
This looks like a sensible plan but there are a couple of things to check: 'usb:' is not available prior to pilot-link 0.12.0. There needs to be a check for pl-0.12.0 API before accepting this option. Also, we need to check with the pilot-link team before making this option a default... last I heard libusb support was working in most, but not all, cases and was considered somewhat experimental.
Created attachment 60952 [details] [review] proposed patch based on gnome-pilot CVS It works well on Solaris and SUSE.
Comment on attachment 60952 [details] [review] proposed patch based on gnome-pilot CVS Index: configure.in =================================================================== RCS file: /cvs/gnome/gnome-pilot/configure.in,v retrieving revision 1.202 diff -u -r1.202 configure.in --- configure.in 24 Nov 2005 13:24:41 -0000 1.202 +++ configure.in 9 Mar 2006 08:36:04 -0000 @@ -200,9 +200,11 @@ dnl Set platform specific libs and defines here dnl For defines, remember an addition to acconfig.h +dnl Set platform specific preprocessing swither case "$host" in *solaris*) LIBS="$LIBS -lnsl" + CPPFLAGS="$CPPFLAGS -DSOLARIS" ;; *linux*) AC_DEFINE(USE_XOPEN_SOURCE,,"Use XOpen Source") >Index: capplet/gnome-pilot-druid.c >=================================================================== >RCS file: /cvs/gnome/gnome-pilot/capplet/gnome-pilot-druid.c,v >retrieving revision 1.16 >diff -u -r1.16 gnome-pilot-druid.c >--- capplet/gnome-pilot-druid.c 1 Feb 2006 22:03:54 -0000 1.16 >+++ capplet/gnome-pilot-druid.c 9 Mar 2006 05:54:46 -0000 >@@ -238,6 +238,11 @@ > priv->device_speed_label = GW ("device_speed_label"); > priv->device_timeout = GW ("device_timeout_spinner"); > priv->device_usb = GW ("usb_radio"); >+ >+ #ifdef SOLARIS >+ gtk_toggle_button_set_active ((GtkToggleButton *)priv->device_usb, TRUE); >+ #endif >+ > priv->device_irda = GW ("irda_radio"); > priv->device_network = GW ("network_radio"); > >Index: capplet/util.c >=================================================================== >RCS file: /cvs/gnome/gnome-pilot/capplet/util.c,v >retrieving revision 1.20 >diff -u -r1.20 util.c >--- capplet/util.c 1 Feb 2006 22:03:55 -0000 1.20 >+++ capplet/util.c 9 Mar 2006 05:54:46 -0000 >@@ -263,9 +263,15 @@ > GPilotDevice *device = g_new0 (GPilotDevice, 1); > > device->name = next_cradle_name (state); >- device->port = g_strdup ("/dev/pilot"); >- device->speed = speedList[DEFAULT_SPEED_INDEX]; >- device->type = PILOT_DEVICE_SERIAL; >+ #ifndef SOLARIS >+ device->port = g_strdup ("/dev/pilot"); >+ device->speed = speedList[DEFAULT_SPEED_INDEX]; >+ device->type = PILOT_DEVICE_SERIAL; >+ #else >+ device->port = g_strdup ("usb:"); >+ device->speed = speedList[DEFAULT_SPEED_INDEX]; >+ device->type = PILOT_DEVICE_USB_VISOR; >+ #endif > device->timeout = 2; > > return device; >Index: capplet/gpilotd-capplet.glade >=================================================================== >RCS file: /cvs/gnome/gnome-pilot/capplet/gpilotd-capplet.glade,v >retrieving revision 1.21 >diff -u -r1.21 gpilotd-capplet.glade >--- capplet/gpilotd-capplet.glade 1 Feb 2006 22:03:55 -0000 1.21 >+++ capplet/gpilotd-capplet.glade 9 Mar 2006 05:54:46 -0000 >@@ -791,6 +791,28 @@ > </widget> > </child> > >+ <child> >+ <widget class="GtkListItem" id="convertwidget109"> >+ <property name="visible">True</property> >+ >+ <child> >+ <widget class="GtkLabel" id="convertwidget110"> >+ <property name="visible">True</property> >+ <property name="label" translatable="yes">usb:</property> >+ <property name="use_underline">False</property> >+ <property name="use_markup">False</property> >+ <property name="justify">GTK_JUSTIFY_LEFT</property> >+ <property name="wrap">False</property> >+ <property name="selectable">False</property> >+ <property name="xalign">0</property> >+ <property name="yalign">0.5</property> >+ <property name="xpad">0</property> >+ <property name="ypad">0</property> >+ </widget> >+ </child> >+ </widget> >+ </child> >+ > <child> > <widget class="GtkListItem" id="convertwidget21"> > <property name="visible">True</property> >@@ -1838,6 +1860,28 @@ > </child> > </widget> > </child> >+ >+ <child> >+ <widget class="GtkListItem" id="convertwidget127"> >+ <property name="visible">True</property> >+ >+ <child> >+ <widget class="GtkLabel" id="convertwidget128"> >+ <property name="visible">True</property> >+ <property name="label" translatable="yes">usb:</property> >+ <property name="use_underline">False</property> >+ <property name="use_markup">False</property> >+ <property name="justify">GTK_JUSTIFY_LEFT</property> >+ <property name="wrap">False</property> >+ <property name="selectable">False</property> >+ <property name="xalign">0</property> >+ <property name="yalign">0.5</property> >+ <property name="xpad">0</property> >+ <property name="ypad">0</property> >+ </widget> >+ </child> >+ </widget> >+ </child> > > <child> > <widget class="GtkListItem" id="convertwidget37">
I rewrote a patch based on previous attachment 55460 [details] [review] by adding some lines of preprocessing codes such as "#ifdef SOLARIS". I think we offer one more option to Solaris users and it won't influnce Linux users.
Thanks for your work on this one, Jerry, and pointing out that there was a problem! I hadn't realised it was actually impossible to enter 'usb:' as a device name. The capplet enforced alphanumeric characters, plus '/', and required device names to start with a '/'. I've committed the following change to CVS: If gnome-pilot is configured for pilot-link 0.12.0 API, then 'usb:' will be added as an option to the combo box, just after '/dev/pilot'. I've also changed the old '/dev/ttyS{0,1,2,3}' options to be /dev/ttyUSB{0,1} and /dev/ttyS{0,1}. I haven't used any SOLARIS specific options. I think it is premature to offer 'usb:' as a default option until pilot-link 0.12 is released and the libusb code is declared stable. When that happens, I think the 'USB' radio button should grey out the timeout and device entry areas and set 'usb:' behind the scenes. We may add a new 'USB SERIAL' radio button to enable legacy /dev/ttyUSB* syncing. So, please check out the current CVS and let me know if you have any problems. At least 'usb:' should appear as a selectable option.
Ok, I'll do a test for this bug and bug 322903 in several days. The palm devices are kept by another engineer in our team, and he is on vacation now. I'll do these tests as soon as he come back.
'usb:' does appear as a selectable option, but it deosn't work. pilot-link version: 0.12.0-pre4 gnome-pilot version: current cvs. The outputs of "/usr/libexec/gpilotd" are as below: (gpilotd:26412): gpilotd-WARNING **: Number of PDAs is configured to 0 gpilotd-Message: Watching Cradle (usb:) gpilotd-Message: corba: get_user_info(cradle=Cradle,survival=0,timeout=0) gpilotd-Message: assigned handle num 2 gpilotd-Message: setting PILOTRATE=57600 (gpilotd:26412): gpilotd-WARNING **: Unable to bind to PDA gpilotd-Message: setting PILOTRATE=57600 (gpilotd:26412): gpilotd-WARNING **: Unable to bind to PDA gpilotd-Message: setting PILOTRATE=57600
Hmmm. It "worked for me", as they say. I don't mean to be silly, but did you check that the visor module is being blacklisted, etc. etc. and that you can successfully sync using: pilot-xfer -p usb: -l Also, now that pilot-link 0.12.0 has been officially released, you should upgrade from pre4.
Where did you download pilot-link 0.12.0 from? I downloaded it from downloads.pilot-link.org/pilot-link-0.12.0.tar.gz, but it does not work after installation, that is, there is no pilot-xfer. When using pilot-link 0.12.0 pre4, pilot-xfer worked fine. I typed two commands, pilot-xfer -p usb: -l, pilot-xfer -p usb: -b $HOME/Mypilot, both of them worked fine. But usb: can not work for gnome-pilot.
To build pilot-xfer with pilot-link 0.12.0, you must use the '--enable-conduits' option when running configure. You must also use '--enable-libusb'. Check the output of 'configure' from pilot-link 0.12.0. It should confirm that libusb is enabled. Also check the output of 'configure' from gnome-pilot. It should confirm that pilot-link 0.12.0 is selected. I have just verified that usb: works fine on a suse and ubuntu based linux system, so you should be able to get this going.
It still has a small problem that it only works for root, but I think it should be the problem of pilot-link, not gnome-pilot, because pilot-xfer only works for root currently. So this bug can be colsed now. I remember building pilot-link don't need "--enabel-conduits" for 0.11.8.
Thanks, Jerry. Yes, that '--enable-conduits' caught me, too. I'm surprised they made '--disable-conduits' the default behaviour, but there you go. Shows that it's always worth reading the README :)