Code Monkey home page Code Monkey logo

Comments (11)

ofekp avatar ofekp commented on September 21, 2024 1

please connect to your device and provide a text file with the debug output, it will help me a great deal.

More things to try:

  1. Connect to your router and make sure UPnP service is enabled.
  2. You can browse the dynamic rules in your router so you may want to check that the rule you set up with addPortMappingConfig is there.
  3. If you think your service is up, please try this website to see that the port is indeed open:
    https://www.yougetsignal.com/tools/open-ports/
  4. sometimes routers will not allow for a loop to happen (they prevent calls from inside the network from reaching the router), I would try using a phone connected to a Cellular network just to make sure.

Let me know how it unfolded.

from tinyupnp.

ChristosPalisidis avatar ChristosPalisidis commented on September 21, 2024 1

I managed to check through https://badupnp.benjojo.co.uk/ that UPnP is not enabled in my router. The worse is that i do not have access to it and therefore cannot enable it. Can the procedure be done from my phones network as i said above?

from tinyupnp.

ofekp avatar ofekp commented on September 21, 2024

Hello @ChristosPalisidis,
This is exactly what this package is for.
Let me know if you have any issues.

from tinyupnp.

ChristosPalisidis avatar ChristosPalisidis commented on September 21, 2024

Hi @ofekp !! I appreciate your response!
So, i follow the "SimpleServer" example, providing my local IP and the port of my server to .addPortMappingConfig(). Am i supposed to be able to connect to the server from external networks, with the servers' public IP (which i possess with the help of ipify.org)?
So far, i didnt manage to achieve it. It seems that i am missing something.

from tinyupnp.

ChristosPalisidis avatar ChristosPalisidis commented on September 21, 2024

UPDATE:
I connect my device to my phones network through tethering hotspot.I create the server and get his public IP from ipify.org. I run the procedure of port forwarding. My code continues without getting the "failed" print at the serial monitor .I then go to the aforementioned site, i provide the public IP that i got and my port (80) and get that it is not open on the IP provided.
I guess i have to check if UPnP service is enabled somehow?

from tinyupnp.

ChristosPalisidis avatar ChristosPalisidis commented on September 21, 2024

Also,
scanning all the common ports, i get that only the 443 SSL port is open on this public IP.
Is this a solution, to create a server on that port instead of port 80?
Thank you!

from tinyupnp.

ofekp avatar ofekp commented on September 21, 2024

I recommend that you use a different port than 80 and 443 and leave them be.
Use something like 5430 or 8980, anything four or five digits but less than 65535.
The port can be changed in the beginning of the .ino file.

To check your router config (for UPnP config or checking that the rule was set) you'll need its address, depending on the brand this can vary widely so please search online for the address or in your router's specifications.
Common IPs are:
192.168.1.1
192.168.2.1
10.0.0.1

It will help a great deal if you attach a text file with the output from your serial monitor.

from tinyupnp.

ChristosPalisidis avatar ChristosPalisidis commented on September 21, 2024

Unfortunately,using other ports, it happens that i can not have access to the server using the local ip either. It works only with port 80.
Another dificulty is that where i currently work my project,i can not have access to the routers address. Can i create the server on my phone's network and run and check the code? In this way, i will try to connect to the server from my pc, which is connected to the local network, so as to see if the public IP works.
Lastly, i can attach the text file of my serial, although it does not give any information and prints from that part of UPnP procedure concerning my whole code.

from tinyupnp.

ofekp avatar ofekp commented on September 21, 2024

Nice way to check UPnP service! I learned something today!

Unfortunately, if your router is not configured to accept UPnP listings then you won't be able to gain much from this library (or any other UPnP library for that matter).

Not entirely sure about the phone set up, but if you planed to connect to a tethering hot-spot, then in this case your router is actually the mobile carrier. Yeah... good luck with telling them what to do!
You can do some fancy VPN setup to get this to work but this is rather complicated, if you're up for the task then get on to reading:
Some Stack Exchange Answer
Google search "port forwarding on mobile network"
Do let me know if you managed to set this up.

Otherwise, I would suggest starting from a setup where you have a control over the router.

from tinyupnp.

ChristosPalisidis avatar ChristosPalisidis commented on September 21, 2024

Thank you for the help @ofekp!
I will check it when i can to an accesible router.
Greetings!

from tinyupnp.

ofekp avatar ofekp commented on September 21, 2024

NP, let me know when you got the setup ready.
Cheers!

from tinyupnp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.