Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.0 » MobiLink - Server-Initiated Synchronization » Setting up server-initiated synchronization » Device tracking

 

Using device tracking with Listeners that don't support it

You cannot use the completely automatic form of device tracking if any of your Listeners have the following characteristics:

  • are prior to Adaptive Server Anywhere 9.0.1 or are Palm Listeners

    For information about how to set up device tracking in these situations, see Manually setting up device tracking.

  • are listening on UDP, and remote IP addresses are unreachable from the MobiLink server machine

    For information about how to deal with this situation, see Unreachable addresses.

Manually setting up device tracking

Several stored procedures are provided to help you manually set up device tracking for 9.0.0 Listeners or Palm Listeners. These stored procedures manipulate the MobiLink system tables ml_device, ml_device_address, and ml_listening on the consolidated database. With manual device tracking, you can address recipients by MobiLink user name—without providing network address information—but the information cannot be automatically updated by MobiLink if it changes: you must change it yourself.

This method is especially useful for SMTP gateways because email addresses don't tend to change. For UDP gateways, it is more difficult to rely on static entries if your IP address changes every time you reconnect. You may get around this problem by addressing by host name instead of IP address, but in that case slow updates to DNS server tables can cause misdirected messages. You can also deal with changing IP addresses by setting up the following stored procedures to update the MobiLink system tables programmatically.

To manually set up device tracking for 9.0.0 Listeners or Palm Listeners

  1. For each remote device, add a device record to the ml_device MobiLink system table. For example,

    call ml_set_device(
     'myFirstTreo180', 
     'MobiLink Listeners for Treo 180 - 9.0.1 Palm Listener',
     '1', 
     'not used', 
     'y', 
     'manually entered by administrator' );

    The first parameter, myFirstTreo180, is a user-defined unique device name. The second parameter contains optional remarks about the Listener version. The third parameter, set here to 1, specifies a Listener version; use 0 for Listeners from SQL Anywhere 9.0.0, 1 for post-9.0.0 Palm Listeners, and 2 for post-9.0.0 Windows Listeners. The fourth parameter specifies optional device information. The fifth parameter is set to y here, which specifies that device tracking should be ignored; if this were set to n, device tracking would overwrite this record. The final parameter contains optional remarks on the source of this record.

    See ml_set_device.

  2. For each device that you just added, add an address record to the ml_device_address MobiLink system table. For example,

    call ml_set_device_address(
     'myFirstTreo180', 
     'ROGERS AT&T',  
     '3211234567', 
     'y', 
     'y',
     'manually entered by administrator' );

    The first parameter, myFristTreo180, is a user-defined unique device name. The second parameter is a network provider ID, and must match a carrier's network_provider_id property. (See network_provider_id property.) The third parameter is an IP address for UDP or the phone number of your SMS-capable device. The fourth parameter, set here to y, activates this record for sending notifications. The fifth parameter, set here to y, specifies that device tracking should be ignored; if this were set to n, device tracking could overwrite this record. The final parameter contains optional remarks on the source of this record.

    For information about how to locate carrier information, see Device tracking.

    For more information about using ml_set_device_address, see ml_set_device_address.

  3. For each remote database, add a recipient record to the ml_listening MobiLink system table for the device that was just added. This maps the device to the MobiLink user name. For example,

    call ml_set_listening(
     'myULDB',
     'myFirstTreo180',
     'y',
     'y',
     'manually entered by administrator' );

    The first parameter is a MobiLink user name. The second parameter is a user-defined unique device name. The third parameter, set here to y, activates this record for device tracking addressing. The fourth parameter, set here to y, specifies that device tracking should be ignored; if this were set to n, device tracking could overwrite this record. The final parameter contains optional remarks on the source of this record.

    See ml_set_listening.