Re[2]: [coldsync-hackers] 3.0-pre3: serial comm problems - FIXED

28 views
Skip to first unread message

sp...@yandex.ru

unread,
Dec 29, 2003, 4:08:13 PM12/29/03
to coldsync...@googlegroups.com
>> ok, other situation: i manualy disconnect usb/serial converter,
>> coldsync don't get any error.

GK> What error would you expect? coldsync should eventually timeout.

but coldsync ignore this timeout and do infinite loop:

do {
CMP_TRACE(5)
fprintf(stderr, "===== Waiting for wakeup packet\n");

err = cmp_read(pconn, &cmpp);
if (err < 0)
{
if (PConn_get_palmerrno(pconn) == PALMERR_TIMEOUT)
continue;

palm_perror("cmp_read", PConn_get_palmerrno(pconn));

return ~0;
}
} while (cmpp.type != (ubyte) CMP_TYPE_WAKEUP);

GK> Also, what kernel version are you using?

2.4.23, but i think it's not important

>> i reconnect usb/serial converter, all look ok, but file descriptor,
>> used by coldsync, is invalid and coldsync is unusable

GK> Of course the file descriptor is invalid. It's a new device. There is
GK> no way to reconnect the file descriptor to the old one.

but why don't close after timeout old descriptor and open new? i think
it's right way, but not very simple to do...

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.

sp...@yandex.ru

unread,
Dec 28, 2003, 11:32:29 AM12/28/03
to coldsync...@googlegroups.com
it's fix included to the cvs version?


today i have other problem - i use usb/serial adapter and it can
disconnect/reconnect. sometimes i get next messages from kernel:

hub.c: already running port 1 disabled by hub (EMI?), re-enabling...
usb.c: USB disconnect on device 00:0f.2-1 address 62
usb.c: USB disconnect on device 00:0f.2-1.4 address 63
ftdi_sio.c: error from flowcontrol urb
ftdi_sio.c: Error from DTR LOW urb
ftdi_sio.c: Error from RTS LOW urb
usbserial.c: FTDI 8U232AM Compatible converter now disconnected from ttyUSB0
hub.c: already running port 1 disabled by hub (EMI?), re-enabling...
hub.c: USB hub found
hub.c: 4 ports detected
hub.c: new USB device 00:0f.2-1.4, assigned address 65
usbserial.c: FTDI 8U232AM Compatible converter detected
usbserial.c: FTDI 8U232AM Compatible converter now attached to ttyUSB0 (or usb/tts/0 for devfs)

after it file descriptor for /dev/ttyUSB0 is not functional and i
can't do sync. i understand, it's not coldsync problem, but it's
possible after timeout close file descriptor and reopen it.

sp...@yandex.ru

unread,
Dec 29, 2003, 6:45:57 AM12/29/03
to coldsync...@googlegroups.com
GK> You have a flaky hub/device. Please use a powered USB hub. That's the
GK> problem, no software can fix this :)

ok, other situation: i manualy disconnect usb/serial converter,

coldsync don't get any error. i reconnect usb/serial converter, all


look ok, but file descriptor, used by coldsync, is invalid and coldsync
is unusable

This message was sent through the coldsync-hackers mailing list. To remove

Greg KH

unread,
Dec 29, 2003, 5:23:25 PM12/29/03
to coldsync...@googlegroups.com
On Tue, Dec 30, 2003 at 12:08:13AM +0300, sp...@yandex.ru wrote:
> >> ok, other situation: i manualy disconnect usb/serial converter,
> >> coldsync don't get any error.
>
> GK> What error would you expect? coldsync should eventually timeout.
>
> but coldsync ignore this timeout and do infinite loop:

Well that's a coldsync bug, not a kernel bug.

> GK> Also, what kernel version are you using?
>
> 2.4.23, but i think it's not important

It's always important when dealing with USB drivers :)

> >> i reconnect usb/serial converter, all look ok, but file descriptor,
> >> used by coldsync, is invalid and coldsync is unusable
>
> GK> Of course the file descriptor is invalid. It's a new device. There is
> GK> no way to reconnect the file descriptor to the old one.
>
> but why don't close after timeout old descriptor and open new? i think
> it's right way, but not very simple to do...

That sounds like the proper fix.

Good luck,

greg k-h

Greg KH

unread,
Dec 29, 2003, 12:50:34 PM12/29/03
to coldsync...@googlegroups.com
On Mon, Dec 29, 2003 at 02:45:57PM +0300, sp...@yandex.ru wrote:
> GK> You have a flaky hub/device. Please use a powered USB hub. That's the
> GK> problem, no software can fix this :)
>
> ok, other situation: i manualy disconnect usb/serial converter,
> coldsync don't get any error.

What error would you expect? coldsync should eventually timeout.

Also, what kernel version are you using?

> i reconnect usb/serial converter, all look ok, but file descriptor,


> used by coldsync, is invalid and coldsync is unusable

Of course the file descriptor is invalid. It's a new device. There is


no way to reconnect the file descriptor to the old one.

Sorry, but this is the way it is supposed to work.

greg k-h

Greg KH

unread,
Dec 28, 2003, 1:11:47 PM12/28/03
to coldsync...@googlegroups.com
On Sun, Dec 28, 2003 at 07:32:29PM +0300, sp...@yandex.ru wrote:
> it's fix included to the cvs version?
>
>
> today i have other problem - i use usb/serial adapter and it can
> disconnect/reconnect. sometimes i get next messages from kernel:
>
> hub.c: already running port 1 disabled by hub (EMI?), re-enabling...
> usb.c: USB disconnect on device 00:0f.2-1 address 62
> usb.c: USB disconnect on device 00:0f.2-1.4 address 63
> ftdi_sio.c: error from flowcontrol urb
> ftdi_sio.c: Error from DTR LOW urb
> ftdi_sio.c: Error from RTS LOW urb
> usbserial.c: FTDI 8U232AM Compatible converter now disconnected from ttyUSB0
> hub.c: already running port 1 disabled by hub (EMI?), re-enabling...

You have a flaky hub/device. Please use a powered USB hub. That's the


problem, no software can fix this :)

Good luck,

greg k-h

Reply all
Reply to author
Forward
0 new messages