Android Question Socket1 can't work on windows 8.1 but its ok with 7 & XP

mbatgr

Active Member
Licensed User
Longtime User
Hi members,
I have this simple code which seems to work ok all the time until now
but trying on windows 8.1 can't conenect to the server (VB6 application)
I disabled firewall (ESET) and allow on windows firewall Portable Media Devices
but still nothing...
Any help appreciated!
mike

Sub btnConnect_Click

txtServerIp.Text="172.20.10.3"
port=5000

SelectCasebtnConnect.Text

Case"Connect"
Socket1.Initialize("Socket1")
Socket1.Connect(txtServerIp.text,port,15000)

Case"Disconnect"
Socket1.Close
ExitApplication

CaseElse

EndSelect
End Sub




Sub Socket1_Connected(Connected As Boolean) As Boolean

If Connected = True Then
ToastMessageShow("Connected",True)
btnConnect.Text = "Disconnect"
AStreams.Initialize(Socket1.InputStream,Socket1.OutputStream,"Astreams")
EndIf


End Sub
 

mbatgr

Active Member
Licensed User
Longtime User
I will use it just not remembering the [ode] (i used spaces).
Using VB6 Server I found I get that computer's IP is 192.168.43.1
Here is the view (if any information given, leopardise my PC's security , please delete them)

** Activity (main) Create, isFirst = true **

192.168.43.1
9000
anywheresoftware.b4a.objects.SocketWrapper@41f17128
(ErrnoException) libcore.io.ErrnoException: isConnected failed: EHOSTUNREACH (No route to host)

using the ipconfig
Ethernet adapter Ethernet:

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::30fe:29:3
IPv4 Address. . . . . . . . . . . : 192.168.1.184
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1

Ethernet adapter VMware Network Adapter VMnet1:

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::7c6a:9cd8
IPv4 Address. . . . . . . . . . . : 192.168.223.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :

Ethernet adapter VMware Network Adapter VMnet8:

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::ad7e:36da
IPv4 Address. . . . . . . . . . . : 192.168.43.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :

I'm sure that the problem is related to Windows 8.1 settings but don't know what to do in order to make it work. I use on the same PC the VMWare running windows7 and all things works ok (on WIndows 7, the Server's IP is 192.168.1.196)
 
Upvote 0

canalrun

Well-Known Member
Licensed User
Longtime User
Hello,
I'm watching this thread with interest. If you find a solution please let us know.

I had a slightly similar problem recently – there are many differences but I bet the solution is somewhat related.

On a new Windows 7 computer using B4J my app connected via the net to a third-party Web server. It didn't connect properly on my new computer. I posted the question, Erel replied: "Works for me!"

I tried the same B4J program on an older, heavily used, Windows 7 computer and it worked.

There must be something about my network configuration on the new Windows 7 computer that causes this error. I'll bet it might be similar to your Windows 8 problem.

Barry.
 
Upvote 0

KMatle

Expert
Licensed User
Longtime User
Hi,

no probs so far on my WIN8.1 64Bit.

Could you upload both? I would test it on my machine @home.

Question: What is this address good for: 192.168.43.1? I would have expected 192.168.1.43...

As I have understood this, the subnet mask must be 255.255.0.0 in that case? 255.255.255.0 would filter it (254 possible addresses)? Probably I'm wrong...
 
Last edited:
Upvote 0

sorex

Expert
Licensed User
Longtime User
Did you try all 3 ip addressess?

That echo tool might only bind to 1 IP address.

Temp. dissable the 2 vmware nics so that the tool grabs the 1.x address,
enable nics again and give it another try.

Klaus: you are right, the mask might need to be modified to reach the other subnet. But as traffic comes in in this case it shouldn't matter I guess.

on the other hand, if the phone/tablet is in the .1.x range it will never reach the 43.x one unless you change DHCP settings.
 
Last edited:
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
@mbatgr Your computers ip is 192.168.1.184, not 192.168.43.1 (That´s from VMware-Machine (possbly an emulator?))
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
it's the vmware host nics used for bridge and other modes.

it seems that the echo tool is grabbing its IP from one of these 2.
 
Upvote 0
Top