jmon Well-Known Member Licensed User Longtime User Oct 31, 2016 #1 When connecting with b4j-bridge to my raspberry pi, I end up with an unexpected behavior: My RPI ip address is "192.168.1.39", but running this code on the RPI with b4j-bridge: Code: Copy Dim local As ServerSocket local.Initialize(1, "") Dim Host As String = local.GetMyIP '= Host = "192.168.1.37" returns "192.168.1.37", which is actually the IP address of my windows computer that runs B4J. In my test, it seems that GetMyIp returns the ip of the B4J running the bridge, and not RPI's IP. Is it normal? Is there a workaround? Jmon I tried this code: https://www.b4x.com/android/forum/threads/serversocket-getmyip-returns-wrong-ip.60071/#post-379128 but didn't work with B4J
When connecting with b4j-bridge to my raspberry pi, I end up with an unexpected behavior: My RPI ip address is "192.168.1.39", but running this code on the RPI with b4j-bridge: Code: Copy Dim local As ServerSocket local.Initialize(1, "") Dim Host As String = local.GetMyIP '= Host = "192.168.1.37" returns "192.168.1.37", which is actually the IP address of my windows computer that runs B4J. In my test, it seems that GetMyIp returns the ip of the B4J running the bridge, and not RPI's IP. Is it normal? Is there a workaround? Jmon I tried this code: https://www.b4x.com/android/forum/threads/serversocket-getmyip-returns-wrong-ip.60071/#post-379128 but didn't work with B4J
jmon Well-Known Member Licensed User Longtime User Oct 31, 2016 #2 Ok, found out the problem, b4j-bridge was disconnected ! My bad... Upvote 0