-->
Page 1 of 2

File transfer esp8266 acting as wifi access point

PostPosted: Mon Oct 29, 2018 9:29 am
by kishor0910
I am new to the ESP8266.
My task is to make ESP8266 as Wi-Fi access point and connect two PCs to it .
After connecting we need to transfer file from one PC to other PC using this Wi-Fi access point.
I am able to make ESP8266 as Wi-Fi access point and connect the PCs,but I am not getting how to transfer the files.
Could anybody help me in solving this?
Thanks in advance.

Re: File transfer esp8266 acting as wifi access point

PostPosted: Tue Oct 30, 2018 3:30 am
by QuickFix
I don't think the ESP is really suitable for such tasks.

Okay, there are some nice AP-like examples floating around, but the ESP is relatively limited when it comes to the larger things in life, like serving/passing through large amounts of data.
The ESP is actually only meant as an end-point (client or server) and does this job very well (with limitations, like a max of 5 concurrent connections), but in the end it stays a little MCU with some WiFi peripheral attached.

You'd better be off using just a normal, off the shelve, AP with built-in DHCP server, which can do this out of the box with a minimum of effort. :idea:

Re: File transfer esp8266 acting as wifi access point

PostPosted: Tue Oct 30, 2018 5:13 am
by kishor0910
Thanks for your reply.
Could you please share me any example code for solving this.

Re: File transfer esp8266 acting as wifi access point

PostPosted: Tue Oct 30, 2018 5:13 pm
by davydnorris
You could start with the httplibd server demo example, and have a look at the tests page, or look at the way you can use chunked encoding to send and accept a file.

Then you could implement your own web application that presents users with an upload and a download page, waits till both computers are connected, and then accepts an upload from one using chunked encoding, and passes that through to the other in the same way.

The hardest part would be getting the transfer initiation right, but after that you just wait till you get a chunk from one and send it straight to the other