These are chat archives for esp8266/Arduino

29th
Dec 2015
brutzler
@brutzler
Dec 29 2015 00:03
Its a NodeMCU 1.0. No settings available
But in the boards.txt there is a nodemcuv2.build.flash_mode=dio
Steve Nelson
@zenmanenergy
Dec 29 2015 01:08
@me-no-dev no I’m not using a hub. My ftdi is plugging directly into the usb port on my mac. Can you send me a link to the hub you use?
Stavros Korokithakis
@skorokithakis
Dec 29 2015 01:18
is there a function that will set my hostname?
Chris Elsworth
@celsworth
Dec 29 2015 01:30
the esp doesn't really have a hostname as such?
I've not looked but I'm going to guess the ArduinoOTA class (or mDNS, whichever) just makes one up from the mac address
Stavros Korokithakis
@skorokithakis
Dec 29 2015 01:31
arduinoota does, i'll use that, thanks
Stavros Korokithakis
@skorokithakis
Dec 29 2015 01:46
hmm, i'm getting an upload error 255 from my FTDI uploader, has anyone run into that?
Stavros Korokithakis
@skorokithakis
Dec 29 2015 02:03
@ivankravets looks like USB upload fails if you use an auth password
niteshpatil004
@niteshpatil004
Dec 29 2015 02:32
SPIFFS Error: mkspiffs not found! , I got this error when I followed SPIFF setup instructions,http://esp8266.github.io/Arduino/versions/2.0.0/doc/filesystem.html , what might be the problem?
Chris Elsworth
@celsworth
Dec 29 2015 03:17
is the tool-mkspiffs package installed?
actually nm, assumed this was platformio and I guess its not
niteshpatil004
@niteshpatil004
Dec 29 2015 03:20
no
Stavros Korokithakis
@skorokithakis
Dec 29 2015 03:41
is there a way to ensure that GPIO pins are always pulled low when booting, to avoid them turning high at any point, unless i switch them myself?
Chris Elsworth
@celsworth
Dec 29 2015 03:42
nope. external resistors is about it
Stavros Korokithakis
@skorokithakis
Dec 29 2015 03:42
pulldowns, you mean?
Chris Elsworth
@celsworth
Dec 29 2015 03:42
yeah
Stavros Korokithakis
@skorokithakis
Dec 29 2015 03:43
do those help? is it floating when it boots, or is it actually outputting high?
Chris Elsworth
@celsworth
Dec 29 2015 03:43
floating mostly ime.. some gpios output odd signals, one of them actually outputs quite a high frequency signal on boot for some reason, I forget which tho
Stavros Korokithakis
@skorokithakis
Dec 29 2015 03:47
i'll test them, thanks
i love making pcbs
so easy
(let's hope they work when they come back from the fab)
Chris Elsworth
@celsworth
Dec 29 2015 03:47
heh, a new convert :)
Stavros Korokithakis
@skorokithakis
Dec 29 2015 03:47
man seriously
no contest
Chris Elsworth
@celsworth
Dec 29 2015 03:47
its fun too :)
Stavros Korokithakis
@skorokithakis
Dec 29 2015 03:47
yeah
and it beats everything else
soldered breadboards and the like
Chris Elsworth
@celsworth
Dec 29 2015 03:48
definitely, the only downside is the wait
Stavros Korokithakis
@skorokithakis
Dec 29 2015 03:48
i made a pcb with an ESP on it to control some relays
yeah :/
i wonder if i can find something that's slightly more expensive but much faster
Chris Elsworth
@celsworth
Dec 29 2015 03:49
another chip?
don't know, I've been wondering the same actually, I've not done much other than esp and some avr
Stavros Korokithakis
@skorokithakis
Dec 29 2015 03:49
no, pcb fab
Chris Elsworth
@celsworth
Dec 29 2015 03:49
oh, lol :)
Stavros Korokithakis
@skorokithakis
Dec 29 2015 03:49
the esp is plenty fast
dirtypcbs have a DHL option for an extra $20
that might be worth it
you know what else i love? OTA
i can deploy my pcb wherever and update it remotely with one command with platformio
shit's awesome
Aditya Tannu
@AdySan
Dec 29 2015 04:16
last time I made a PCB was 10 years or so ago. Still find it hard to convince myself to get into it again. Back then there wasn't much SMD stuff, so it was a lot easier too.
only if making them at home was much easier. This seems like so much trouble for one power supply board. https://blog.iotpipe.io/2015/12/27/building-a-power-supply-for-the-esp8266/
Martin Ayotte
@martinayotte
Dec 29 2015 04:50
@AdySan , my first SMD design was done more than 20 years ago, but of course, it was DYI doable SMDs and SOPs, not those BallGrids that we can see these days. I'm still doing some PCB with higher pitches such as LQFP64 and LQFP100, but don't ask me some with BallGrids, I still don't have HotAir gun ... :-)
Aditya Tannu
@AdySan
Dec 29 2015 04:51
@martinayotte When things like XCarve get cheaper and we can print em at home without messing with chemicals, I'd love to get back to it.
Martin Ayotte
@martinayotte
Dec 29 2015 04:53
Thanks for the XCarve, it look interesting, but it doesn't resolve issues about soldering yourself any BallGrids chips ... ;-)
Aditya Tannu
@AdySan
Dec 29 2015 04:56
Yep, that's true. I ordered some ESP-09s, just to see how small they were. Hopefully someday I'll make some use. I haven't come across a single breakout board design for those on the internet yet.
Anyone here had a look at ESP32 BLE specs yet? Is it going to be able to run something like this nRF51/52 project? https://github.com/aanon4/HomeKit
I have a couple of HomeKit accessories working at home on ESP8266, but the RaspberryPi as a bridge to translate the HomeKit protocol is somewhat unreliable. It'll be really nice to have the ESP itself run something like this.
Aditya Tannu
@AdySan
Dec 29 2015 05:04
Testing IRC interface via Adium on a Mac.
Does everyone use the web interface for this chat?
Martin Ayotte
@martinayotte
Dec 29 2015 05:05
I've ask to become a BetaUser for ESP32, but with limited first production, I think they didn't keep my name on the list (still hoping to receive it, but not much hope left). But all those are not BallGrids, simply QFNs, which can still be soldered by DYI people, although a good challenge.
Aditya Tannu
@AdySan
Dec 29 2015 05:06
Yeah, that base board seems comparable to ESP-12E. The NodeMCU devkit people are already working on a new design.
@vowstar i think
bidyutper
@bidyutper
Dec 29 2015 06:49
@skorokithakis found this interestin project based on Mqtt http://knolleary.net/2010/04/22/how-i-got-onto-prime-time-bbc-one/
Stavros Korokithakis
@skorokithakis
Dec 29 2015 12:35
@bidyutper hah, that's pretty nice
i want one of those headsets
does anyone know if i can reconnect to wifi without rebooting?
bidyutper
@bidyutper
Dec 29 2015 12:39
@skorokithakis check out this u can find in ebay,...http://www.frontiernerds.com/brain-hack
Stavros Korokithakis
@skorokithakis
Dec 29 2015 12:45
hmm, mindflex looks interesting
Ivan Kravets
@ivankravets
Dec 29 2015 12:56

