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

[coldsync-hackers] Palm m505, USB, FreeBSD: partial success



Hi,

I managed to get my FreeBSD-current system to talk to my m505 using
Coldsync 2.2.4 (see below for trace).

The key was to specify the protocol "simple" and then skip the
ritual_resp1, like this:

    --- coldsync-2.2.4/libpconn/netsync.c	Wed Nov  7 16:16:43 2001
    +++ ../coldsync-2.2.4/libpconn/netsync.c	Tue Nov 20 22:23:18 2001
    @@ -211,7 +211,9 @@

		case PCONN_STACK_SIMPLE:
		    inlen = ritual_resp1_size;
    -		err = netsync_read_method(pconn, &inbuf, &inlen, True);
    +		err = 0;
    +		NET_TRACE(5) printf("skipping ritual 1 response!\n");
    +/*  		err = netsync_read_method(pconn, &inbuf, &inlen, True); */
		    break;

		case PCONN_STACK_NONE:

I can now enjoy watching some protocol exchanges, e.g. "coldsync -mI",
but it still gets into a hang (read timeout) when I try to do a real
sync.  Does this ring any bells to anyone?  Maybe the protocol run by
the m505 is different than on other models?

BTW, I also had to apply this patche to coldsync-2.2.4 in order to get
it to compile:

    --- coldsync-2.2.4/libpconn/PConnection_usb.c	Mon Nov 12 06:49:09 2001
    +++ ../coldsync-2.2.4/libpconn/PConnection_usb.c	Tue Nov 20 22:14:47 2001
    @@ -453,9 +453,9 @@
		    IO_TRACE(1)
			    perror(device);

    -		if ((errno == ENOENT) && ((flags & PCONNFL_TRANSIENT) != 0))
    +		if ((errno == ENOENT) && ((flags & PCONNFL_TRANSIENT) != 0)) {
			    /* Just ignore this error */
    -		else if (errno != ENXIO) {
    +		} else if (errno != ENXIO) {
			    fprintf(stderr, _("Error: Can't open \"%s\".\n"),
				    device);
			    perror("open");
    @@ -727,7 +727,8 @@
			    slp_tini(pconn);
			    return -1;	  
		    }
    -	}
    +		break;
    +	} while(1);

	    if ((i = fcntl(pconn->fd, F_GETFL, 0))!=-1) {
		    i &= ~O_NONBLOCK;

-- 
Regards,
Georg.

============================================================
.coldsyncrc
============================================================

listen usb {                    # BSD only
        device: /home/hunter/gwk/dev/ugen0;
	protocol: simple;
}

pda {
	snum: "L0PK16716048-J";
	directory: "/home/hunter/gwk/.palm";
	username: "gwk";
	userid: 2851;
}


============================================================
Output of running ./coldsync -d io:19 -d net:19 -d misc:19 -d pdb:19
============================================================
Allocated sync_config 0x80910e0
Allocating a new 'ctypes' array.
UID: 13059, euid 13059
HOME: "/home/hunter/gwk"
Reading "/home/hunter/gwk/.coldsyncrc"
coldsync Version 2.2.4.
ColdSync Seite bei http://www.ooblick.com/software/coldsync/
Übersetzer-Optionen:
    WITH_USB: Mit USB-Unterstützung
HAVE_STRCASECMP, HAVE_STRNCASECMP: Zeichenketten werden wenn möglich
ohne Berücksichtigung von Groß-/Kleinschreibung verglichen.

Voreingestellte globale Konfigurationsdatei: /usr/local/etc/coldsync.conf
Options:
	Mode: * NONE *
	conf_fname: "/home/hunter/gwk/.coldsyncrc"
	conf_fname_given: False
	devname: (null)
	devtype: -1
	protocol: 0
	force_slow: False
	force_fast: False
	check_ROM: False
	install_first: True
	force_install: False
	use_syslog: False
	log_fname: ""

hostid == 0xac111620 (172.17.22.32)

Debugging levels:
	SLP:	0
	CMP:	0
	PADP:	0
	DLP:	0
	DLPC:	0
	PDB:	19
	SYNC:	0
	PARSE:	0
	IO:	19
	MISC:	19
Bitte starten Sie den HotSync auf dem Palm.
Device information: /home/hunter/gwk/dev/ugen0 vendor 0830 (Palm, Inc.) product 0002 (Palm Handheld) rev 1.00 addr 2
ConnectionInfo: entry 0 function Generic on port 1
ConnectionInfo: entry 1 function Hotsync on port 2
first setup 0x1 returns 2 bytes:  0x01 0x00
Hotsync endpoint name: "/home/hunter/gwk/dev/ugen0.2"
usb_accept simple/net
ritual_exch_server: receiving ritual packet 1
skipping ritual 1 response!
netsync_read(ritual resp 1) returned 0
Inside netsync_write()
Sending NetSync header (50 bytes)
NET --> 01 d1 00 00 00 32                                 | .Ñ...2
write() returned 6
Sending NetSync data
NET >>> 12 01 00 00 00 00 00 00 00 20 00 00 00 24 ff ff   | ......... ...$ÿÿ
NET >>> ff ff 3c 00 3c 00 00 00 00 00 00 00 00 00 c0 a8   | ÿÿ<.<.........À¨
NET >>> a5 1f 04 27 00 00 00 00 00 00 00 00 00 00 00 00   | ¥..'............
NET >>> 00 00                                             | ..
netsync_write(ritual stmt 2) returned 50
Inside netsync_read()
netsync_read: Reading packet header
Read 6 bytes:
NS<< 01 d1 00 00 00 32                                 | .Ñ...2
Got header: cmd 0x01, xid 0xd1, len 0x00000032
Reading packet data
<<   92 01 00 00 00 00 00 00 00 20 00 00 00 24 ff ff   | ......... ...$ÿÿ
<<   ff ff 00 3c 00 3c 40 00 00 00 01 00 00 00 00 00   | ÿÿ.<.<@.........
<<   04 00 00 00 04 00 00 3c 00 3c 00 00 00 00 00 00   | .......<.<......
<<   00 00                                             | ..
want: 50, got: 50
NET <<< 92 01 00 00 00 00 00 00 00 20 00 00 00 24 ff ff   | ......... ...$ÿÿ
NET <<< ff ff 00 3c 00 3c 40 00 00 00 01 00 00 00 00 00   | ÿÿ.<.<@.........
NET <<< 04 00 00 00 04 00 00 3c 00 3c 00 00 00 00 00 00   | .......<.<......
NET <<< 00 00                                             | ..
netsync_read returned 1
<<< 92 01 00 00 00 00 00 00 00 20 00 00 00 24 ff ff   | ......... ...$ÿÿ
<<< ff ff 00 3c 00 3c 40 00 00 00 01 00 00 00 00 00   | ÿÿ.<.<@.........
<<< 04 00 00 00 04 00 00 3c 00 3c 00 00 00 00 00 00   | .......<.<......
<<< 00 00                                             | ..
Inside netsync_write()
Sending NetSync header (46 bytes)
NET --> 01 d2 00 00 00 2e                                 | .Ò....
write() returned 6
Sending NetSync data
NET >>> 13 01 00 00 00 00 00 00 00 20 00 00 00 20 ff ff   | ......... ... ÿÿ
NET >>> ff ff 00 3c 00 3c 00 00 00 00 00 00 00 01 00 00   | ÿÿ.<.<..........
NET >>> 00 00 00 00 00 00 00 00 00 00 00 00 00 00         | ..............
netsync_write(ritual stmt 3) returned 46
Inside netsync_read()
netsync_read: Reading packet header
Read 6 bytes:
NS<< 01 d2 00 00 00 08                                 | .Ò....
Got header: cmd 0x01, xid 0xd2, len 0x00000008
Reading packet data
<<   93 00 00 00 00 00 00 00                           | ........
want: 8, got: 8
NET <<< 93 00 00 00 00 00 00 00                           | ........
netsync_read returned 1
<<< 93 00 00 00 00 00 00 00                           | ........
Looking for a PDA block.
  Also checking user info
Fetching SysInfo
Inside netsync_write()
Sending NetSync header (2 bytes)
NET --> 01 d3 00 00 00 02                                 | .Ó....
write() returned 6
Sending NetSync data
NET >>> 12 00                                             | ..
Inside netsync_read()
netsync_read: Reading packet header
Read 6 bytes:
NS<< 01 d3 00 00 00 22                                 | .Ó..."
Got header: cmd 0x01, xid 0xd3, len 0x00000022
Reading packet data
<<   92 02 00 00 20 0e 04 00 00 00 00 01 00 00 00 04   | .... ...........
<<   00 03 00 00 21 0c 00 01 00 02 00 03 00 00 00 00   | ....!...........
<<   ff e1                                             | ÿá
want: 34, got: 34
NET <<< 92 02 00 00 20 0e 04 00 00 00 00 01 00 00 00 04   | .... ...........
NET <<< 00 03 00 00 21 0c 00 01 00 02 00 03 00 00 00 00   | ....!...........
NET <<< ff e1                                             | ÿá
System info:
	ROM version: 0x04000000
	Localization: 0x00010000
	product ID: 0x00030000
	DLP version: 1.2
	Product compatibility version: 3.0
	Max. record size: 65505 (0x0000ffe1)
Inside netsync_write()
Sending NetSync header (36 bytes)
NET --> 01 d4 00 00 00 24                                 | .Ô...$
write() returned 6
Sending NetSync data
NET >>> 2d 01 0a 00 a3 40 00 00 00 00 00 00 00 00 00 04   | -...£@..........
NET >>> 01 02 00 00 01 04 00 00 00 00 00 04 73 6e 75 6d   | ............snum
NET >>> 00 02 00 00                                       | ....
Inside netsync_read()
netsync_read: Reading packet header
Read 6 bytes:
NS<< 01 d4 00 00 00 26                                 | .Ô...&
Got header: cmd 0x01, xid 0xd4, len 0x00000026
Reading packet data
<<   ad 01 00 00 00 00 00 26 00 00 00 00 10 00 80 06   | ­......&........
<<   00 04 01 02 00 0c 01 04 10 00 80 06 00 04 73 6e   | ..............sn
<<   75 6d 00 02 00 00                                 | um....
want: 38, got: 38
NET <<< ad 01 00 00 00 00 00 26 00 00 00 00 10 00 80 06   | ­......&........
NET <<< 00 04 01 02 00 0c 01 04 10 00 80 06 00 04 73 6e   | ..............sn
NET <<< 75 6d 00 02 00 00                                 | um....
Inside netsync_write()
Sending NetSync header (42 bytes)
NET --> 01 d5 00 00 00 2a                                 | .Õ...*
write() returned 6
Sending NetSync data
NET >>> 2d 01 0a 00 a0 26 00 00 00 00 00 00 00 00 00 03   | -... &..........
NET >>> 00 04 00 00 00 0c 00 04 10 00 80 06 01 0c 00 00   | ................
NET >>> 00 00 00 00 00 00 00 00 00 00                     | ..........
Inside netsync_read()
netsync_read: Reading packet header
Read 6 bytes:
NS<< 01 d5 00 00 00 2c                                 | .Õ...,
Got header: cmd 0x01, xid 0xd5, len 0x0000002c
Reading packet data
<<   ad 01 00 00 00 00 00 2c 00 00 00 00 10 02 00 90   | ­......,........
<<   00 03 00 04 00 00 00 0c 00 04 10 00 80 06 01 0c   | ................
<<   4c 30 50 4b 31 36 37 31 36 30 34 38               | L0PK16716048
want: 44, got: 44
NET <<< ad 01 00 00 00 00 00 2c 00 00 00 00 10 02 00 90   | ­......,........
NET <<< 00 03 00 04 00 00 00 0c 00 04 10 00 80 06 01 0c   | ................
NET <<< 4c 30 50 4b 31 36 37 31 36 30 34 38               | L0PK16716048
Checking PDA ""
Fetching UserInfo
Inside netsync_write()
Sending NetSync header (2 bytes)
NET --> 01 d6 00 00 00 02                                 | .Ö....
write() returned 6
Sending NetSync data
NET >>> 10 00                                             | ..
Inside netsync_read()
netsync_read: Reading packet header
Read 6 bytes:
NS<< 01 d6 00 00 00 28                                 | .Ö...(
Got header: cmd 0x01, xid 0xd6, len 0x00000028
Reading packet data
<<   90 01 00 00 20 22 00 00 0b 23 00 00 00 00 ac 11   | .... "...#....¬.
<<   16 20 07 d1 0b 14 16 11 31 00 07 d1 0b 14 16 26   | . .Ñ....1..Ñ...&
<<   31 00 04 00 67 77 6b 00                           | 1...gwk.
want: 40, got: 40
NET <<< 90 01 00 00 20 22 00 00 0b 23 00 00 00 00 ac 11   | .... "...#....¬.
NET <<< 16 20 07 d1 0b 14 16 11 31 00 07 d1 0b 14 16 26   | . .Ñ....1..Ñ...&
NET <<< 31 00 04 00 67 77 6b 00                           | 1...gwk.
User info:
	UserID: 0x00000b23
	ViewerID: 0x00000000
	Last sync PC: 0xac111620 (172.17.22.32)
	Last good sync: 22:17:49 20/11/2001
	Last sync attempt: 22:38:49 20/11/2001
	User name length: 4
	User name: "gwk"
	Password: <0 bytes>
Found a match for this PDA:
	S/N: [L0PK16716048]
	Directory: [/home/hunter/gwk/.palm]
Base directory is [/home/hunter/gwk/.palm]
Creating backup directories.
Inside mkfname()
First str == 0x808f6c0 [/home/hunter/gwk/.palm]
Appending "/home/hunter/gwk/.palm"
Now str == 0x080761ab [/backup]
Appending "/backup"
Now str == 0x00000000 [(null)]
Inside mkfname()
First str == 0x808f6c0 [/home/hunter/gwk/.palm]
Appending "/home/hunter/gwk/.palm"
Now str == 0x080761e2 [/backup/Attic]
Appending "/backup/Attic"
Now str == 0x00000000 [(null)]
Inside mkfname()
First str == 0x808f6c0 [/home/hunter/gwk/.palm]
Appending "/home/hunter/gwk/.palm"
Now str == 0x08076221 [/archive]
Appending "/archive"
Now str == 0x00000000 [(null)]
Inside mkfname()
First str == 0x808f6c0 [/home/hunter/gwk/.palm]
Appending "/home/hunter/gwk/.palm"
Now str == 0x08076263 [/install]
Appending "/install"
Now str == 0x00000000 [(null)]
Initializing conduits
Initializing preference cache
Inside palm_fetch_all_DBs
Inside netsync_write()
Sending NetSync header (6 bytes)
NET --> 01 d7 00 00 00 06                                 | .×....
write() returned 6
Sending NetSync data
NET >>> 15 01 20 02 00 00                                 | .. ...
Inside netsync_read()
netsync_read: Reading packet header
Read 6 bytes:
NS<< 01 d7 00 00 00 50                                 | .×...P
Got header: cmd 0x01, xid 0xd7, len 0x00000050
Reading packet data
<<   95 02 00 00 20 34 00 01 00 01 30 00 00 01 07 d1   | .... 4....0....Ñ
<<   04 06 0c 14 23 00 00 37 ff fc 00 80 00 00 00 54   | ....#..7ÿü.....T
<<   a3 26 08 0e 50 61 6c 6d 43 61 72 64 50 61 6c 6d   | £&..PalmCardPalm
<<   20 43 6f 6d 70 75 74 69 6e 67 21 14 01 28 00 68   |  Computing!..(.h
<<   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   | ................
want: 80, got: 80
NET <<< 95 02 00 00 20 34 00 01 00 01 30 00 00 01 07 d1   | .... 4....0....Ñ
NET <<< 04 06 0c 14 23 00 00 37 ff fc 00 80 00 00 00 54   | ....#..7ÿü.....T
NET <<< a3 26 08 0e 50 61 6c 6d 43 61 72 64 50 61 6c 6d   | £&..PalmCardPalm
NET <<< 20 43 6f 6d 70 75 74 69 6e 67 21 14 01 28 00 68   |  Computing!..(.h
NET <<< 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   | ................
===== Got memory info:
	Total size:	48
	Card number:	0
	Card version: 1 (0x01)
	Creation time: 35:20:12 6/4/2001
	ROM: 3670012 (0x37fffc)
	RAM: 8388608 (0x800000)
	Free RAM: 5546790 (0x54a326)
	Card name (8) "PalmCard"
	Manufacturer name (14) "Palm Computing"
	ROM databases: 296
	RAM databases: 104
num_cards: 1
Inside netsync_write()
Sending NetSync header (8 bytes)
NET --> 01 d8 00 00 00 08                                 | .Ø....
write() returned 6
Sending NetSync data
NET >>> 16 01 20 04 80 00 00 00                           | .. .....
Inside netsync_read()
netsync_read: Reading packet header
Read 6 bytes:
NS<< 01 d8 00 00 00 40                                 | .Ø...@
Got header: cmd 0x01, xid 0xd8, len 0x00000040
Reading packet data
usb read: Input/output error
netsync_read: read: Input/output error
Fehler: Can't fetch list of databases.
Inside netsync_write()
Sending NetSync header (6 bytes)
NET --> 01 d9 00 00 00 06                                 | .Ù....
write() returned -1
Error sending NetSync header.
Fehler: Fehler während DlpEndOfSync: (0) Kein Fehler.
Calling io_drain()
Freeing sync_config 0x80910e0
ColdSync terminating normally
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.