These are chat archives for esp8266/Arduino

16th
Mar 2016
Stavros Korokithakis
@skorokithakis
Mar 16 2016 00:05
CHAE-PIL LIM
@chaeplin
Mar 16 2016 06:41
http://bbs.espressif.com/viewtopic.php?f=46&p=6141#p6141 Open source LWIP for ESP8266_NONOS_SDK_V1.5.2
tzapu
@tzapu
Mar 16 2016 06:41
@skorokithakis niceeeeeee :D
Victor Tseng
@Palatis
Mar 16 2016 07:51
signature of thefunction is void (foo::*)(int), you want to use std::mem_fn instead of std::function.
cuz you need a foo in order to invoke thefunction(), it cant be called alone.
Me No Dev
@me-no-dev
Mar 16 2016 07:58
@skorokithakis if it's not a secret, how much did those boards cost you, how many did you make and how long did it take for them to get to you?
tzapu
@tzapu
Mar 16 2016 08:00
14$ i think for 40 of em
as in 10 boards of 4 coutouts
Me No Dev
@me-no-dev
Mar 16 2016 08:00
$14 total?
tzapu
@tzapu
Mar 16 2016 08:00
and for the duration, probably 3+ weeks, but he can answer more accurately :)
yeah, through dirty pcbs
he posted an order link here
Me No Dev
@me-no-dev
Mar 16 2016 08:00
oh 3+ weeks...
tzapu
@tzapu
Mar 16 2016 08:01
slow boat
i wanna order some as well, just not sure which reg to choose :(
and so time passes ...
Me No Dev
@me-no-dev
Mar 16 2016 08:02
i just used one here (so not far from you) but prices are quite different
but can get it anywhere from 24 hours to 3 weeks
tzapu
@tzapu
Mar 16 2016 08:02
2 weeks apparently for his previous order
Me No Dev
@me-no-dev
Mar 16 2016 08:03
and I orders 20 30x30mm boards, 5 work days = 70 euro
there you go
well, as a test run i paid about 5e for 4 of these tiny boards, cnc ed, no proper holes for vias and pins, etc
but wanted to see how it worked
Me No Dev
@me-no-dev
Mar 16 2016 08:06
sure but if you change the parameters to getthe board in similar timeline price is the same
so only for patient people
tzapu
@tzapu
Mar 16 2016 08:06
yup
of for a final design
or*
Me No Dev
@me-no-dev
Mar 16 2016 08:07
yes, but that will usually get the elements on it as well
china will do better on that
tzapu
@tzapu
Mar 16 2016 08:07
dirtypcb is probabyl china :P
eh… i m still too new at all this
i wonder if i ll ever produce a full board in china
now that would be result :P
Me No Dev
@me-no-dev
Mar 16 2016 08:08
have to say, they are a bit pain to work with
you really must be exact and clear in all documentation
tzapu
@tzapu
Mar 16 2016 08:09
yeah…i can imagine so
Me No Dev
@me-no-dev
Mar 16 2016 08:09
and they have lots of holydays
tzapu
@tzapu
Mar 16 2016 08:10
:))
Me No Dev
@me-no-dev
Mar 16 2016 08:10
so they often do not work :)
tzapu
@tzapu
Mar 16 2016 08:10
new years just finished
not long ago
Me No Dev
@me-no-dev
Mar 16 2016 08:10
spring festival is to come shortly
tzapu
@tzapu
Mar 16 2016 08:10
but i have to say shipping this year through new year for various bits was a million times better for me than last year s new year
Me No Dev
@me-no-dev
Mar 16 2016 08:11
i hope they get better
shipping time of 1-8 weeks mens nothing to me
Ivan Grokhotkov
@igrr
Mar 16 2016 08:19
@Palatis not necessarily, std:: function can be bound to a member. In fact, mem_fn and others are kinda superseded by std:function since c++0x.
For instance we use std::bind to a member function in WebServer libaray
@Makuna I don't remember having such an issue open, although it does make sense to do that.
I wonder how many libraries now do #ifdef ESP8266 #include <pgmspace.h>
Me No Dev
@me-no-dev
Mar 16 2016 08:26
In one of my projects I have a compat include folder in the tools, that maps such differences (usually avr stuff)
and is always included in the build
Stavros Korokithakis
@skorokithakis
Mar 16 2016 09:20
@me-no-dev what @tzapu said is right, $14 for ten panels, 4 boards each. Two weeks to month to arrive
marksev1
@marksev1
Mar 16 2016 09:36
Awesome AdySan
@AdySan I'd like to chat a bit about your code :), once you'll have time, so we go a bit through it (since I'm a noob and might not understand all :) )
Aditya Tannu
@AdySan
Mar 16 2016 09:39
@marksev1 sure, in 8-10 hours from now
marksev1
@marksev1
Mar 16 2016 09:47
cool thanks! :)
Victor Tseng
@Palatis
Mar 16 2016 09:47
@igrr ohh yeah? need to update my c++ textbook.
std::function<void(const Foo&, int)> f_add_display = &Foo::print_add; something like this? kool.
Ivan Grokhotkov
@igrr
Mar 16 2016 09:51
not really, it's just std::function<void(int)> f_add_display = std::bind(&Foo::print_add, foo, std::placeholders::_1); where foo is an instance of Foo (reference or a pointer)
So you bind the implicit first argument (which is a pointer or reference, and leave the second one unbound using std::placeholders::_1
You could bind it to some value if you'd like
as in std::function<void(void)> f_add_42 = std::bind(&Foo::print_add, foo, 42);
http://en.cppreference.com/w/cpp/utility/functional/bind page has a nice example, check it out
Victor Tseng
@Palatis
Mar 16 2016 10:58
well lots of different ways to accomplish similar thing
tzapu
@tzapu
Mar 16 2016 11:25
has anyone got experience with travis ci and a simple esp8266 core lib build ?
seems i m doing something wrong
but i don t know what...
Me No Dev
@me-no-dev
Mar 16 2016 11:25
you can check the scripts I use for the async libs
i have travis running
tzapu
@tzapu
Mar 16 2016 11:25
uu
nice
thanks
tzapu
@tzapu
Mar 16 2016 11:37
well, mine s a lot simpler
seems to follow the same steps, although i m using boards manager
and arduin 1.6.8
and still nothing :(
and can t seem to get more verbose data out of it
$ arduino --verify $PWD/examples/AutoConnect/AutoConnect.ino
Picked up JAVA_TOOL_OPTIONS: 
Loading configuration...
Xlib:  extension "RANDR" missing on display ":1.0".
Initializing packages...
Preparing boards...
Verifying...
Property line '//arduino.esp8266.com/stable/package_esp8266com_index.json"' is invalid
Error compiling for board Generic ESP8266 Module.
The command "arduino --verify $PWD/examples/AutoConnect/AutoConnect.ino" exited with 1.
that propertly line is weird, as it for sure loads the board maanger url correctly
otherwise it can t even set the proper board type
soooo weird
Me No Dev
@me-no-dev
Mar 16 2016 11:41
no clues as I never used board manager for travis
tzapu
@tzapu
Mar 16 2016 11:42
yeah
Me No Dev
@me-no-dev
Mar 16 2016 11:42
i stray away from ArduinoBuilder also for now
too slow...
tzapu
@tzapu
Mar 16 2016 11:42
ah
ok
so maybe it is arduino
i should try with 1.6.5
unbelievalbe
my first working build
works with 1.6.5
same config except arduino ide :(
tzapu
@tzapu
Mar 16 2016 11:51
yeah, 1.6.7 and 1.6.7 result in broken build
1.6.5 fine and dandy
Me No Dev
@me-no-dev
Mar 16 2016 11:52
@igrr is using 1.6.8 on this repo but no board manager
nightly actually not 1.6.8
tzapu
@tzapu
Mar 16 2016 11:55
yeah, saw that
i think the boards manager parameter is somehow borked
in 1.6.7 +
Mario Mikočević
@mozgy
Mar 16 2016 12:05
I'm using 1.6.8 + git, working fine :)
both linux and win7
tzapu
@tzapu
Mar 16 2016 12:06
yeah
it s something in pref boards url
that trips it
/usr/local/share/arduino/arduino-builder -dump-prefs -logger=machine -hardware "/usr/local/share/arduino/hardware" -hardware "/home/travis/.arduino15/packages" -tools "/usr/local/share/arduino/tools-builder" -tools "/usr/local/share/arduino/hardware/tools/avr" -tools "/home/travis/.arduino15/packages" -built-in-libraries "/usr/local/share/arduino/libraries" -libraries "/home/travis/Arduino/libraries" -fqbn=esp8266:esp8266:generic:UploadTool=esptool,CpuFrequency=80,FlashFreq=40,FlashMode=dio,UploadSpeed=115200,FlashSize=512K64,ResetMethod=ck,Debug=Disabled,DebugLevel=None____ -ide-version=10607 -build-path "/tmp/buildc98e94dd602d6e73bee2cc93694b0ca7.tmp" -warnings=all -prefs="boardsmanager.additional.urls=http://arduino.esp8266.com/stable/package_esp8266com_index.json" -prefs="compiler.warning_level=all" -prefs=build.warn_data_percentage=75 -verbose "/home/travis/build/tzapu/WiFiManager/examples/AutoConnect/AutoConnect.ino"
Property line '//arduino.esp8266.com/stable/package_esp8266com_index.json"' is invalid
Error compiling.
somehow it considers this -prefs="boardsmanager.additional.urls=http://arduino.esp8266.com/stable/package_esp8266com_index.json"
a new line in the middle
char escaping?
Me No Dev
@me-no-dev
Mar 16 2016 12:18
yes
tzapu
@tzapu
Mar 16 2016 12:19
oh?
:P
how would i escape it, and why would it work fine to download esp8266 board def, but not on verify :(
Me No Dev
@me-no-dev
Mar 16 2016 12:27
you need to escape ":" with "\:"
as that is the most probable issue here
tzapu
@tzapu
Mar 16 2016 12:31
ok
lemme try
thank you
tzapu
@tzapu
Mar 16 2016 12:40
neah, it fails when trying to download the board
so it wouldn t even get that far then
up to verify
i feel like i should report a bug then..
andig
@andig
Mar 16 2016 12:56
@igrr, @me-no-dev have you seen this http://bbs.espressif.com/viewtopic.php?f=7&t=1781 ? LWIP is available for 1.5.2 now!!!
Ivan Grokhotkov
@igrr
Mar 16 2016 13:13
I haven't, thanks for the tip
We can update to 1.5.2 now
Me No Dev
@me-no-dev
Mar 16 2016 13:14
can we make an option to build it with the core
so we can actually try to fix and track issues?
Mario Mikočević
@mozgy
Mar 16 2016 13:16
I smell release 2.1.1 :)
Ivan Grokhotkov
@igrr
Mar 16 2016 13:17
we can place lwip source code along with the library, yes. i'm not sure what the benefit is vs. compiling it using a makefile though.
Me No Dev
@me-no-dev
Mar 16 2016 13:18
the benefit is a single step when I for example am trying to find where a problem lays
and no need to setup env for the makefile
Ivan Grokhotkov
@igrr
Mar 16 2016 13:19
so the workflow is that you modify something in LwIP, rebuild it along with the sketch and observe the result, am i right?
Me No Dev
@me-no-dev
Mar 16 2016 13:19
yes
Ivan Grokhotkov
@igrr
Mar 16 2016 13:20
okay
that would probably be a developer-only option though. no need to expose it to the users.
Me No Dev
@me-no-dev
Mar 16 2016 13:21
sure
Ivan Grokhotkov
@igrr
Mar 16 2016 13:22
also note that there is considerable difference in liblwip.a code generated by Espressif with xt-xcc and gcc
both in terms of size and instruction patterns
unfortunately gcc is not a winner when it comes to code size
Me No Dev
@me-no-dev
Mar 16 2016 13:23
if youinclude your build of lwip it will be the same right?
Ivan Grokhotkov
@igrr
Mar 16 2016 13:24
IRAM utilization bumps up considerably when building with gcc
Me No Dev
@me-no-dev
Mar 16 2016 13:24
here is a noob question
why do we not use xcc?
Ivan Grokhotkov
@igrr
Mar 16 2016 13:25
well, technically we can take lwip, make some mods, and build it with xcc
although that would be a bit shady in terms of licensing
Me No Dev
@me-no-dev
Mar 16 2016 13:26
so licensing is the problem?
Ivan Grokhotkov
@igrr
Mar 16 2016 13:26
xcc is only available to us from a leaked VM with an expired license
Endre Karlson
@ekarlso
Mar 16 2016 13:26
what's lwip ?
Me No Dev
@me-no-dev
Mar 16 2016 13:27
lwip is the network stack inside esp
Endre Karlson
@ekarlso
Mar 16 2016 13:27
ah
Ivan Grokhotkov
@igrr
Mar 16 2016 13:29
@me-no-dev i'm sure that if you find an issue in lwip itself, we can take that to espressif and they will make the fix a part of official release, in which case licensing will not be our problem
because they own an xcc license
and of course you can build lwip with xcc yourself, do some investigation, etc
andig
@andig
Mar 16 2016 13:32
@igrr I remember that xcc compile issue you had found. I was not able to remedy the use-after-free problems that we've assumed by manipulating the return types. At least I'd like to see if I can- with help of @me-no-dev get stable async server operations. I guess we could worry about code size afterwards?
anyway, if there is something to compile including lwip@gcc I'm stand-by for testing!
Ivan Grokhotkov
@igrr
Mar 16 2016 13:34
true, gcc does produce larger binary, which is especially important since many of lwip functions go into IRAM
i don't know whether this is too large though
just build it and see, i guess
Me No Dev
@me-no-dev
Mar 16 2016 13:35
first core needs to be 1.5.2 right
or is it already?
Ivan Grokhotkov
@igrr
Mar 16 2016 13:36
it's not, i have the update stashed in a local branch, will rebase that and open a pull request later today
andig
@andig
Mar 16 2016 13:36
thank you both for all your efforts :clap:
Me No Dev
@me-no-dev
Mar 16 2016 13:37
i have the lwip here ready for build and some free time :)
andig
@andig
Mar 16 2016 13:38
I can do some testing to generate dumps tonight
andig
@andig
Mar 16 2016 13:44
@igrr why is core on 1.5.1 currently- there was no lwip for that either?
Ivan Grokhotkov
@igrr
Mar 16 2016 13:45
because there were some fixes in 1.5.1 related to wifi, so there was no reason not to upgrade
(that is, i had to figure out the incompatibility issue with Espressif-built lwip)
andig
@andig
Mar 16 2016 13:46
I see, thanks.
marksev1
@marksev1
Mar 16 2016 14:24
AdySan, I showed some guy your example and he has some complaints, but for me its still good :), do you want to hear what he wrote?
marksev1
@marksev1
Mar 16 2016 15:19
@Makuna , if your library is better, than the one from Adafruit, will you maybe do an example for this functionality (esp8266+ws2812+mqtt) :D ? :) Its worth a try.
Aditya Tannu
@AdySan
Mar 16 2016 16:33
@marksev1 sure, criticism always welcome
Michael Miller
@Makuna
Mar 16 2016 17:14
@marksev1 My library can easily replace theirs as the API is pretty similar. So if they have an example or you can find one, it should be easy to switch.
Remember, my library works with almost all Arduino boards not just the esp8266. Further included examples should focus on the library features. I could add a link to external project that does this; but I don't use MQTT (Coap person myself) so I have no plans to write one.
@igrr I noticed that included SD library for esp8266 is including avr/pgmspace.
Arduino15\packages\esp8266\hardware\esp8266\2.1.0\libraries\SD\src\utility\SdFat.h(27):#include <avr/pgmspace.h>
@Links2004 ’s vnc viewer is there , my wifimanager :P hint hint
and quite a few other projects
got one vote left and it s damn hard deciding
Aditya Tannu
@AdySan
Mar 16 2016 17:47
@tzapu voted for you two! no ArduCam stuff out there?
tzapu
@tzapu
Mar 16 2016 18:17
not that i ve seen
and my project is far from ready
can send you a link if you want
long term timelapse machine
ah, and thanks @AdySan :D
i voted for people around here as well, wished i had one more vote or two though :P
have some problems with the available SD libs though and ran out of time to spend on it
SPIFFS are unusable in production let s say, it gets filled immediatelly and is too small
SD lib included in the esp core, does not seem to support long file names
and third party SDFat, seems pretty good, buuuut…is not compatible with the webserver stream function… and didn t get a chance to look at it yet
8.3 names suck :P
and let s call that the end of the avalanche of unsolicitated information :))
Aditya Tannu
@AdySan
Mar 16 2016 18:35
haha
ZaPpInG
@lrmoreno007
Mar 16 2016 19:28
@tzapu what is your project?
I found it. #6
ZaPpInG
@lrmoreno007
Mar 16 2016 19:34
I hate esp8266.com web. It is exasperating
tzapu
@tzapu
Mar 16 2016 20:05
:))
you d think they d put some links on the entries so you can have a quick glance at what you re voting
but neah...
i ve recognized links, stavros and chaeplin ’s projects in there
Aditya Tannu
@AdySan
Mar 16 2016 20:07
marksev1
@marksev1
Mar 16 2016 20:53
AdySan hi

He posted this comment:Btw. the example you post is not that good on ESP - because it could be that the ESP reboots, because you do all the animation stuff inside the callback of the MQTT client.
So if you get new mesaages, it could be blocked and the stack will overflow...

It is better to just set any flags and store the topic and messsage to variabnle
and set a flag, that new message arrived

And inside the loop you check for new messages and do the processign and animations

Also please always check for new mesage flag inside effect loops and return if new arrived

So you are on the safe way and did not get any stack overflows - and it is always up to date ;)
Prevedi