@skorokithakis

looks like USB upload fails if you use an auth password

Which version of PlatformIO do you use? platformio --version

Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:02
2.6.3
i left the auth password in the config file and was getting error 255
Ivan Kravets
@ivankravets
Dec 29 2015 13:04
I've just asked my colleague and he tested it. Works like a charm.
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:04
hmm, odd
Ivan Kravets
@ivankravets
Dec 29 2015 13:04
Could you provide console output with error?
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:05
let me try to connect the ftdi again
Ivan Kravets
@ivankravets
Dec 29 2015 13:05
thanks
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:08
is there a way to just upload the firmware without compiling first?
worked without the pw
Ivan Kravets
@ivankravets
Dec 29 2015 13:10
The problem is with espota. It doesn't handle correct arguments after firmware.bin. This issue is fixed in PlatformIO 2.7.0.dev7. I hope I'll release it today
Try development version.
pip uninstall platformio
pip install https://github.com/platformio/platformio/archive/develop.zip
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:13
@ivankravets i'll try it now, thanks
does uploadlazy ALWAYS upload without rebuilding?
Ivan Kravets
@ivankravets
Dec 29 2015 13:13
Thanks, wait for the feedback
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:13
or only if the code is unchanged?
Ivan Kravets
@ivankravets
Dec 29 2015 13:13

does uploadlazy ALWAYS upload without rebuilding?

Always

We use this feature for http://smartanthill.org
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:14
hmm, maybe it would be worth checksumming src and lib every build and only rebuilding if the checksum is different from the last one
Ivan Kravets
@ivankravets
Dec 29 2015 13:14
I don't understand you quesiton
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:15
make platformio only build the firmware if source files actually changed
Ivan Kravets
@ivankravets
Dec 29 2015 13:15
There 2 ways how PlatformIO process project and targets

make platformio only build the firmware if source files actually changed

It does it by default

