Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Several contributions #173

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Several contributions #173

wants to merge 2 commits into from

Conversation

tmcdos
Copy link

@tmcdos tmcdos commented Jul 20, 2016

These are my contributions to the project - you can merge into the master, so that others can benefit from the improvements.

tmcdos added 2 commits July 20, 2016 22:15
…sp_link_build" in the C code)

converted the unconditional downloading of YUI compressor and HTML compressor to be conditional - only if they are not already present
moved all Javascript blocks from HTML files into separate JS files - otherwise HTML compressor does not compress the inlined Javascript code
changed the place of inclusion of JS files into HTML - it is now at the end of BODY instead of beginning (this speeds up the page loading a little)
added a page "Firmware" which allows for OTA upgrades - so the utility "wiflash" is no more needed
improved the Makefile to show firmware size as a percentage of the available ROM space
improved the Makefile to show the espFS size as a percentage of the raw uncompressed size of web assets
combined the 2 invokations of HTML compressor in Makefile (once for main folder and once for WIFI folder) into a single one
changed 4-5 CSS rules for better visual readability
fixed a bug in "cgiGetFirmwareNext" - it was not sending the No-Cache headers and so the browser shows wrong (older, cached) info
added "\n" in several DBG() statements
I had to rename "base64_decode" because there is same named function inside "ssl_crypto_misc" from the SSL library
ifeq ("$(FLASH_SIZE)","512KB")
# Winbond 25Q40 512KB flash, typ for esp-01 thru esp-11
ESP_SPI_SIZE ?= 0 # 0->512KB (256KB+256KB)
ESP_FLASH_MODE ?= 0 # 0->QIO
ESP_FLASH_FREQ_DIV ?= 0 # 0->40Mhz
ESP_FLASH_MAX ?= 241664 # max bin file for 512KB flash: 236KB
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Esp-link does not fit into that space. When you use a 512KB flash you loose the over-the-air update capability.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a makefile (therefore it must account for all possibilities), someone may decide that not all provided features are needed for him - so he can purposedly exclude e.g. MQTT or SYSLOG or whatever. And in such cases the code will be smaller and may fit into smaller space. The logic here is that the size of the flash setting depends on the chip chosen - and this choice is in the hands of the user. Instead of fixing the number, would not it be better to make it dependable of the user choice ? All other flash parameters are already dependable, why not this one ?

@tve
Copy link
Member

tve commented Jul 20, 2016

Thanks for the PR, but you're making a ton of changes for a multitude of purposes, reorganizing lots of code, pretty much all without explanation or motivation, and without any prior discussion. I'm sure there's nice stuff in there, but this makes it very difficult to review and to see the point of it all.

@tmcdos
Copy link
Author

tmcdos commented Jul 21, 2016

If you think that my willing to share something is PR and of no value to others, then I will not bother you any more.

@ShaneKirkbride
Copy link

So it looks like the branch tmcdos's branch works....and it can post to an https server. Which is cool. But there is so much that doesn't render right in the html...

@tmcdos it would be quite helpful if you could elaborate on what you did to change the code to allow for https posts. I saw you commented out some stuff in the rest.c file but how did you incorporate the ssl library?

@tmcdos
Copy link
Author

tmcdos commented Aug 5, 2016

@ShaneKirkbride Could you be more specific about which part of HTML does not render ? This branch is not my project, it is just the master branch with a suitable part of my changes applied. I am using only the core of ESP-LINK (TCP bridge and HTTP server) - I do not connect AVR or other external microcontrollers. I do not use mDNS, SLIP, Syslog, MQTT, Telnet commands ...
I post to HTTPS manually in my code - look at function send_json_info() in file serial/polimex.c at my repository https://github.com/tmcdos/esp-security (since this is a work in progress, do not expect the code to compile without errors right now - but it works, I have tested it on hardware).

@ShaneKirkbride
Copy link

@tmcdos when I open up the esp-link in the browser the tool bar menu on the side does not render so I cannot look at the debug log ect...Not sure if you intended for this but I really like this functionality. I'll check out your the code. Thanks for the work on getting the https going...

@tmcdos
Copy link
Author

tmcdos commented Aug 5, 2016

This is how it looks on my side
console
debug_log
home
services
soft_ap
wifi_station

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants