Android Question How to connect directly to a VB6 computer application. Smartphone has no own ip

Michael Müller Anywhere

Member
Licensed User
Longtime User
Hi,
I want to connect my smartphone with my VB6-Windows-Desktop-Application to send a status from the smartphone to the pc.
With ServerSocket and AsyncStreams there are no proplems when I use the WLAN.

Without a WLAN it doesn't work because my smartphone has no own ip.

A other (indirect) way is the librarie "HttpJob" to send a post-request to a php5-Script on a internet-web-server which includs "socket_create" and "socket_connect" and which can directly connect to my windows-desktop-app. This works.

But is there a way to connect the smartphone directly with my desktop-app to send a string from a smartphonewithout an own ip-adress ?

Regards
Michael
 

M.LAZ

Active Member
Licensed User
Longtime User
Thank you @Michael Müller so much , but you may misunderstood me , i said that i want to connect ( from smartphone to Pc ) and viceversa.
Smartphone <==> PC(Desktop).
 
Upvote 0

JTmartins

Active Member
Licensed User
Longtime User
The way I solved a similar situation is using a MYSQL database in a webserver. Then the smartphone checks its own IP periodicly and updates it in the SQL database, together with its device ID.

When the desktop aplication needs to comunicate with a particular device, user selects the device from the list of devices available, the desktop then fetches the IP address of that particular mobile device.

After that it connects to it. If an error ocurs that means that the device is no longer online, otherwise they start to comunicate and you can do whatever you want to do.

Its been working for a few days, without any problem so far.
 
Upvote 0
Top