0

I am trying to connect Pi to my local server, but it doesn't work when I type 127.0.0.1 on pi's browser.

I have created a flask web server at 127.0.0.1:5000 on my PC, and several websites are attached. (I have to set up the web server outside the Pi since I run multiple OpenCV applications on the server, and Pi is too slow to run it.) Pi connected to the Ethernet, and I knew its IP address (ex:123.456.789.0). I run a python script with socketio on Pi, and I want the python script to communicate with the flask web server. How can I do that? Be simple, how to control(communicate) raspberry (CAM, GPIO) from an outside network with a web server.

Now the Pi and PC are NOT under the same network. Their IP addresses are totally different, but I can make them under the same network (ex. Pi:192.168.0.1, PC:192.168.0.2) if it is needed.

Thank you!

  • Welcome to Stack Overflow. You're not going to be able to connect anything to your pc if you're flask web server is running under 127.0.0.1:5000. Change it to using '0.0.0.0:5000' – ewokx Jul 07 '22 at 05:39
  • Have a read here... https://stackoverflow.com/a/72882529/2836621 – Mark Setchell Jul 07 '22 at 06:35

0 Answers0