--- Begin Message ---
- To: pilot-unix@xxxxxxxxxxxxxx
- Subject: [Pilot-Unix] Anyone using pi-port for "network" sync?
- From: Rik Harris <Rik.Harris@xxxxxxxxxxxxxx>
- Date: Sat, 18 Apr 1998 19:59:03 +1000
- Bestservhost: lists.best.com
- Sender: pilot-unix-errors@xxxxxxxxxxxxxx
Kenneth and all,
I've been playing with pi-port from the pilot-link kit to do a kind of
network sync. I had some problems getting it going and had to make
some mods to pi-port.c (changing various packet offsets, etc). Is anyone
else using pi-port? Have I broken something that worked by making these
changes? I've learnt an awful lot about the pilot comms stack :-)
On the system which the pilot is plugged into, I use:
pi-port /dev/tty0p0 2> /dev/null
and on the system which I want to sync with, I use (eg):
pilot-xfer :192.168.24.11 -l
Is this the way pi-port was intended to be used? I've done a backup
with pilot-xfer -b, and a SyncCM with pilotmgr. I've also got it
working through an SSH tunnel. I've got pi-port running under HPUX 10.20
and pilot-xfer running on both the HPUX machine or under Solaris
2.6. I have had some problems if the serial speed is greater than 9600
or if I've got too much debugging output.
Also, there appears to be more recoverability in the SLP protocol than
is being used in pilot-link. Is this true?
Thanks Kenneth, and everyone else, for all the work put into pilot-link.
Anyway, here are my changes:
*** pilot-link.0.8.11/pi-port.c Fri Sep 12 04:09:52 1997
--- pilot-link.0.8.11.mod/pi-port.c Sat Apr 18 11:51:17 1998
***************
*** 30,35 ****
--- 30,36 ----
void do_read(struct pi_socket * ps, int type, char * buffer, int length)
{
+ int len;
fprintf(stderr, "A %d byte packet of type %d has been received from the network\n", length, type);
dumpdata(buffer, length);
if (type == 0 ) {
***************
*** 39,48 ****
nskb->source = buffer[0];
nskb->dest = buffer[1];
nskb->type = buffer[2];
! nskb->id = buffer[3];
! memcpy(&nskb->data[10], buffer+4, length-4);
! slp_tx(ps, nskb, length-4);
} else if (type == 1 ) {
--- 40,50 ----
nskb->source = buffer[0];
nskb->dest = buffer[1];
nskb->type = buffer[2];
! len=get_short(buffer+3);
! nskb->id = buffer[5];
! memcpy(&nskb->data[10], buffer+7, len);
! slp_tx(ps, nskb, len);
} else if (type == 1 ) {
***************
*** 161,167 ****
int blen;
while(l >= 4 && (l >= (blen = get_short(buffer+2))+4 )) {
fprintf(stderr, "l = %d, blen = %d\n", l, blen);
! do_read(ps, get_short(buffer),buffer+4,blen);
l = l-blen-4;
if (l>blen) {
memmove(buffer,buffer+4+blen,l);
--- 163,169 ----
int blen;
while(l >= 4 && (l >= (blen = get_short(buffer+2))+4 )) {
fprintf(stderr, "l = %d, blen = %d\n", l, blen);
! do_read(ps, get_short(buffer),buffer+7,blen);
l = l-blen-4;
if (l>blen) {
memmove(buffer,buffer+4+blen,l);
thanks,
rik.
--
Rik Harris - Senior Consultant /\ The Fulcrum Consulting Group
rik.harris@xxxxxxxxxxxxxx +61-3-9621-2100 /\O\ Professional services for
12/10-16 Queen St, Melbourne VIC 3000, / /\ operation of a networked
Australia. Fax +61-3-9621-2724 /o | \ computing environment
--- End Message ---