Only rebuilds changed files
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:15
hmm, mine seems to be waiting a long time, even if i didn't change anything
Chris Elsworth
@celsworth
Dec 29 2015 13:15
what are you building on?
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:16
macbook air
Chris Elsworth
@celsworth
Dec 29 2015 13:16
is it by any chance, vmware?
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:16
no, just raw metal
Ivan Kravets
@ivankravets
Dec 29 2015 13:16
I thought that you mean "I have firmware.bin and want to use PlatformIO only for uploading"
Chris Elsworth
@celsworth
Dec 29 2015 13:16
hm ok.. I've seen very slow behaviour in vmware on a mac, but not raw
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:16
@ivankravets oh, no, it just takes a long time before starting the upload even if i don't need to rebuild anything
Ivan Kravets
@ivankravets
Dec 29 2015 13:17
@/all Anyone use SPIFFS?
@skorokithakis does it print any output? Like build/upload results?
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:19
Ivan Kravets
@ivankravets
Dec 29 2015 13:20
@skorokithakis I see that it works now?
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:21
@ivankravets look at the timestamps: https://www.pastery.net/xxmgtb/
18 seconds between running the command and printing the first line
Ivan Kravets
@ivankravets
Dec 29 2015 13:22
WOW
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:22
yeah, it's super damn slow
also, does anyone know why setting GPIO5 to OUTPUT doesn't seem to work?
Ivan Kravets
@ivankravets
Dec 29 2015 13:22
Do you have enabled Internet on that machine?
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:22
@ivankravets yeah
Chris Elsworth
@celsworth
Dec 29 2015 13:23
@skorokithakis that should work fine. I use GPIO5 as output all the time
dodgy board? tested with a meter?
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:23
@celsworth hmm, odd, maybe i'm being dumb
Ivan Kravets
@ivankravets
Dec 29 2015 13:23
@skorokithakis give me please ping google.com
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:23
no, i hooked up a relay
FWeinb
@FWeinb
Dec 29 2015 13:23
Wow PlatformIO is just awesome. Finally a decent way to setup a command line build stack.
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:23
PING google.com (74.125.71.138) 56(84) bytes of data.
64 bytes from wn-in-f138.1e100.net (74.125.71.138): icmp_seq=1 ttl=44 time=58.9 ms
64 bytes from wn-in-f138.1e100.net (74.125.71.138): icmp_seq=2 ttl=44 time=58.2 ms
64 bytes from wn-in-f138.1e100.net (74.125.71.138): icmp_seq=3 ttl=44 time=59.8 ms
Ivan Kravets
@ivankravets
Dec 29 2015 13:23
@skorokithakis this is virtual machine?
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:23
@FWeinb yeah, i love it
@ivankravets no, bare metal
Chris Elsworth
@celsworth
Dec 29 2015 13:24
and all the drives are local (ie not network drives?)
it does a lot of disk access, may be slow if this is network share
FWeinb
@FWeinb
Dec 29 2015 13:24
Just got it running in 10min. Sming and some other frameworks took ages.
Ivan Kravets
@ivankravets
Dec 29 2015 13:24

Guys, could someone re-test this SPIFFS? platformio/platformio#382

I want to release 2.7.0 today

Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:24
nah, everything is local
Ivan Kravets
@ivankravets
Dec 29 2015 13:25
@skorokithakis I'll contact you privately
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:32
@celsworth i figured out what the problem was :/
my schematic has gpio4 and 5 swapped
Chris Elsworth
@celsworth
Dec 29 2015 13:33
ah ;)
some of the breakout boards have that issue too, annoying
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:36
i'm seeing conflicting schematics
which one is your gpio5?
Chris Elsworth
@celsworth
Dec 29 2015 13:36
on what type of board?
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:36
12e
Chris Elsworth
@celsworth
Dec 29 2015 13:37
down the right hand side (with antenna at top) it goes TX/RX/5/4 I think
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:37
maybe the 12 and 12e have 4 and 5 swapped?
yeah
FWeinb
@FWeinb
Dec 29 2015 13:38
Has anyone experience on how long it takes to get a library into the platformio registry? Why is there a moderation step anyway? npm is working without moderation.
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:39
@FWeinb you can just ask @ivankravets :P
Ivan Kravets
@ivankravets
Dec 29 2015 13:40
@FWeinb I moderate it.
Without moderation we will have 30k libraries , where the only 100 will be working
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:40
@ivankravets i use http://github.com/Imroy/pubsubclient for mqtt, how can i add it to platformio?
Ivan Kravets
@ivankravets
Dec 29 2015 13:41
This library is added
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:41
oh, where?
FWeinb
@FWeinb
Dec 29 2015 13:41
@ivankravets What would be the problem with that?
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:41
@FWeinb i also prefer few, high-quality libraries
Ivan Kravets
@ivankravets
Dec 29 2015 13:42
Need to specify correctly where is source code located, examples, etc
in NPM case they have AGREED package structure
In this case no need moderation
Chris Elsworth
@celsworth
Dec 29 2015 13:42
is it same manifest as arduino ide used?
Ivan Kravets
@ivankravets
Dec 29 2015 13:43
in PlatformIO case, developer decides in which structure to keep own source code
no, Arduino IDE invited own bicycle.
I proposed them to use library.json 1 year ago
FWeinb
@FWeinb
Dec 29 2015 13:44
Okay. That is a valid point. I followed the guid here and there is nothing about the source code location.
Ivan Kravets
@ivankravets
Dec 29 2015 13:44
then 4-5months ago they decided to invent library.properties
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:44
@ivankravets do you know how i can find that pubsub lib?
is it #89? it only says arduino
Ivan Kravets
@ivankravets
Dec 29 2015 13:45

