These are chat archives for esp8266/Arduino

17th
Aug 2015
Neil Kolban
@nkolban
Aug 17 2015 00:25
Oooh!!! Does the arduino library use the SDK task mechanisms?
Ivan Grokhotkov
@igrr
Aug 17 2015 01:53
it does, the main loop is scheduled through a task
regarding SSL — no particular reason, it just wasn't used anywhere, therefore wasn't added to linker command line
Neil Kolban
@nkolban
Aug 17 2015 03:11
Okly ... I tried to use USER_TASK_PRI_0 and found that stopped the loops from running. I'm still looking forward to our architecture discussion. That is the kind of thing I'd like to document.
Which is the correct file to edit to add an extra library in the linking?
Ivan Grokhotkov
@igrr
Aug 17 2015 05:49
platform.txt
brutzler
@brutzler
Aug 17 2015 07:04
Is there somewhere an example for the ESP-EEPROM functions? I tried "EEPROM.read (0x6b000)" but didn't get back the expected. Because of the address is only an INT: Do I have to define any additional offset?
Harrison Mclean
@h4rm0n1c
Aug 17 2015 07:35

@brutzler https://github.com/esp8266/Arduino/blob/esp8266/hardware/esp8266com/esp8266/doc/reference.md

https://github.com/esp8266/Arduino/tree/esp8266/hardware/esp8266com/esp8266/libraries/EEPROM

Get a fulltext search program like agent ransack and point it at the root dir of your board package or build of the IDE, I promise you, you will be better prepared to answer your own questions if you get familiar with the source tree.

