Can't connect to laptop webserver after tethering to android phone - android

Searched several threads and I'm still having issues. I've tethered my laptop to my mobile phone and I'm using the data on it. I checked the IP address assigned to my laptop and made sure I'm using it, set up the apache webserver to listen on a port (no IP specified). And I can't connect from my mobile phone to my laptop web server.
Using localhost in laptop web browser works but it won't work if I use the IP specified by the android device after I tether. Also can't connect to laptop webserver from phone's mobile browser either.
Why can't I connect to my local webserver on my laptop from my mobile phone?
I've tethered both with USB and mobile hotspot and successfully shared the internet connection, but using ipconfig from the command prompt in windows I never can connect using that IP http://:3128/ 3128 is the port I have apache listening on (because I had IIS before too). Never works.

Related

WAMP server: change wireless SSID and server not reachable

This is a really strange thing.
I got a working WAMP server on my laptop, installed Laravel and a web application available to my clients on the local wireless network. Everything is working flawlessy. I can communicate between my android app via the wireless AP TP-Link to the WAMP server. No need of internet, this is a LAN just for devices behind.
Now, I decide to change the SSID of the AP. Change from "Zapp" to "Polls".
Restart everything: AP, laptop, mobile phone. The server is not more reachable by my mobile phone.
I can ping the IP address using a terminal app, but I can't access to it anymore. This, just changing the SSID. If I revert to "Zapp" SSID, everything work again.
I checked IP's: the change of SSID not change IP's of clients.
Could anyone explain and help?
Technical devices:
AP: TP-LINK TL-WR841R
Server WAMP v. 3.0.6 on a Toshiba Laptop
Android Phone OS 7.1 OnePlus3
Check Windows firewall profile. It might classify the network with the other SSID as Public and ports are not opened?

How to connect to a local server using windows hosted network

I am programming an Android app which connects to a TCP server running on my computer using sockets. This works perfectly fine as long as both my computer and my smartphone are connected to the Wi-Fi of my router.
I want it to also work when my computer and my phone are not connected to the Wi-Fi. Therefore I configured a Wi-Fi hotspot using hosted network on my computer. My smartphone recognizes the Wi-Fi and is able to connect to it. But now my app can't connect to the server running on my PC although I changed the code to the new IP that I got by using ipconfig on my PC.
I downloaded an app named "Fing" from the Google play store. The app shows all devices in a network. It does show my computer under the right IP address. I don't understand why my app can't connect to the server running on the PC.
On the one hand, I don't think that the problem is in the app's code, because it works on the router's Wi-Fi network. On the other hand, I doesn't seem to be a setup mistake either, because Fing is detecting my PC.
Do you have any ideas what the problem might be, or any other solution for my needs?
I actually wrote the TCP server myself using c#. I configured the Server to listen to all of my computers networkinterfaces usingIPAdress.IPv6Any. I also did configure it as dual mode socket so it can accept ipv4 and ipv6 connections. I will post the code when i am back home. So the TCP server also looks ok to me.

Connecting to Localy hosted MAMP webserver on OS X

I'm running an Apache and MySQL server on my MacBook for testing purposes and pursonal usage.
But when i try to connect via my Android phone, i get 'Connection Refused'
I am not surfing to localhost, but the local IP address of my macbook.
I've disabled my firewall (even if httpd,.. mamp services are allowed), same result
Changed port number, same result
I used to run a webserver on a Windows pc and raspberry pi, never had an issue, just browse to the IP address of the hosting device.. But it looks like OS X isn't allowing it
I've searched this forum a bit, but most problems were that people are browsing to localhost or trying to access it from outside the local network, couldn't really find a solution.
Step by step what i did:
1. Started Apache & MySQL services
2. Got the IP Address via ifconfig
(0). Disabled Firewall
(0). Created a virtual host
3. Browsed to the IP on my Android

Using Socket to connect to Server in Pc from mobile

I wrote an app to connect to java server running in PC. It works fine in emulator but its not working when i try the same from my mobile. I used the Mobiles 3G network to connect to IP address.
(Based on question comment)
I assume that your server application is running on the same machine as the android emulator. In this case the emulator can reach your server with 10.0.2.2.
If you're trying to contact your server via mobile 3G you have to use the IP of your Internet connection (What is my IP?). The request will reach your router. The router has to forward this request to your server machine. So if your server has a local IP 192.168.0.10 and it listens to port 2412 your router should forward all incoming request for this TCP port to this IP.
You should allow the 3G internet in Settings. (Emulator doesn't need this, it uses ethernet connection of your PC).
Your application should diagnose the state and possibilities of Internet connection and report it to you as a user of the debug mode. Or/and something - to the usual user.

Connecting Android phone to a mac on network with name.local not IP

I'm trying to do some local web dev/testing and connect from my FroYo Android device to my mac via it's 'name.local' address on the network, rather than via it's IP.
Is this possible? My device refuses to connect, but works with IP.
I have to use name.local due to the nature of the site I'm developing - the domain name has to remain static.

Categories

Resources