I followed the guid here and there is nothing about the source code location.

What do you mean? See include and exclude fields

FWeinb
@FWeinb
Dec 29 2015 13:47
If a library source code is located at GitHub, then you need to specify only these fields in the library.json: That is kinda misleading if I have to specify include and exclude too.
Ivan Kravets
@ivankravets
Dec 29 2015 13:48
If source code located in the root for project or in src directory, then you no need to specify include/exclude fields
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:48
@ivankravets i don't think the library i showed you is in the repo
looks like only the arduino one is
FWeinb
@FWeinb
Dec 29 2015 13:49
Okay, will do that. Should I just do a reregister with platformio?
I don't get why this should not be correct: https://github.com/FWeinb/NTPClient/blob/master/library.json
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:51
that's not json at all
it's html
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:52
that's really odd
github is not returning an html mimetype for the first page for me
FWeinb
@FWeinb
Dec 29 2015 13:53
λ platformio lib register https://raw.githubusercontent.com/FWeinb/NTPClient/master/library.json
The library has been successfully registered and is waiting for moderation
That was what I passed to the cli client.
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:54
that looks fine
Stavros Korokithakis
@skorokithakis
Dec 29 2015 13:59
@celsworth i figured out the pin problem
i was being an idiot, as usual
Chris Elsworth
@celsworth
Dec 29 2015 14:10
other than just the gpios reversed?
Stavros Korokithakis
@skorokithakis
Dec 29 2015 14:10
they weren't reversed, i had just migrated to a different array for the pin specs and was updating the old one
Chris Elsworth
@celsworth
Dec 29 2015 14:23
for proper github content-type headers, you may want to check out https://rawgit.com
FWeinb
@FWeinb
Dec 29 2015 14:24
Thanks @celsworth. I don't know if the content-type header is checked by the platformio crawler.
Ivan Kravets
@ivankravets
Dec 29 2015 14:36
FWeinb
@FWeinb
Dec 29 2015 14:36
Awesome! Thanks @ivankravets
Ivan Kravets
@ivankravets
Dec 29 2015 14:37
You can make pull request to other libs and don't wait while end developer will merge them
Just use library.json from your PR.
I mean, that PlatformIO doesn't require that library.json should be merged/located in the lib
this is just manifest which describes how PlatformIO should extract source code from your repo/archive etc.
FWeinb
@FWeinb
Dec 29 2015 14:38
@ivankravets How are you handeling versioning? I like semver or isn't that supported by the platformio cli tool?
Mario Mikočević
@mozgy
Dec 29 2015 14:38
@skorokithakis first esp12(e) boards had 4 and 5 swapped on silk, later ones are ok
Ivan Kravets
@ivankravets
Dec 29 2015 14:38
Please open issue for semver - I'll implement it in PlatformIO 3.0
Stavros Korokithakis
@skorokithakis
Dec 29 2015 14:39
@mozgy oh, hmm, so the schematics on the site are wrong?
FWeinb
@FWeinb
Dec 29 2015 14:39
@ivankravets will do.
Mario Mikočević
@mozgy
Dec 29 2015 14:40
well, schematics are always right
just order of it isnt :)
Ivan Kravets
@ivankravets
Dec 29 2015 14:40
Guys, you should understand that I can't quickly resolve all requests/issues. PlatformIO is very huge project with different sub-project inside: builder, library manager, etc.
Stavros Korokithakis
@skorokithakis
Dec 29 2015 14:40
@mozgy haha, true
Mario Mikočević
@mozgy
Dec 29 2015 14:40
anyway, what @celsworth said is true
Ivan Kravets
@ivankravets
Dec 29 2015 14:40
It's open source, welcome with contributions
Mario Mikočević
@mozgy
Dec 29 2015 14:41
tx rx 5 4 ..
Stavros Korokithakis
@skorokithakis
Dec 29 2015 14:41
@ivankravets i'll open PRs for whatever i find
Ivan Kravets
@ivankravets
Dec 29 2015 14:41
Thanks
The other way - make "commercial version" of PlatformIO and works on it whole day
I'm doing it in my spare time
I hoped that people will help with it, but please take a look at this stats for 1.5year https://github.com/platformio/platformio/graphs/contributors
All like only use :)
Stavros Korokithakis
@skorokithakis
Dec 29 2015 14:43
ouch :/
Ivan Kravets
@ivankravets
Dec 29 2015 14:45
This is OK for me :) Thanks a lot that you use PlatformIO. It's the best awards for me... But :) Be ready for "open-source" development :)
Stavros Korokithakis
@skorokithakis
Dec 29 2015 14:45
yeah, definitely
i love platformio
FWeinb
@FWeinb
Dec 29 2015 14:45
Awesome work @ivankravets I have no idea way Arduino isn't building exactly what you are doing. It is a pitty that they reinvent the wheel for everything.
Ivan Kravets
@ivankravets
Dec 29 2015 14:45
He : 0
I proposed Arduino: PlatformIO builder, libary manager and etc 1 year ago
Stavros Korokithakis
@skorokithakis
Dec 29 2015 14:46
btw can i donate anywhere?
Ivan Kravets
@ivankravets
Dec 29 2015 14:46
PlatformIO builder is faster in 1-4 times
But.. The is BIG problem of PlatformIO which other vendors don't like.
PlatformIO supports DIFFERENT vendors and proposes the same approach for each of them
FWeinb
@FWeinb
Dec 29 2015 14:47
I see that Arduino is going into the same direction platformio is (with arduino-builder). But supporting a unified build system for multiple targets is just awesome.
Ivan Kravets
@ivankravets
Dec 29 2015 14:47
It could be interested for some vendors if it will support only that vendor
yes yes
Do you see interest for Arduino to support PlatformIO where people will by ESP8266 and not Arduino UNO? :)
Stavros Korokithakis
@skorokithakis
Dec 29 2015 14:48
well, platformio supports both
Ivan Kravets
@ivankravets
Dec 29 2015 14:48
Or Espressif will support PlatformIO and say people "you can buy ARM-based boards and use MBED framework :)
Stavros Korokithakis
@skorokithakis
Dec 29 2015 14:49
so why not? if i have an arduino, i use platformio to program the arduino
Ivan Kravets
@ivankravets
Dec 29 2015 14:49
With PlatformIO you have a choice
with Arduino IDE - you don't have a choice
FWeinb
@FWeinb
Dec 29 2015 14:49
Espressif is totally winning with all the effort that is put into making it Arduino compatible.
Ivan Kravets
@ivankravets
Dec 29 2015 14:50
Only specified boards, libraries and ..
Ok. maybe I'll discuss it publically
To make some features as "commercial"
You don't know anything about PlatformIO 3.0. I'm working on it too....
It will be the next step into the future or embedded :)
Stavros Korokithakis
@skorokithakis
Dec 29 2015 14:51
platformio/platformio#411
here's a contribution :smile:
Ivan Kravets
@ivankravets
Dec 29 2015 14:52
Thanks.
I'll remove this requrement today :)
no need in it
Stavros Korokithakis
@skorokithakis
Dec 29 2015 14:52
all of it?
Ivan Kravets
@ivankravets
Dec 29 2015 14:52
yes
Stavros Korokithakis
@skorokithakis
Dec 29 2015 14:52
how come?
Ivan Kravets
@ivankravets
Dec 29 2015 14:53
all dependencies are specified in setup.py
I've added this file for services which give me a badge :))
to know which packages are obsolate
:))
Stavros Korokithakis
@skorokithakis
Dec 29 2015 14:55
oh right
you should probably use ~= there too
FWeinb
@FWeinb
Dec 29 2015 14:58
Are lib dependencies always global and not project based? This could be a problem when dealing with multiple projets using different version of the same lib.
Stavros Korokithakis
@skorokithakis
Dec 29 2015 14:59
@ivankravets ~= is better than >= because you don't get backwards-incompatible releases
requests 3.0.0 may change your api and break your build
Markus
@Links2004
Dec 29 2015 15:48
WiFi rework done for now #1323
will keep the pull request open until tomorrow evening.
some review / testings are welcome its a big change ;)
Stavros Korokithakis
@skorokithakis
Dec 29 2015 15:50
ooh fantastic
Harrison Mclean
@h4rm0n1c
Dec 29 2015 15:58
mmmm, asynchronous
FWeinb
@FWeinb
Dec 29 2015 16:01

