[coldsync-hackers] usb syncronisation troubles

2 views
Skip to first unread message

sp...@yandex.ru

unread,
Nov 25, 2003, 2:24:03 PM11/25/03
to coldsync...@googlegroups.com
hi

i need do sync several palmos devices via usb with one linux box.
i use coldsync and lastest 2.4 kernel

coldsync can use two ways - use usbserial support in kernel or use
libusb library.

and i have some troubles ;)
largest is - coldsync can't get serial number from palmos5 devices.
but i can see tungsten t serial number in lsusb output. it's any other
way to get it???
second - i can't do 2 or more syncs at one time

i see coldsync and visor.c code and can rewrite it, but what way (use
libusb or use visor kernel module) is best?

1. using kernel visor module
- today two sync at one time don't work properly

IMHO it's not very hard to fix it

- i don't know how get serial number using only palmos hotsync
protocol (may be i stupid?)
- ttyUSBxx enumeration is not very good. every new serial device get
lowest free number, most palmos devices use two numbers (some use
first for hotsync, some second).
it's impossible say is this device file used by palm hotsync or other
palm function or by other (non-palmos) device.

i think it's possible create file in /proc filesystem with information
about connected serial devices. for palmos devices this information
can include palm serial number and function of every ttyUSBx device.

but for this solution need do linux-specific changes in coldsync (and
others) programs. other trouble - it's big code change and may be not
included (or included after large time) to standart linux kernel.
if i want do kernel update i need merge this changes.

2. use libusb
- today libusb code in coldsync is old. i try it with tungsten t - it
don't work. after quick and dirty hack i can do hostsync, but it work
not very stable. it's more work to do here.
- theoretically kernel module must be faster (libusb is blocking)
- libusb can't work if visor module is loaded (and hotplug try load
it every time palmos device is connected). it's problem not for me,
but for other users.
- visor kernel module always is updated for support lastest devices,
work stable.


may be exist other solution? how about hotplug subsystem - can it
collect information about device and call coldsync with right options?

ps: sorry, my english is very bad. i try learn it but have no free
time. i can read without problem, but write or speak is too hard for
me ;(((

pps: i can't use cvs.coldsync.org:
cvs [update aborted]: connect to cvs.coldsync.org(62.152.125.84):2401 failed: Connection refused

This message was sent through the coldsync-hackers mailing list. To remove
yourself from this mailing list, send a message to majo...@thedotin.net
with the words "unsubscribe coldsync-hackers" in the message body. For more
information on Coldsync, send mail to coldsync-ha...@thedotin.net.

Alessandro Zummo

unread,
Nov 26, 2003, 1:41:43 PM11/26/03
to coldsync...@googlegroups.com
On Tue, 25 Nov 2003 22:24:03 +0300
sp...@yandex.ru wrote:

> and i have some troubles ;)
> largest is - coldsync can't get serial number from palmos5 devices.
> but i can see tungsten t serial number in lsusb output. it's any other
> way to get it???
> second - i can't do 2 or more syncs at one time
>
> i see coldsync and visor.c code and can rewrite it, but what way (use
> libusb or use visor kernel module) is best?

libusb, when i tested it, was faster, don't know which is "best".


> 1. using kernel visor module
> - today two sync at one time don't work properly
>
> IMHO it's not very hard to fix it

Never tried, i thought it would have worked. Can you explain?



> - i don't know how get serial number using only palmos hotsync
> protocol (may be i stupid?)

no, you arent ;) PalmOS 5.0 doesn't support reading the serial number
in the old way.

Basically, the USB layer can get the serial number. We must implement
a way to pass this information to the upper layer in the coldsync
communication stack.

For example, we could implement an ioctl toward the USB layer implemented
by libusb.


> but for this solution need do linux-specific changes in coldsync (and
> others) programs. other trouble - it's big code change and may be not
> included (or included after large time) to standart linux kernel.
> if i want do kernel update i need merge this changes.

I agree.


> 2. use libusb
> - today libusb code in coldsync is old. i try it with tungsten t - it
> don't work. after quick and dirty hack i can do hostsync, but it work
> not very stable. it's more work to do here.
> - theoretically kernel module must be faster (libusb is blocking)
> - libusb can't work if visor module is loaded (and hotplug try load
> it every time palmos device is connected). it's problem not for me,
> but for other users.
> - visor kernel module always is updated for support lastest devices,
> work stable.
>
>
> may be exist other solution? how about hotplug subsystem - can it
> collect information about device and call coldsync with right options?

technically it should. I would choice to implement the changes you described
in the libusb code. I've not so much spare time left but will help try to help
you or, at least, do some testing.


> pps: i can't use cvs.coldsync.org:
> cvs [update aborted]: connect to cvs.coldsync.org(62.152.125.84):2401 failed: Connection refused

We have a little problem with the server. should be up and running tomorrow.


--

Best regards,

Alessandro Zummo,
Tower Technologies - Turin, Italy

http://www.towertech.it

sp...@yandex.ru

unread,
Nov 27, 2003, 5:12:26 AM11/27/03
to coldsync...@googlegroups.com
>> and i have some troubles ;)
>> largest is - coldsync can't get serial number from palmos5 devices.
>> but i can see tungsten t serial number in lsusb output. it's any other
>> way to get it???
>> second - i can't do 2 or more syncs at one time
>>
>> i see coldsync and visor.c code and can rewrite it, but what way (use
>> libusb or use visor kernel module) is best?

AZ> libusb, when i tested it, was faster, don't know which is "best".

it's very complex ;)
i try select stable, standart (compatible), fast, easy to support
solution

>> 1. using kernel visor module
>> - today two sync at one time don't work properly
>>
>> IMHO it's not very hard to fix it

AZ> Never tried, i thought it would have worked. Can you explain?

i think trouble is in kernel visor module

>> - i don't know how get serial number using only palmos hotsync
>> protocol (may be i stupid?)

AZ> no, you arent ;) PalmOS 5.0 doesn't support reading the serial number
AZ> in the old way.

AZ> Basically, the USB layer can get the serial number. We must implement
AZ> a way to pass this information to the upper layer in the coldsync
AZ> communication stack.

AZ> For example, we could implement an ioctl toward the USB layer implemented
AZ> by libusb.

it's one trouble here
if at one time several palms are connected to computer how get
correspondence usb device with /dev/ttyUSBx device file?
only kernel know about it and i think kernel changes must be done

>> may be exist other solution? how about hotplug subsystem - can it
>> collect information about device and call coldsync with right options?

AZ> technically it should.

again - afaik hotpulg don't know about ttyUSBx device

Greg KH

unread,
Dec 1, 2003, 7:02:29 PM12/1/03
to coldsync...@googlegroups.com
On Thu, Nov 27, 2003 at 01:12:26PM +0300, sp...@yandex.ru wrote:
> >> may be exist other solution? how about hotplug subsystem - can it
> >> collect information about device and call coldsync with right options?
>
> AZ> technically it should.
>
> again - afaik hotpulg don't know about ttyUSBx device

In 2.6 it does.

greg k-h

Reply all
Reply to author
Forward
0 new messages