[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[coldsync-hackers] linux, usb, palmos 4.0, 4.1



i  need to sync several palmos 4.0 and palmos 4.1 devices with linux box via
usb.
palmos 4.0 devices (sony clie 320, palm m500) works with protocol 'serial',
palmos4.1 devices (palm m500 with upgraded palmos, i think all other) with
protocol 'net'.

i make quirk patch to libpconn/netsync.c from cvs tree and now 'net'
protocol work (as i think) with any palmos4.x device

diff -r1.22 netsync.c
225a226
>   inlen = ritual_resp1_size;
492a494,495
>  got=0;
>
539,547c542,550
<   hdr.xid = get_ubyte(&rptr);
<   hdr.len = get_udword(&rptr);
<
<   /* If we have initiated the connection, we must use the
<    * server provided XID in our packets
<    */
<
<   if (pconn->whosonfirst)
<    pconn->net.xid = hdr.xid;
---
>   if (hdr.cmd==1) {
>        hdr.xid = get_ubyte(&rptr);
>    hdr.len = get_udword(&rptr);
>    /* If we have initiated the connection, we must use the
>     * server provided XID in our packets
>     */
>
>    if (pconn->whosonfirst)
>     pconn->net.xid = hdr.xid;
549,554c552,565
<
<   NET_TRACE(5)
<    fprintf(stderr,
<     "Got header: cmd 0x%02x, xid 0x%02x, "
<     "len 0x%08lx\n",
<     hdr.cmd, hdr.xid, hdr.len);
---
>
>    NET_TRACE(5)
>     fprintf(stderr,
>      "Got header: cmd 0x%02x, xid 0x%02x, "
>      "len 0x%08lx\n",
>      hdr.cmd, hdr.xid, hdr.len);
>
>   } else {
>        hdr.cmd = 1;
>        hdr.len = *len;
>    got=NETSYNC_HDR_LEN;
>    NET_TRACE(3)
>     fprintf(stderr, "netsync_read: header loss workaround\n");
>   }
575c586,589
<  got = 0;
---
>
>  if (got)
>   memcpy(pconn->net.inbuf, hdr_buf, got);
>

ps: sorry, my english is bad



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