Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Sony Clie / Palm synchronization using hotplug (Mini howto)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
pihta
n00b
n00b


Joined: 17 Apr 2003
Posts: 6

PostPosted: Sun Nov 09, 2003 1:03 pm    Post subject: Sony Clie / Palm synchronization using hotplug (Mini howto) Reply with quote

So, in this topic I'll attempt to describe my steps to make my Sony Clie T625C automagically synchronize with desktop using hotplug then I press HotSync button on the cradle .

I'm assume that you already have working "manual" synchronization with your palm, in my case it was coldsync, which i run from command prompt after pressing HotSync button.I have usbserial and visor modules compiled into kernel.

So - for automagical synchronization we need hotplug package. Emerge it:
Code:

emerge hotplug


I had version 20030501-r2.

Next we need to put our hotplug-device's id's to linux-hotplug scripts. Press HotSync button and then your palm attempting to synchronize exec following:
Code:

cat /proc/bus/usb/devices



you'll see strings similiar to following:

Code:

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 3
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB OHCI Root Hub
S:  SerialNumber=e202d000
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms
T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  4 Spd=12  MxCh= 0
D:  Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=16 #Cfgs=  1
P:  Vendor=054c ProdID=0066 Rev= 1.00
S:  Manufacturer=Palm, Inc.
S:  Product=Palm Handheld
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:  If#= 0 Alt= 0 #EPs= 4 Cls=ff(vend.) Sub=00 Prot=00 Driver=serial
E:  Ad=81(I) Atr=02(Bulk) MxPS=  16 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS=  16 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms



We need hex-numbers after words Vendor, ProdID and Rev (btw, after Rev we have not 1, but 100, and you can see this if you press HotSync button and look into kernel log messages (tail -f /var/log/everything/current) then hotplug daemon is running(/etc/init.d/hotplug start) and not set up for palm device.You'll see messages from usbserial and visor modules about your handheld and after them - message from usb.agent that there is no bindings for some device with following attributes 54c/66/100 (in my case) )

Open /etc/hotplug/usb.usermap config file with your favorite editor and put following line (using spaces as separators):

Code:

visor 0x0030 0x054c 0x0066 0x0100 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000



I dont know what first number 0x0030 means but may be it points that its a "synchronization" action (?). So..visor word is the of name of user-mode script that will be run by hotplug daemon when hotplug action will be processed.

Next step will be writing of this user-mode script.Warning! This script is executed by kernel-level daemons so be carefull with commands.

Open /etc/hotplug/usb/visor file and write there commands that you want to be executed to syncronize your palm, in my case i write:

Code:

# sony clie hotsync
su - pihta -c 'coldsync'



It's the same command that i typed everytime when i use "manual" synchronization :)

Making this script executable..

Code:

chmod +x /etc/hotplug/usb/visor



Starting hotplug daemon:
Code:

/etc/init.d/hotplug start


Adding daemon to default runlevel:

Code:

rc-update add hotplug default



Now you can press HotSync button on the cradle and synchronization must be started using your users profile :)

That's all folks :)

Good luck and sorry me for my english ;)
Back to top
View user's profile Send private message
BWoso
l33t
l33t


Joined: 31 Dec 2003
Posts: 920
Location: Cleveland Ohio, USA

PostPosted: Thu May 13, 2004 3:01 am    Post subject: Reply with quote

A few questions. Should this line
Code:
su - pihta -c 'coldsync'
be su - username -c... or should it be as it is? If I leave it as it is I get this
Code:
root # /etc/init.d/hotplug restart
 * Stopping input hotplugging...                                                                                     [ ok ]
 * Stopping pci hotplugging...                                                                                       [ ok ]
 * Stopping usb hotplugging...                                                                                       [ ok ]
 * Starting input hotplugging...                                                                                     [ ok ]
 * Starting pci hotplugging...                                                                                       [ ok ]
 * Starting usb hotplugging...
Unknown id: pihta
If I change it I get this
Code:
root # /etc/init.d/hotplug restart
 * Stopping input hotplugging...                                                                                     [ ok ]
 * Stopping pci hotplugging...                                                                                       [ ok ]
 * Stopping usb hotplugging...                                                                                       [ ok ]
 * Starting input hotplugging...                                                                                     [ ok ]
 * Starting pci hotplugging...                                                                                       [ ok ]
 * Starting usb hotplugging...
Error: Can't look up my address.
gethostbyname: Resource temporarily unavailable
Error: Can't get host ID.
I get that if I change it to brandon, my username, or root. Any ideas?


EDIT** some more info just incase it is needed.
Code:
root # cat /proc/bus/usb/devices

T:  Bus=05 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.4-ck1 uhci_hcd
S:  Product=UHCI Host Controller
S:  SerialNumber=0000:00:10.3
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=04 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.4-ck1 uhci_hcd
S:  Product=UHCI Host Controller
S:  SerialNumber=0000:00:10.2
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.4-ck1 uhci_hcd
S:  Product=UHCI Host Controller
S:  SerialNumber=0000:00:10.1
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=03 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  4 Spd=12  MxCh= 0
D:  Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0830 ProdID=0060 Rev= 1.00
S:  Manufacturer=Palm, Inc.
S:  Product=Palm Handheld
S:  SerialNumber=PalmSN12345678
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:  If#= 0 Alt= 0 #EPs= 4 Cls=ff(vend.) Sub=00 Prot=00 Driver=usbserial
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc= 93/900 us (10%), #Int=  1, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.4-ck1 uhci_hcd
S:  Product=UHCI Host Controller
S:  SerialNumber=0000:00:10.0
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  2 Spd=1.5 MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=046d ProdID=c00c Rev=21.10
S:  Manufacturer=Logitech
S:  Product=USB Optical Mouse
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=hid
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=10ms

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 8
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.4-ck1 ehci_hcd
S:  Product=EHCI Host Controller
S:  SerialNumber=0000:00:10.4
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=256ms


I had to emerge coldsync, it didn't say to do that anywhere, but I did it anyway. And I followed everything else exactly the same, I just copied and pasted code.
_________________
I think that the forums are the greatest thing about Gentoo, thanks to everyone that posts on them!

The best way to cheer yourself up is to try to cheer somebody else up.
-Mark Twain-
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum