Search found 19 matches
- Wed Jan 02, 2019 9:56 am
- Forum: ESP-IDF
- Topic: webserver - how to get incoming http request IP address
- Replies: 4
- Views: 7650
Re: webserver - how to get incoming http request IP address
Hi, You need to use the httpd_req_to_sockfd() function to obtain the sockfd of a client inside a request handler, then use getpeername() function (include <sys/socket.h>) to get the IP address from the sockfd. Here is an example function that you can try invoking inside your request handler for prin...
- Fri Dec 28, 2018 12:13 pm
- Forum: ESP-IDF
- Topic: Extending Unified Provisioning (BLE) Protobuf messages
- Replies: 2
- Views: 4485
Re: Extending Unified Provisioning (BLE) Protobuf messages
Hi, 1.How do I extend the Protobuf set config message to include additional custom fields? The message structure is defined by Protobuf .proto files which are compiled to generate corresponding C files which are to be included by user code. You can add additional fields by writing your own Protobuf ...
- Mon Dec 17, 2018 6:33 am
- Forum: ESP-IDF
- Topic: webserver using FATFS file system
- Replies: 10
- Views: 17743
Re: webserver using FATFS file system
You can have a sdkconfig.defaults in your project folder with the config value overrides, or use `make menuconfig` to override these values
- Thu Dec 13, 2018 9:04 am
- Forum: ESP-IDF
- Topic: webserver using FATFS file system
- Replies: 10
- Views: 17743
Re: webserver using FATFS file system
can i use the files like used in following link. http://zerothelement21.blogspot.com/2018/04/esp32-webserver-using-esp-idf-sdk.html Yes you can. As described in the link, you simply need to put the following in your component.mk COMPONENT_EMBED_FILES := index.html And use the following two pointers...
- Thu Dec 13, 2018 6:18 am
- Forum: ESP-IDF
- Topic: webserver using FATFS file system
- Replies: 10
- Views: 17743
Re: webserver using FATFS file system
ESP-IDF has it's own native http server now (see esp_http_server). Check this answer, from a previous post, about serving files off a FAT formatted SD card : viewtopic.php?p=29992#p29992
- Mon Nov 05, 2018 5:57 am
- Forum: ESP-IDF
- Topic: protocomm, esp_prov questions
- Replies: 4
- Views: 6713
Re: protocomm, esp_prov questions
@i_amey Thanks for clarifying the point related to usage of Flatbuffers. @p-rimes Pardon me. I'll correct my statement as to how Flatbuffers can be used with protocomm and quote what Amey stated : for any of the extensions to the protocol by adding a new protocomm endpoint, you can use FlatBuffers (...
- Mon Oct 29, 2018 6:18 am
- Forum: ESP-IDF
- Topic: protocomm, esp_prov questions
- Replies: 4
- Views: 6713
Re: protocomm, esp_prov questions
So if I wanted to contribute a PR for the flexibility to use flatbuffers instead, would that be accepted within the protocomm component? (or would I have to fork protocomm on my own, and make a "flatbuffercomm")? The only place where protobuf is used in protocomm is the session security (protocomm_...
- Mon Oct 29, 2018 5:29 am
- Forum: ESP-IDF
- Topic: esp_http_server help request
- Replies: 2
- Views: 3856
Re: esp_http_server help request
As per the API reference documentation, `httpd_resp_set_hdr()` must be used only for setting additional headers other than `Content-Type` and `Content-Length`. The `Content-Type` field must be set using only `httpd_resp_set_type()`, else it will cause unwanted behavior. I will update the API referen...
- Fri Aug 31, 2018 11:26 am
- Forum: ESP-IDF
- Topic: http_server filesystem handler example?
- Replies: 2
- Views: 9788
Re: http_server filesystem handler example?
Presently there is no out of the box support for file sharing, though it is something desirable and will be made available in future. Till then, implementing a simple file server should not be difficult. Take for this as an example : /* HTTP GET handler for downloading files */ esp_err_t file_get_ha...