This is how I learned how to use hardware timers on the ESP8266, not to mention SPI and how to use GPIO registers too.
Harrison Mclean
@h4rm0n1c
Aug 17 2015 07:41
It's also important to understand that EEPROM on the ESP8266 is just a section of flash that is set aside to emulate an EEPROM, the library resembles the AVR one, but that's where the similarities end.
Mario Mikočević
@mozgy
Aug 17 2015 10:17
hmm, interesting, regarding #691, works fine with Chrome on me LG but crashes a lot with LG's internet app
brutzler
@brutzler
Aug 17 2015 12:25
@h4rm0n1c: This was the missing puzzle piece: "EEPROM library uses one sector of flash located at 0x7b000 for storage." Thought with the EEprom functions I can access the whole flash-memory. Then I will continue using "spi_flash_read/write".
Harrison Mclean
@h4rm0n1c
Aug 17 2015 12:40
Yeah, they're just for the EEPROM emulation functionality only. You're right, spi flash functions are what you really want.
Steve Nelson
@zenmanenergy
Aug 17 2015 12:53
Is there a way to get a list of the devices currently connected to the ESP when the wifi is in WIFI_AP or WIFI_AP_STA mode?
I'm looking through the ESP8266WIFI.h file and I don't see any methods. But if I turn on Serial.setDebugOutput(true); it displays a message when a client device connects
Russ Mathis
@RussMathis
Aug 17 2015 17:51
@igrr: (FYI) Possible SPIFFs issue, I am getting an error using: File f = SPIFFS.open("/log.txt","a+"); f.println(myStringObject); f.close(); //String object length aprox 320 chars. This happens every other try.
However if you use: f.write((const uint8_t*)sTxt.c_str()), sTxt.length()-1); // No error with this usage.
Ivan Grokhotkov
@igrr
Aug 17 2015 18:16
thanks, which error are you getting?
also why do you use (length - 1)?
@zenmanenergy I haven't added such an API to Esp8266wifi class
but that should be easy to do
Russ Mathis
@RussMathis
Aug 17 2015 18:29
@igrr, error: sp: 3ffea510 end: 3ffeab20 offset: 01b0, and the (length-1) was left over code to keep from trying to spit out the NULL terminator. Don't need it any more.
There is lots more error code before the dump, let me know if you need it too.
Steve Nelson
@zenmanenergy
Aug 17 2015 18:42
@igrr ok, I was just checking to see if it already existed.
Ivan Grokhotkov
@igrr
Aug 17 2015 18:45
ah, okay, so it crashes. I have fixed one similar crash last week by updating SPIFFS source
might be related
are you on staging version? or did you build from git?
Russ Mathis
@RussMathis
Aug 17 2015 18:55
@igrr , yes I'm using staging ver
Neil Kolban
@nkolban
Aug 17 2015 18:56
How often does a new "stable" release get produced? Is there a time table?
Ivan Grokhotkov
@igrr
Aug 17 2015 19:02
there isn't much statistics yet (only three releases so far) but my plan is to have the next one in about a week. if there are major issues, it will be delayed obviously. I don't plan to add anything major though (i.e. TLS will be part of the next release)
Russ Mathis
@RussMathis
Aug 17 2015 19:04
@nkolban, kudos on the book! have you documented on the power saving modes yet? I've been trying to get a handle on how to put the chip in low power mode ie. no wifi, but still keep pwm going, then after and hour or so bring wifi back up long enough to report with it then back to low power mode and pwm control again. After google'ng it seems nobody has a good explanation on how to do it yet! :)
Neil Kolban
@nkolban
Aug 17 2015 19:04
As I work through materials for the September relase of the book I am focusing on the Arduino ESP story. One of the things I am covering is how to make REST calls from this environment. What I am finding is that the ability to make SSL requests is important. I was going to look at the source of WiFiClient to see how they could be added ... but I think I just heard you say that work is in plan?
@RussMathis Not yet. Been focusing on using the Ardunio IDE and libs.
@RussMathis 1st pass at the book was raw Espressif SDK. Next pass is Arduino IDE. Each month will see polish and examples and corrections. Am also looking at the JavaScript environment.
Russ Mathis
@RussMathis
Aug 17 2015 19:07
@nkolban, great job--keep up the good work! :) :)
Neil Kolban
@nkolban
Aug 17 2015 19:07
@RussMathis Oh ... and I have started to cover using Eclipse as an IDE for the Arduino IDE :-) ... which means building Arduino library apps in Eclipse.
@RussMathis It is Igrr and co that are doing the hard work ... I'm just following along afterwards writing down what they have done in one place.
Russ Mathis
@RussMathis
Aug 17 2015 19:09
Yes, I've been reading that, personally I've been using VS2013 and VisualMicros plugin. But also have been trying to keep Eclipse configured as a fall back when VS throws tantrums LOL!
Neil Kolban
@nkolban
Aug 17 2015 19:12
Oh hell!! I never knew that plugin existed!! Sigh. Now I have yet ANOTHER area to cover in the book :-) MANY thanks for the new pointer.
... and that is how new content is found.
Russ Mathis
@RussMathis
Aug 17 2015 19:13
I use it for all my arduino coding too. Love the debugger!
Neil Kolban
@nkolban
Aug 17 2015 19:14
Debugger?
Against a real Arduino?
Russ Mathis
@RussMathis
Aug 17 2015 19:14
yup
Ivan Grokhotkov
@igrr
Aug 17 2015 19:15
@nkolban TLS is in plan, I made a tiny amount of progress already
Neil Kolban
@nkolban
Aug 17 2015 19:16
Ahh ... does it work with ESP Arduino?
Russ Mathis
@RussMathis
Aug 17 2015 19:16
not the debugger of course but several of the other boards...
Neil Kolban
@nkolban
Aug 17 2015 19:17
@igrr ... I noticed that the sockets APIs you are using in the WiFIxxx classes appear to be use wlip directly ... was there a reason not to use the espconn_xxx functions?
Ivan Grokhotkov
@igrr
Aug 17 2015 19:18
when I started working on this port, espconn was buggy as hell, and it added very little value over lwIP
so to me it was more like "no reason to use espconn" when there was a well-documented library beneath it
Neil Kolban
@nkolban
Aug 17 2015 19:20
@igrr Does that view still hold? For example, when I started to look at what I could do to add/assist .... I came to a grinding halt ... as I now know the espconn_xxx functions but do NOT know the lwip library.
@igrr For example, I was going to look into using espconn_secure_connect to create an SSL connection ... but then found that you aren't using espconn_connect to make a normal connection.
Ivan Grokhotkov
@igrr
Aug 17 2015 19:22
lwIP learning curve is not too steep, and espconn still has a fair amount of algorithmic errors (like when it silently discards data it cannot send)
Neil Kolban
@nkolban
Aug 17 2015 19:24
@igrr What worries me is that the Espressif SDK doesn't claim support for direct access into the lwIP functions meaning that Espressif could change the lwIP libraries or replace them at will and the whole house of cards would come tumbling down. If we uses the espconn_xxx functions, we would be assured of future compatibility?
Ivan Grokhotkov
@igrr
Aug 17 2015 19:27
they will not replace lwip with something else for 8266 sdk (i have some inside info), but they can certainly break espconn behaviour in future releases — they have a history of doing that
d-anders
@d-anders
Aug 17 2015 19:57
is there some guide to using spiffs somwhere? i mean how to transfer files etc
Ivan Grokhotkov
@igrr
Aug 17 2015 20:02
@d-anders not yet. the tool which will be used to create spiffs images on a PC is still very much in beta
d-anders
@d-anders
Aug 17 2015 20:02
ahh, thats why i couldnt find info, thanks
Ivan Grokhotkov
@igrr
Aug 17 2015 20:02
if you feel like experimenting though, here's the tool: https://github.com/igrr/mkspiffs
d-anders
@d-anders
Aug 17 2015 20:04
ok, nice
i will try it this weekend
i have my files in code at the moment, this will be better when it works
anoter question - in arduino ide it looks like using a 512kb board 64kb is already beeing reserved for spiffs. is this so?
Ivan Grokhotkov
@igrr
Aug 17 2015 20:06
that's right.
d-anders
@d-anders
Aug 17 2015 20:09
nice. if i want to use 128kb (small code) - can i just edit boards.txt to do it?
Ivan Grokhotkov
@igrr
Aug 17 2015 20:11
yes, and you also need to define the flash map in the linker script
d-anders
@d-anders
Aug 17 2015 20:12
thanks
Ivan Grokhotkov
@igrr
Aug 17 2015 20:12
you can use one of these as an example
d-anders
@d-anders
Aug 17 2015 20:12
will see if i need it. i try to keep my files small to be able to serve them quickly
Ivan Grokhotkov
@igrr
Aug 17 2015 20:13
if you gzip your files, esp8266webserver can serve them gzip-encoded
and most browsers will un-gzip them upon reception
d-anders
@d-anders
Aug 17 2015 20:13
yes i noticed
i use some very basic charting lib (small) at the moment. maybe i'll change to some nicer jquery one later
Ivan Grokhotkov
@igrr
Aug 17 2015 20:16
if you end up making a 512k/128k variant, open a pull request and i'll include it in the IDE.
actually it's just 359k for code, which is barely enough for ESP8266WebServer + ESP8266WiFi libs
but might be okay if WPS libs are removed
i wonder if anyone uses those...
d-anders
@d-anders
Aug 17 2015 20:20
so far i have had quite a bit of space left
brutzler
@brutzler
Aug 17 2015 20:57
Hi,
probonopd
@probonopd
Aug 17 2015 20:57
@RussMathis is this debugger also available for Microsoft-free, read: OS X and Linux, environments?
hu br
brutzler
@brutzler
Aug 17 2015 20:59
I have some I2C Displays (ST7335 and LCD1602 with I2C-converter) from "Arduino-time". Is there any chance to use one with an ESP?
Sorry for the standalone Hi :-)
brutzler
@brutzler
Aug 17 2015 21:09
Oh, its a ST7735 !