<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Tom Moertel's Weblog: Tag usb</title>
    <link>http://blog.moertel.com/articles/tag/usb?tag=usb</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Quality rants on programming theory and stuff geeks like</description>
    <item>
      <title>How to hotsync the Palm Centro with a Fedora 7 Linux desktop via USB</title>
      <description>&lt;p&gt;I just got a Palm Centro smartphone, and I love it. Getting it to sync
with my Linux workstation, however, was tricky, so I&amp;#8217;m posting this
recipe in hopes that it might save you some time.&lt;/p&gt;


	&lt;p&gt;The &amp;#8220;visor&amp;#8221; kernel driver is supposed to make compatible Palm
handhelds look like serial devices when attached via a &lt;span class="caps"&gt;USB&lt;/span&gt; cable.  For
me, it didn&amp;#8217;t work.  Instead, I had to blacklist the driver and
then use libusb to talk to the Centro.  Here&amp;#8217;s the recipe:&lt;/p&gt;


	&lt;p&gt;First, blacklist the &amp;#8220;visor&amp;#8221; kernel driver:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;# echo blacklist visor &amp;gt;&amp;gt; /etc/modprobe.conf
# modprobe -qr visor
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Second, make sure libusb is installed:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;# yum install libusb
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Third, edit the system&amp;#8217;s udev rules to make sure your user account can
access the device files used to talk to the Centro.  On my Fedora 7
setup, I found the right rule in /etc/udev/rules.d/50-udev.rules:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;ACTION=="add", SUBSYSTEM=="usb_endpoint", \
ATTR{bEndpointAddress}=="?*", ATTRS{devnum}=="?*", ATTRS{busnum}=="?*", \
NAME="bus/usb/$attr{busnum}/$attr{devnum}_ep/$attr{bEndpointAddress}", \
MODE="0644", SYMLINK+="%k" 
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;I edited the last line of the rule, changing the mode to 0664 and adding
a &lt;span class="caps"&gt;GROUP&lt;/span&gt; key to assign the Centro devices to my exclusive user group:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;MODE="0664", SYMLINK+="%k", GROUP="thor" 
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;This change lets my account talk to the Centro without having to
take on root privileges. (For bonus points you could set up a more-specific rule to match just your Centro. The rule above, as is, will actually match other devices, too.)&lt;/p&gt;


	&lt;p&gt;Fourth, tell udev to reload the rules:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;# udevcontrol reload_rules
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Finally, set up a Palm-device connection via gnome-pilot.  Be sure to
select &lt;span class="caps"&gt;USB&lt;/span&gt; for the Type and &amp;#8220;usb:&amp;#8221; from the Device drop-down list.&lt;/p&gt;


	&lt;p&gt;That&amp;#8217;s it.  If you&amp;#8217;re lucky like me, you should now be ready to
hotsync your Palm Centro!&lt;/p&gt;


&lt;div class="update"&gt;

	&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Even better, &lt;a href="http://howto.pilot-link.org/bluesync/index.html"&gt;this handy &lt;span class="caps"&gt;HOWTO&lt;/span&gt;&lt;/a&gt; shows you to
sync via Bluetooth, which is more convenient than hooking up a &lt;span class="caps"&gt;USB&lt;/span&gt;
cable.  I&amp;#8217;m now using this method.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Update 2:&lt;/strong&gt; If you want to use &lt;span class="caps"&gt;USB&lt;/span&gt; to hotsync your Centro, there is a
method that&amp;#8217;s more convenient than setting up udev rules.  Just create a perms file for
pam_console_apply that tells it to give the console user permission to
access your Centro.  To do so, create a file
/etc/security/console.perms.d/60-libpisock.perms and put the following in it:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;&amp;lt;libpisock&amp;gt;=/dev/usbdev* /dev/bus/usb/[0-9]*/[0-9]*
&amp;lt;console&amp;gt; 0644 &amp;lt;libpisock&amp;gt; 0644 root
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;That&amp;#8217;s it. (You&amp;#8217;ll still need to use libusb.)&lt;/p&gt;


&lt;/div&gt;</description>
      <pubDate>Wed, 31 Oct 2007 00:35:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:32b55049-6f05-4eae-8d46-3c1c350afa4f</guid>
      <author>Tom Moertel</author>
      <link>http://blog.moertel.com/articles/2007/10/31/how-to-hotsync-the-palm-centro-with-a-fedora-7-linux-desktop-via-usb</link>
      <category>linux</category>
      <category>linux</category>
      <category>fedora</category>
      <category>palm</category>
      <category>centro</category>
      <category>hotsync</category>
      <category>usb</category>
      <trackback:ping>http://blog.moertel.com/articles/trackback/608</trackback:ping>
    </item>
  </channel>
</rss>
