-->
Page 1 of 1

AT Command / HTTP Question

PostPosted: Mon Oct 04, 2021 10:16 am
by jaydev
Hello! I am new to HTTP and I'm trying to learn how to send a page to a browser in SoftAP mode. I'm able to connect, I'm able to send data to the IP address but I'm getting inconsistent results. Effectively, I'll try sending a bit of HTTP code several times and every once in a while, something will get sent and 3 or 4 instances of my code will pop up (still functional). My assumption is I'm setting something up wrong, I'm getting some sort of error that's completing my code and then the form is getting posted.

This has been my process:

Code: Select all// Current config
AT+CWMODE=1
AT+CWJAP="ssid","password"
AT+CIPMUX=1
AT+CIPSERVER=0,80
***Connect to IP Address in browser here, use AT+CIFSR if needed ***
AT+CIPSEND=0,314
***Send File via RealTerm Here***


The file I'm sending looks like this:
Code: Select allHTTP/1.1 200 OK
Content-Type: text/html
Connection: close

<!DOCTYPE HTML>
<form method="post" enctype="multipart/form-data">
 <div>
   <label for="file">Choose file to upload</label>
   <input type="file" id="file" name="file" multiple>
 </div>
 <div>
   <button>Submit</button>
 </div>
</form>




I suspect the issue is I'm not starting with a /POST or something to that effect but it usually is followed by a "host" and I'm not sure if I'm supposed to enter the IP address I'm hosting at (read somewhere online that that's not recommended, but didn't really say why).

The html code seems to work just fine and I'm pretty sure I'm close but I think I'm missing one bit of information that would make this work. I saw this forum and it seemed active and full of knowledgeable so I thought I'd give it a shot. Any insight you can give me would be greatly appreciated. Thanks!