Welcome, Guest: Join Nairaland / LOGIN! / Trending / Recent / New
Stats: 2,689,646 members, 6,336,383 topics. Date: Sunday, 13 June 2021 at 01:35 AM

Does Anyone Know How To Connect To A Generic Device Via Internet - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Does Anyone Know How To Connect To A Generic Device Via Internet (250 Views)

How To Connect My Android Phone To Access My Xamp On Macbook Pro / Does Anyone Have This Book? / Do Anyone Know What Happened To Learnerstv.com (2) (3) (4)

(1) (Reply) (Go Down)

Does Anyone Know How To Connect To A Generic Device Via Internet by sagieramos(m): 8:46pm On Jun 06
I could connect to my device with my phone when they are on the same router. Does anyone know how to connect to the same device outside my router or via the internet?

I use TP-LINK TL-MR6400 as my private router

Re: Does Anyone Know How To Connect To A Generic Device Via Internet by AdolphBrian: 9:32pm On Jun 06
I assume that by "connect" you want to access some resource available on your device (most probably through a server of some sort).

In this illustration I'll assume that the resource you want to access is available on a HTTP server running on your device.

Step 1:
Get the WAN (public) IP address of your router, <router_public_ip>

Step 2:
Assuming that the HTTP server is already running on your device, get the port number the server is exposed on

Step 3:
Confirm that the server is bound to the same network interface as your router on port <server_port> (which is typically within the range of [1024, 65535] unless you're running the server with superuser privileges

Step 4:
Access the "control panel" of your router.
You should be able to do so by navigating to your router's local ip address from your device

Step 5:
Search for a feature called "port forwarding" (or "port mapping"wink

Step 6:
Enter in the (local) ip address of your device and an arbitrary port number, <forwarded_port>, as the source and as the destination, the <port_number> the server on your device is available on

Step 7:
Open a web browser (on your phone) and type in http://<router_public_ip>:<forwarded_port>/path/to/resource/on/the/server/running/on/your/device
Re: Does Anyone Know How To Connect To A Generic Device Via Internet by dochenaj: 2:34am On Jun 07
sagieramos:
I could connect to my device with my phone when they are on the same router. Does anyone know how to connect to the same device outside my router or via the internet?

I use TP-LINK TL-MR6400 as my private router
You'll also need dynamic DNS running on your router, in order to have a consistent address for it. I suppose your router IP address is not static.
Re: Does Anyone Know How To Connect To A Generic Device Via Internet by sagieramos(m): 4:21am On Jun 07
AdolphBrian:

Step 1:
Get the WAN (public) IP address of your router, <router_public_ip>

Step 2:
Assuming that the HTTP server is already running on your device, get the port number the server is exposed on

Step 3:
Confirm that the server is bound to the same network interface as your router on port <server_port> (which is typically within the range of [1024, 65535] unless you're running the server with superuser privileges

This part is where I'm having limited knowledge. How do I confirm the server is bound to the same network interface as the router port?
Re: Does Anyone Know How To Connect To A Generic Device Via Internet by sagieramos(m): 4:31am On Jun 07
dochenaj:
You'll also need dynamic DNS running on your router, in order to have a consistent address for it. I suppose your router IP address is not static.
I made an IP reservation for my device, so I'm sure my device got a static ip with this method. With the external ip, I'm using no-ip to manage my ddns. I thought noip was the problem not until I failed to access my device through the external ip that was assigned to my router at that moment
Re: Does Anyone Know How To Connect To A Generic Device Via Internet by dochenaj: 8:36pm On Jun 07
sagieramos:
I made an IP reservation for my device, so I'm sure my device got a static ip with this method. With the external ip, I'm using no-ip to manage my ddns. I thought noip was the problem not until I failed to access my device through the external ip that was assigned to my router at that moment
Can you ping your router IP address from your phone?
Re: Does Anyone Know How To Connect To A Generic Device Via Internet by sagieramos(m): 10:39pm On Jun 07
dochenaj:
Can you ping your router IP address from your phone?

I don't understand. I thought port forwarding will allow me access my device via an external ip, hence it should ping at a given interval depending on the firmware of the router
Re: Does Anyone Know How To Connect To A Generic Device Via Internet by AdolphBrian: 5:53pm On Jun 10
sagieramos:

This part is where I'm having limited knowledge. How do I confirm the server is bound to the same network interface as the router port?

Uhmmm.... Okay. Let's start from here. The "device" that's running the server, what is it, i.e: laptop or ....
Re: Does Anyone Know How To Connect To A Generic Device Via Internet by sagieramos(m): 9:50pm On Jun 10
AdolphBrian:


Uhmmm.... Okay. Let's start from here. The "device" that's running the server, what is it, i.e: laptop or ....
It's a micro controller (WROOM-32)
Re: Does Anyone Know How To Connect To A Generic Device Via Internet by AdolphBrian: 1:04pm On Jun 11
sagieramos:

It's a micro controller (WROOM-32)

Okay. I'm gonna need you to scan your LAN

You can do this using a Laptop or a phone. The utilities you'll need will be

- just nmap (for a laptop/desktop)
- termux and nmap (for Android)

You can get termux from the Google play store

You can get nmap for your OS from https://nmap.org

I'm willing to help but I'm not always online on nairaland. Feel free to contact me via messenger at https://m.me/adophilus.brian so that we can resolve your issue quickly

(1) (Reply)

. / Will Give You Access To Any Udemy Course Of Your Choice For #2000. Only 10 Slots / Tutorials For New Developers? Blog Or Vlog? Which Will Get More Audience?

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2021 Oluwaseun Osewa. All rights reserved. See How To Advertise. 53
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.