These are chat archives for esp8266/Arduino

19th
Aug 2015
Ivan Grokhotkov
@igrr
Aug 19 2015 04:05
the functions are quite simple. isr_mask calls xtos_ints_off, which manipulates intenable register. ets_isr_unmask calls xtos_ints_on.
Stoian Ivanov
@sdrsdr
Aug 19 2015 14:11
Hi, about esp8266/Arduino#709 you're 100% correct on callback situation, but this would require a bigger change harder to get approved :)
Ivan Grokhotkov
@igrr
Aug 19 2015 14:12
Correct :)
This requires adding some stuff into the core to schedule callbacks on the main context.
But since this is a requested feature, why not do it the right way, eh?)
Stoian Ivanov
@sdrsdr
Aug 19 2015 14:13
about naming convention - introducing variant with 3 parameters one default will create ambitious situation - what function is called
"the right" way is too hard for me - i just got thrown in this project and got almost no experience with esp programming
Ivan Grokhotkov
@igrr
Aug 19 2015 14:15
i was not suggesting a variant with 3 arguments, just add another parameter to the existing connect function and give it the default value, so that calling it with 2 arguments will lead to the existing behaviour
like connect(IPAddress addr, int port, bool blocking=true)
Stoian Ivanov
@sdrsdr
Aug 19 2015 14:16
in my project we implement a TCP proxy from GSM modem to ESP so the modem got callbacks for "I'm ready to send" and i must pull the WiFi client for available data, read it and send it
well removing the variant with two parameters will break inheritance IMHO
btw at the moment the connect does not report a connect error for some reasons ..
Ivan Grokhotkov
@igrr
Aug 19 2015 14:20
oh you're right, i forgot that connect method was derived from Client.
Stoian Ivanov
@sdrsdr
Aug 19 2015 14:31
I know there a limitations for the numbers of WiFiClient and WiFiUDP instances but I don't know the exact numbers can you share some light on that matter?
Ivan Grokhotkov
@igrr
Aug 19 2015 14:33
this is defined in lwipopts.h
#define MEMP_NUM_UDP_PCB 4
MEMP_NUM_TCP_PCB (*((volatile uint32*)0x600011FC))
(this references a variable in RTC memory but it's actually limited to 5 in Espressif-provided lwip)
#define MEMP_NUM_TCP_PCB_LISTEN 2
now that lwip source has been re-released for SDK 1.3.0, we have an option to rebuild lwip with different settings
Stoian Ivanov
@sdrsdr
Aug 19 2015 14:36
ok so two listening 5 "normal" and 4 udp?
Ivan Grokhotkov
@igrr
Aug 19 2015 14:37
i don't know if listening TCP pcb's count against the total TCP pcb limit, i.e. whether it is 5+2 or just 5.
i think it's 5+2 because i had 5 clients connected at some point... but not certain
Stoian Ivanov
@sdrsdr
Aug 19 2015 14:38
either way if it is possible to rebuild lwip it is OK
well listening is way less memory consuming than "normal" io operations with all the buffering involved