These are chat archives for SmingHub/Sming

2nd
Feb 2017
slaff
@slaff
Feb 02 2017 09:12
@/all We are preparing for the next release (SmingHub/Sming#870). Please, help us test the latest code from the develop branch and report issues.
Reinis Veips
@festlv
Feb 02 2017 09:14
hi guys, I'm debugging an issue where ESP web interface works when client is connected locally but does not work when I'm connected to same network via VPN
I sniffed the traffic between router and ESP, this is how it looks: http://faili.wot.lv/tmp/2017-02-02_10-40-03.jpg
interestingly, small http responses work ok
so it could be related to mtu/mss
Alexander V. Ribchansky
@avr39-ripe
Feb 02 2017 09:18
@festlv you shoul use newly introduced ability to use open-lwip and change TCP_MSS to smaller then default 1460 value, for me 1390 works, but it may be too big for others..

@festlv in file /Sming/Sming/third-party/esp-open-lwip/include> grep TCP_MSS lwipopts.h
find

define TCP_MSS 1460

and change

define TCP_MSS 1390

slaff
@slaff
Feb 02 2017 09:18
@avr39-ripe @festlv May be we should make custom LWIP to be the default LWIP and change the MTU values already there.
@avr39-ripe Do you know other parameter tunings that can be helpful for everyone?
Reinis Veips
@festlv
Feb 02 2017 09:19
@avr39-ripe: thanks, that looks exactly what I was looking for!
Alexander V. Ribchansky
@avr39-ripe
Feb 02 2017 09:21
@slaff custom lwip CAN be default, but tcp_mss should be configurable.. my knowledge isn't enough to say what is good default.. some time ago, with esp provided blob of lwip there was just two version - 1460 and 536.. first is too big, and second - too small... some investigation needed to find good default value...
@slaff not yet, I just start do dig lwip parameters.. :(
slaff
@slaff
Feb 02 2017 09:23
I guess we should create a separate page with possible LWIP optimizations. I have two in mind: IPv4 forwarding (to create WIFI repeater with ESP) and the MTU change that you have suggested
Alexander V. Ribchansky
@avr39-ripe
Feb 02 2017 09:23
I think for now we can make open-lwip DEFAULT, leave TCP_MSS 1460 as default, but say in README.md that if one need access to device from internet/vpn/nat/etc there it is mandatory to fine tune TCP_MSS.. may be we can make the outside configurable by some Makefile knob..
slaff
@slaff
Feb 02 2017 09:24
Please, add this information as a comment to the release ticket.
Alexander V. Ribchansky
@avr39-ripe
Feb 02 2017 09:25
@slaff again, I think ip forwarding should be outside configurable by Makefile knob.. blindliy enable it and reduce mtu isn't good idea IMHO..
slaff
@slaff
Feb 02 2017 09:26
@avr39-ripe I think the same. We can collect those tuning settings as a WIKI document.
Alexander V. Ribchansky
@avr39-ripe
Feb 02 2017 09:32
@slaff commented out release preparation ticket :)
slaff
@slaff
Feb 02 2017 09:32
@avr39-ripe Thanks
Reinis Veips
@festlv
Feb 02 2017 10:41
I don't really know the TCP/IP stack, but shouldn't lwIP honour the MSS it receives in the initial SYN packet (no. 30 in my screenshot)?
sle118
@sle118
Feb 02 2017 21:29
@all I'm working on a port of a "lirc" subset on sming, based on IRLib2
trying to find out if it's possible to have spiffy include directories under web/build
for example web/build/remotes/*
bottom line is that I would like spiffy to grab whatever is under web/build and clone the structure in the flash space
Curtis Pope
@piperpilot
Feb 02 2017 21:30
@sle118 as far as I know, spiffy doesn't support sub directories although I think someone was working on adding that support a while back...not sure it made it into Sming
sle118
@sle118
Feb 02 2017 21:31
Oh ok I see
so I'll use a naming convention instead
(like replacing / with "-")
Curtis Pope
@piperpilot
Feb 02 2017 21:31
if you just want to specify a different directory, you can easily do that
sle118
@sle118
Feb 02 2017 21:31
yeah, but this isn't going to work
Curtis Pope
@piperpilot
Feb 02 2017 21:31
but when its written to the flash, it will be a flat structure
sle118
@sle118
Feb 02 2017 21:32
I was hoping to use the directory structure to make it easier to grab the lirc files and upload them the way they are structured in their repo
Curtis Pope
@piperpilot
Feb 02 2017 21:33
here is the issue I remember seeing
SmingHub/Sming#713
sle118
@sle118
Feb 02 2017 21:42
ok. it would have been a viable workaround, provided that we don't break the absolute limit for spiffy's number of files in the file index
@piperpilot on a side note, is spiffy included in the 1M memory allocation limit of the ESP? in other words, is it possible to have the code take up the 1st 1M block on a 4M flash chip and move spiffy to the 3rd one?
Curtis Pope
@piperpilot
Feb 02 2017 21:46
with rBoot, I use the 1st and 3rd 1M blocks for code and the 2nd and 4th for Spiff
sle118
@sle118
Feb 02 2017 21:52
ok... I get it... everyone wants me to use rBoot ;)
so you have dual ROM and dual Spiff, or can you somehow use the 2M static room for spiff?
Curtis Pope
@piperpilot
Feb 02 2017 21:55
dual ROM and Dual SPIFF
sle118
@sle118
Feb 02 2017 21:57
ok
I think 1M should be good enough
have you crossed simple compression of text file on the ESP?
I'm pushing my luck I know
but these files are mostly spaces
Curtis Pope
@piperpilot
Feb 02 2017 22:00
no, I haven't done anything with compression or seen anything
sle118
@sle118
Feb 02 2017 22:02
probably better to do it beforehand, as playing with strings on low ram is asking for heap issues :)
Curtis Pope
@piperpilot
Feb 02 2017 22:48
yeah, I was trying to pre-process a hex file for PIC bootloading and ended up writing a script to do it before uploading it to the ESP, not nearly enough memory to process the file like I needed to on the ESP