These are chat archives for esp8266/Arduino

Aug 2015
Russ Mathis
Aug 25 2015 13:17
I just cheated and created a LOCAL var and set it to the WiFiClient object before calling the report routine. :(
Kiril Zyapkov
Aug 25 2015 15:35
What would be the most effective way to send data from a File via a WiFiClient? Say I wanted to flush the entire file over a TCP connection?
Russ Mathis
Aug 25 2015 16:04
@kzyapkov , I tried this but had to change so the WiFiClient was a local previously assigned in code:void sendClientLog(WiFiClient client){
File f ="/log.txt", "r");
if (f){
//Serial.println("showLog: file open");
String fOut;
client->write("\nReport Start*\n");
while (true){
fOut = f.readString();
if (fOut.length() != 0){
client->write(fOut.c_str(), fOut.length());
client->write("\nReport End*\n");
Note: forgot the prototype should be:
void sendClientLog(WiFiClient
OK The astrisk is not showing up, probably due to Markdown feature in messenger.. :(
Russ Mathis
Aug 25 2015 16:52
@Anybody, has anyone came up with a simple way to provide snprintf support for doubles, char* or floats precision?
Aug 25 2015 17:08
@RussMathis something like dtostrf, see
Russ Mathis
Aug 25 2015 17:21
@Juppit, yes aware of dtostrf however my strings contain more than a single number so I've been using ie snprintf(buff, sizeof(buf),"speed: %s, mics: %lu", temp); //where %s was created with dsostrf previously. This can be very annoying when there are several more vars not shown above, some int, double, char, etc. etc :(
Besides snprintf/sprintf now allowing char
they also lack other conversion features as well. Just wonder if anyone had came up with macros or refactored the ets_ulib* libraries?
Stoian Ivanov
Aug 25 2015 18:54
@RussMathis clent.write might not send the entire string in one call you must check the result of the method
Aug 25 2015 19:13
id there a way to debug epc1 mem errors, that only give out an address? I remember ther was a way to generate a map of the bin file, and look at the closest address the the failure, does any1 know of this?
Aug 25 2015 19:25
@alon24 windows with cygwin: cd
./xtensa-lx106-elf-objdump.exe -S foo.elf > foo.txt
I find foo.elf the latest build directory in C:\Users[username]\AppData\Local\Temp\build3955521324917442037.tmp
Aug 25 2015 21:04
@juppit thanks, I will try soon
Russ Mathis
Aug 25 2015 22:32
@sdsdr, you may be right, however, I've formatted text in the file with \n--newline characters so the loop only picks up 1 line at a time. But as you suggest I will also check how big a string can be sent. :)
Aug 25 2015 22:35
is there a plan to pull in SSL support from the SDK into esp8266/Arduino? (I really don't want to have to learn SDK-level stuff. :( )
(and I need the ability to authenticate responses from a server. unless there is some other clever way to do that.)