Trying to compile the master branch with platformio is resulting in this:

~/.platformio/packages/framework-arduinoespressif/tools/sdk/lib/libcrypto.a(aes-internal.o):(.irom0.text+0x0): undefined reference to `rcons'

I checkout esp8266/Arduino into ~/.platformio/packages/framework-arduinoespressif and created a version.txt
Me No Dev
@me-no-dev
Dec 29 2015 16:04
@Links2004 any chnce you make the status change handler to actually accept multiple handers?
like have different servicess attach to listen and act on change
TCP servers for example to restart on connect
Markus
@Links2004
Dec 29 2015 16:05
@me-no-dev yes possible will use vector.
Me No Dev
@me-no-dev
Dec 29 2015 16:05
maye even like the pinInterrupt way
so you can listen for p[articular event
Markus
@Links2004
Dec 29 2015 16:06
yes can add an optional filter parameter
Me No Dev
@me-no-dev
Dec 29 2015 16:06
great
Markus
@Links2004
Dec 29 2015 16:07
note: attachInterrupt supports only one callback per pin
FWeinb
@FWeinb
Dec 29 2015 16:08
Do I have to recompile the SDK in tool?
Me No Dev
@me-no-dev
Dec 29 2015 16:08
@Links2004 sadly yes... bad example maybe :) have been thinkin about it lately though
maybe more like the HTTP Server handlers
Markus
@Links2004
Dec 29 2015 16:10
std::vector will do that ;)
Markus
@Links2004
Dec 29 2015 16:32
@me-no-dev Links2004/Arduino@85905c1
Me No Dev
@me-no-dev
Dec 29 2015 16:33
great! :)
sticilface
@sticilface
Dec 29 2015 16:34
@FWeinb see here platformio/platformio#401
works for me now. just replace the linker scripts
FWeinb
@FWeinb
Dec 29 2015 16:36
Thanks. That should get it working.
I did that but still the same.
just had to switch branch on the ldscripts
Markus
@Links2004
Dec 29 2015 16:46
@me-no-dev have add a WIFI_HAS_EVENT_CALLBACK define, too keep external library compatible to both if you use the event.
Ivan Kravets
@ivankravets
Dec 29 2015 17:23

@FWeinb

Are lib dependencies always global and not project based?

You can make them dependent per project. See http://docs.platformio.org/en/latest/projectconf.html#lib-install

FWeinb
@FWeinb
Dec 29 2015 17:25
Awesome! Great work with platformio.
This message was deleted
@ivankravets But I can't pin it do a specify version?
sticilface
@sticilface
Dec 29 2015 17:31
Trying out the WiFi branch with callback and getting a strange error when i try to compile with platformio but not with the arduino IDE. happens very late...
Ivan Kravets
@ivankravets
Dec 29 2015 17:31
@FWeinb please open issue for it too.
sticilface
@sticilface
Dec 29 2015 17:32
void onEvent(WiFiEventCb cbEvent, WiFiEvent_t event = WIFI_EVENT_MAX);
^
.pioenvs/nodemcu/ESP8266WiFi/ESP8266WiFiGeneric.h:44:14: note:   no known conversion for argument 2 from '<anonymous enum>' to 'WiFiEvent_t'
scons: *** [.pioenvs/nodemcu/ESPmanager/ESPmanager.o] Error 1
Ivan Kravets
@ivankravets
Dec 29 2015 17:33
FWeinb
@FWeinb
Dec 29 2015 17:41
@ivankravets Opened the issues.
FWeinb
@FWeinb
Dec 29 2015 17:46
@sticilface for me the WiFi branch is compiling without any issues.
sticilface
@sticilface
Dec 29 2015 18:16
it compiles fine, just not if i try to attach an onevent handle.. give it a go
@ivankravets I gave you all that and you resolved that issue with the https://github.com/platformio/platformio-pkg-ldscripts/tree/esp8266_stage
Ivan Kravets
@ivankravets
Dec 29 2015 18:19
@FWeinb thanks! I have a lot of issues for the holidays now :)
@sticilface I mean if you have any problems using development version of ESP8266 Arduino-based framework, then you need to provide me all info which is described in item 5 of https://github.com/platformio/platformio/issues/401#issuecomment-166958952
@sticilface I don't have ESP8266 board, we don't support beta software. However, if you provide detailed info that some code works with "your dev kits" and doesn't work with PlatformIO - then I'll look on it.
@sticilface I hope you understand PlatformIO: 200 boards, 15 development platforms and 7 frameworks. What do you think, will you support beta/development software? :smile:
FWeinb
@FWeinb
Dec 29 2015 18:25
@sticilface Attaching an handler is working fine here.
sticilface
@sticilface
Dec 29 2015 18:25
of course... sorry i misunderstood!
Ivan Kravets
@ivankravets
Dec 29 2015 18:26
@thanks I'm waiting for detailed info. Thanks.
sticilface
@sticilface
Dec 29 2015 18:29
yes, let me be sure its an platformio issue.. not sure that it is yet.
@FWeinb can you try adding a specific handler for an event like EVENT_STAMODE_DISCONNECTED
FWeinb
@FWeinb
Dec 29 2015 18:30
WiFi.onEvent(onEvent, WIFI_EVENT_STAMODE_DISCONNECTED); is working fine.
(Note: these events are prefixed with WIFI_)
sticilface
@sticilface
Dec 29 2015 18:31
ah....
man... i thought i even copy pasted it from the struct definition... thanks :)
FWeinb
@FWeinb
Dec 29 2015 18:36
No problem. Things are working well with the new WiFi class.

But I get this warning when compiling @Links2004 WiFi class :

core_esp8266_phy.c:248:7: warning: incompatible implicit declaration of built-in function 'memcpy'

sticilface
@sticilface
Dec 29 2015 18:44
@Links2004 whats the use case for the reconnect() function.. can't quite get my head around it as "if" i've got it right then if placed in the onevent callback say for a WIFI_EVENT_STAMODE_DISCONNECTED then it will execute an probably return failed, as it has not had enough time to connect.. correct me if I'm wrong
Markus
@Links2004
Dec 29 2015 19:25
@sticilface it not destined to be pleased inside the callback, its make to be used in code to force a reconnect, @mozgy requested it.
Mario Mikočević
@mozgy
Dec 29 2015 19:27
@Links2004 suggestion -> use switch-case in ESP8266WiFiClass::status and ESP8266WiFiClass::encryptionType
oh, Markus did it already for second part
tzapu
@tzapu
Dec 29 2015 19:30
@Links2004 i would find very useful a function to set ssid/pass for next connection, but don t attempt to connect as well
sticilface
@sticilface
Dec 29 2015 19:31
ah ok. furryenough
FWeinb
@FWeinb
Dec 29 2015 19:32
@mozgy There is a switch-case there and there.
Markus
@Links2004
Dec 29 2015 19:33
@tzapu the sdk will connect to the new setting if you change them.
what exactly you try to reach?
Mario Mikočević
@mozgy
Dec 29 2015 19:34
ah ok, reading it orderly ..
Markus
@Links2004
Dec 29 2015 19:35
for review without the diff you can use this link:
https://github.com/Links2004/Arduino/tree/WiFi/libraries/ESP8266WiFi/src
tzapu
@tzapu
Dec 29 2015 19:36
in wifimanager, i have some people for which the connection simply fails after trying to connect with the a good set of wifi user/password and it only works after a reboot
i d like to be able to have a flag i can set that would just let me set the ssid and pass and then reset without trying to connect
Mario Mikočević
@mozgy
Dec 29 2015 19:39
thx, I like to read it orderly to see rework path :)
tzapu
@tzapu
Dec 29 2015 19:39
to be more explicit, i d like to do that in my own library, what i d need from the main WiFi lib was just to be able to write user/pass without going through connect attempt
Markus
@Links2004
Dec 29 2015 19:41
@tzapu you can hook the WiFi event to see the disconnect, but you can not changing the config without connection that easy,
using wifi_station_set_config will result in a connecting try.
may it not connect automatic when wifi_station_set_auto_connect is used but this all needs testing.
i can add a parameter to begin to not call wifi_station_connect may it work, for your case.
tzapu
@tzapu
Dec 29 2015 19:46
Nice
Markus
@Links2004
Dec 29 2015 19:46
will add some API for wifi_station_set_auto_connect too, can you test it for you use case?
tzapu
@tzapu
Dec 29 2015 19:46
I think so
Away from computer now though
So don t take it as a priority
tzapu
@tzapu
Dec 29 2015 19:54
This is just some icing on the cake really, but this issue is more worrying esp8266/Arduino#1292
Since you are in the area of reworking all that
Markus
@Links2004
Dec 29 2015 19:59
no idea where this problem is coming from right now, may simple retest it with the new WiFi stuff,
I reworked the mode change stuff may it helps.
tzapu
@tzapu
Dec 29 2015 20:01
Thank you very much
Will do all the tests i can think as soon as inam able
Markus
@Links2004
Dec 29 2015 20:03
@tzapu esp8266/Arduino@4a68612
tzapu
@tzapu
Dec 29 2015 20:13
Nice
Si setAutoconnect false
So*
Then begin with connect also false
Lovely
Thank you @Links2004 , you are the man, will try to test asap
Johan Euphrosine
@proppy
Dec 29 2015 22:19
Hi there, I've been using the new HTTP client library. So far it's great!
I wondering if a non-blocking connect would be worth it. It could be useful to yield control back to the sketch in order to blink LEDs while waiting for the first server connection.
Chris Elsworth
@celsworth
Dec 29 2015 22:23
/agree :)
I wonder if the |= O_NONBLOCK is all that's needed
Chris Elsworth
@celsworth
Dec 29 2015 22:25
well the http library will need callbacks adding for when it connects and telling you what happened, I guess
Johan Euphrosine
@proppy
Dec 29 2015 22:25
I was more thinking of something poll based rather than dealing with callback
Chris Elsworth
@celsworth
Dec 29 2015 22:25
true, polling does seem to be the arduino way
Johan Euphrosine
@proppy
Dec 29 2015 22:26
void loop() { if (!http.connected()) { digitalWrite(LED, !digitalRead(LED)); delay(200); return; } } seems more arduinish :)
This message was deleted
ho, cool gitter support editing messages ;)
Chris Elsworth
@celsworth
Dec 29 2015 22:31
nah, yield just hands control back to the OS for a while then resumes
otherwise you get wdt reset
Johan Euphrosine
@proppy
Dec 29 2015 22:32
yes, but http://lwip.wikia.com/wiki/Raw/TCP#TCP_connection_functions seems to say it tcp_connect returns immediatly
The tcp_connect() function returns immediately; it does not wait for the connection to be properly setup. Instead, it will call the function specified as the fourth argument (the "connected" argument) when the connection is established.
and it dispatch callback when you call sys_check_timeouts in the main loop
but I don't see where the esp core call that :)
Chris Elsworth
@celsworth
Dec 29 2015 22:43
well, espressif wrapped lwip with their own espconn_ stuff
so it is likely hidden from us
Johan Euphrosine
@proppy
Dec 29 2015 22:45
oh I was under the impression that there was a vendored copy of lwip: https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WiFi/src/lwip
it's only for the headers?
Chris Elsworth
@celsworth
Dec 29 2015 22:46
actually I'm not sure why those headers are there.. the library in use is liblwip.a in https://github.com/esp8266/Arduino/tree/master/tools/sdk/lib
might have to wait for a core dev to help out here :)
so from some internal timer within the esp_yield() I suppose
Chris Elsworth
@celsworth
Dec 29 2015 22:53
can't see esp_yield in the sdk docs, or defined in this core.. so where's that coming from
oh there it is, in that extern C block
ends up calling cont_yield, which is a bit of asm, getting a bit beyond me now
Markus
@Links2004
Dec 29 2015 22:58
esp_yield will give control back to the OS / SDK to do the WiFi stuff, and "returns" only if esp_schedule is called from the OS,
in this case https://github.com/esp8266/Arduino/blob/342c4ae6fb847bfc787f80b89a2bb888d942dc32/libraries/ESP8266WiFi/src/WiFiClient.cpp#L142
Chris Elsworth
@celsworth
Dec 29 2015 22:58
ok, so thats called in the callback, makes sense now :)
Johan Euphrosine
@proppy
Dec 29 2015 22:59
yes, it seems that the yield will return just after the cont_run call for the loop wrapper
and then the next cont_run will "continue" the execution where esp_yield was called?
Johan Euphrosine
@proppy
Dec 29 2015 23:01
@Links2004 so, it's effectively blocking until lwip calls the 'connected' callback?
Markus
@Links2004
Dec 29 2015 23:01
yes exact.
Johan Euphrosine
@proppy
Dec 29 2015 23:01
@Links2004 cool, thanks for lighting things up! it was very dark in there ;)
@Links2004 what would happen if we didn't call esp_yield in there, would the sketch yield back control the the OS eventually?
oh and it seems that yield() / schedule() is called every 16000 us anyway
(or maybe I'm reading optimistic_yield wrong)
Markus
@Links2004
Dec 29 2015 23:06
if you not call esp_yield at some point the connect event from lwip kicks in an triggers a esp_schedule
this will kick what ever is waiting currently, this will end in chaos and many side effects.
Chris Elsworth
@celsworth
Dec 29 2015 23:06
only if it gets called at least that often :)
Markus
@Links2004
Dec 29 2015 23:07
if you remove the esp_yield you need to rewrite the WiFiClient::_connected to.
Johan Euphrosine
@proppy
Dec 29 2015 23:07
yes, I was wondering what would happen if we removed both
because it seems that the loop is just rescheduling itself
Markus
@Links2004
Dec 29 2015 23:08
the esp_yield is used at every point to "stop" the sketch, if we wait for an event.
@proppy yes the arduino loop is designed to run endless ;)
Johan Euphrosine
@proppy
Dec 29 2015 23:09
yes, I was mainly wondering if the sketch would still work, if we removed both the esp_yield and the esp_scheduled
and were activelly polling for _client != NULL (i.e: the side effect of the callback)
that way you could blink a LED while waiting for the tcp connection to be made
Markus
@Links2004
Dec 29 2015 23:10
the connect will allays return no client, not what expected in code.
or better say connection failed.
Johan Euphrosine
@proppy
Dec 29 2015 23:11
yes, but at some point a schedule() call will fire the callback?
Johan Euphrosine
@proppy
Dec 29 2015 23:12
oh yes you're right
Markus
@Links2004
Dec 29 2015 23:12
its possible to add a connect async parameter for advanced usage, but a general change will lead to big problems for the most usecases.
Johan Euphrosine
@proppy
Dec 29 2015 23:13
so it'd be better to add a connect_noblock() method
with it's own callback
yes, makes total sense
I'll prototype something a subclass and let you know how it goes :)
thanks for putting everything as protected ;)
Markus
@Links2004
Dec 29 2015 23:14
a new parameter + a second callback shut do it,
reuse as most code as possible, makes the "maintenance" easier later on ;)
Johan Euphrosine
@proppy
Dec 29 2015 23:16
yes, I'll first do it as a subclass then send something cleaner upstream :)
@Links2004 what I'm still not clear about is where in code the control flow back from yield() to the OS
Oh I see now
that's because yield returns here
and it will just return from the task callback
to the OS
Johan Euphrosine
@proppy
Dec 29 2015 23:21
and since it didn't made it to the esp_schedule() call at the end of loop_wrapper, it will never comes back to the sketch unless something else call esp_schedule.
Markus
@Links2004
Dec 29 2015 23:22
yes, and that else is the SDK or OS, based on what is going on.