Synching two Palms with IR or Bluetooth

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Synching two Palms with IR or Bluetooth

walsjs1
I have a plua application that keeps track of pregnant patients in the
hospital.  A colleague works with me and hopes to run the same app.
Thus we would need to sync em.

Can someone walk me through, or get me started, on how to do so with
IR or Bluetooth?  I have seen the snippets on the Serial Manager, but
I don't see any comment on making sure the two Palms are talking to
each other (handshaking?)

Serial programming is new to me.  I appreciate any direction.

Thanks,
Jim W





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/plua/

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply | Threaded
Open this post in threaded view
|

RE: Synching two Palms with IR or Bluetooth

Emil Tchekov-3
Hi,


> how to do so with
> IR or Bluetooth?

I have no experience with Blutooth, but the IR /
Serial connection is very easy to use...

I was able to write simple programm that exchanges
data with Desktop PC in no time, so think there will
be not hard to make the same between 2 palms using IR.

But there will be a lot to do in your particular
case...


I can imagine following scenario:

1) Both Palms are in contact, both user are running
the same programm
2) You have IR Port opened (as unified IO - files with
random access) on the both devices, the main event
loop contains routine to handle IR/serial events.
3) User 1 chooses "SYNC" from the UI. The programm
sends invitation to the other device in form of string
"SYNC"
4) Device 2 receives "SYNC\" and the event loop jumps
to the code that handles this events -
5) Subroutine evaluates the string and evtl. asks the
User if he wants to sync. After OK:
6) Device 2 begins to send data:
Sth. like this

START\

UID\xxxxxxxxx\
PATIENT\xxxxxx xxxxxx\- name
AGE\xx\
WEEK\xx\
PARTUS\x\
MEDICATION\xxxxxx\
etc.

XXXX - 2nd. Dataset

YYYY -3rd Dataset

etc.

END\

Take care of the "\" (you can use any other char that
is never in your user data)
The reciving device waits for incomming bytes after
sending the "SYNC" string.

Each char received is stored in a buffer var until "\"
is recevied. After that, the subroutine decides what
to do with the stored data in the buffer var - check
for expected "codeword" one of "AGE", "PATIENT" etc. -
(what you have defined) or go to the other subroutine
that stores the receved data into a buffer DB.

5) After Receiving the whole DB from the other Device
("END\" Received). The Sync routine starts to compare
the Existing with the Received Data and to Save the
Result as new DB.

You must decide wich criteria(s) the programm has to
follow on comparing and storing - this is not easy and
you have sensible data (Medication - your decision or
the decision from your colleague?)

6) The new updated DB is ready - the old DB and the
buffer DB must be removed (archived?)

7) The new DB has to be send to the other device -
same way but with other start/end commands ("STARTR"
"ENDR" as example) so the reciving side does not
compare, but just save the data.


I hope this idea will help you... (but there many
other - and the most of them are surelly better - ways
to do this)

Best Regards

Emil Tchekov


       

       
               
___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/plua/

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/