Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

Hello everybody,

we have the following situation:

  • MobiLink (version 17) behind a firewall, only the port for the MobiLink sync is open
  • Client device with 4G connection (Android)
  • Before we trigger a sync, we would like to see if the MobiLink server is available or not.
  • Just checking the network status of the device is not good enough, sometimes the device is online but still can't reach the server

Is there a clever way built into MobiLink to check from the mobile device if we can reach the server?

Thanks for your help and best regards, Alex

asked 13 Jun '18, 08:56

Alexander%20Ilg's gravatar image

Alexander Ilg
346272739
accept rate: 50%


Both dbmlsync and UltraLite have a synchronization parameter you can use called "Ping". No data will be exchanged in the synchronization, and no changes will be made to the progress values, but the MobiLink client will connect to the ML Server and authenticate.

http://dcx.sap.com/index.html#sqla170/en/html/8270a6956ce210149fbe87a85693bed4.html

Alternatively, outside of the MobiLink client, you could simply use TCP/IP to attempt to connect to the socket where the ML Server is running. If the TCP/IP socket connect is successful, you know that you can reach the ML Server from the client and that "some" process is listening on the port where you expect the ML Server to be running. This is a cheaper option, but makes your device look a bit like a port scanner, so the firewall might get upset at you and block the device.

Reg

permanent link

answered 13 Jun '18, 09:16

Reg%20Domaratzki's gravatar image

Reg Domaratzki
7.7k343118
accept rate: 37%

1

For Android, use the UltraLiteJ SyncParms.setPingOnly(). This pings the server but does not perform a sync.

(13 Jun '18, 09:11) Chris Keating

Hello guys,

thank you for the suggestion. We tried this and it works just fine on iOS, where we get a success or failure almost instantly. On Android however it takes 75 seconds for the ping to return in case the server can not be reached.

Setting the timout parameter does not change this.

Are we doing something wrong or is there a bug with the Android implementation?

Thanks and best regards, Alex

(18 Jun '18, 07:18) Alexander Ilg
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×371
×17

question asked: 13 Jun '18, 08:56

question was seen: 1,359 times

last updated: 18 Jun '18, 07:18