0

I have a Django server hosted locally. I ran my server using python manage.py runserver 0.0.0.0:8000 so that it is accessible from any devices that are connected to my WiFi.

Any computers or smartphones in my network can simply go to my computer's IP Address 192.168.0.0:8000 via their browser to see my Django page.

I would like to use an ESP8266 module to send a GET request to the locally hosted Django page. The following AT Commands are used.

AT+CWMODE=1
AT+CWJAP="SSID","PASS"
AT+CIPMUX=1
AT+CIPSTART=0,"TCP","192.168.0.0",80  <--Problem arise here, hence I could not move on with my GET request

All but the last command was executed successfully. When I run the last AT Command to establish a TCP connection with my local server, I get an error.

ERROR
0,CLOSED

Currently, I'm still not super proficient with networks and backend. Any long explanation and/or answers will be well appreciated!

1 Answer 1

1

You said that to load the Django page from a browser you go to 192.168.0.0:8000

Change

AT+CIPSTART=0,"TCP","192.168.0.0",80

to

AT+CIPSTART=0,"TCP","192.168.0.0",8000

That will load the page from port 8000 (like your do from a browser) instead of port 80 (the default web server port).

Sign up to request clarification or add additional context in comments.

1 Comment

I changed the port on my server side instead of changing the esp's at command and it worked! For some reason, accessing port 8000 from the at command throws up the same error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.