Overview
RemSync, or Remote Sync is a protocol used for status notifications. The device connects to the host on port 999, and the host sends notification messages in the various stages of the synchronization process.
Message Format
Name |
Size |
Description |
Argument |
2 |
Argument, meaning depending on the NotificationType field |
NotificationType |
2 |
Type of notification |
Payload |
0..n |
0 or more bytes of payload |
Notification Types
SetStatus (0x01)
Set the "current operation" label to something meaningful. For example "Notes 2/6" when synchronizing notes. This will also show the progressbar if it isn't already shown.
If the device receives $UPTODATE$ as the message, it will load string resource #2029, "Connected, up-to-date\0x00", from syncres.dll, possibly display it somewhere in the UI, and hide the progress bar.
Name |
Size |
Description |
MessageSize |
2 |
Size of zero-terminated unicode string following the next field |
NotificationType |
2 |
SetStatus (0x01) |
MessageBytes |
2..n |
A zero-terminated unicode LE16 string with the size as specified by MessageSize (which includes the terminating NUL byte) |
Examples:
0000: 02 00 01 00 00 00 ......
0000: 16 00 01 00 24 00 55 00 50 00 54 00 4f 00 44 00 ....$.U.P.T.O.D. 0010: 41 00 54 00 45 00 24 00 00 00 A.T.E.$...
Unknown_04 (0x04)
Unknown_0a (0x0a)
StartOfSync (0x5a)
Sent at the very end of the AirSync stage when starting on the RRA synchronization stage, resulting in a UI update (for instance showing the progressbar). Should be followed by SetProgressRange.
Name |
Size |
Description |
Argument |
2 |
Set to 0 |
NotificationType |
2 |
StartOfSync (0x5a) |
Example:
0000: 00 00 5a 00 ..Z.
EndOfSync (0x5b)
Sent at the end of the RRA synchronization stage, resulting in a UI update (for instance hiding the progressbar). Should be followed by SetLabelText with "$UPTODATE$".
Name |
Size |
Description |
Argument |
2 |
Set to 0 |
NotificationType |
2 |
EndOfSync (0x5b) |
Example:
0000: 00 00 5b 00 ..[.
SetProgressRange (0x5c)
Sets the progressbar range. ActiveSync sets this to [1, 1000].
Name |
Size |
Description |
Argument |
2 |
Set to 0 |
NotificationType |
2 |
SetProgressRange (0x5c) |
ProgressMin |
2 |
Progressbar min value |
ProgressMax |
2 |
Progressbar max value |
Example:
0000: 00 00 5c 00 01 00 e8 03 ..\.....
SetProgressValue (0x5d)
Sets the progressbar's progress value.
Name |
Size |
Description |
NewValue |
2 |
Set to the new progress value, within ProgressMin and ProgressMax as specified with SetProgressRange |
NotificationType |
2 |
SetProgressRange (0x5c) |
Example:
0000: a6 00 5d 00 ..].
