HTTP (s) TCP File Download For OTA

PC based Python script example to download a file from a HTTP Server and send to a host processor.

This example can be used to update your product over the air (OTA) or just to download a file off a HTTP or HTTPs server.

Down load HFS free HTTP server and Start Server

Setup a client to connect to module to send the following:
ssid, password, security type, server DNS name or IP address, server port

Edit URL in script to point to where you loaded file to be download
//parsed = urlparse.urlparse(“http(s)://domain:Port/path/filename)
//parsed = urlparse.urlparse(“http://10.16.190.166:1443/filename.bin”)

Edit location in script to change location for the file to be saved.
fname = “C:\\Users\\mypc\\test_download.bin”