These are chat archives for esp8266/Arduino

6th
Nov 2015
tzapu
@tzapu
Nov 06 2015 05:17
hi guys, does OTA work with ide 1.6.6 now ? or still limited to 1.6.5 ?
Ivan Grokhotkov
@igrr
Nov 06 2015 06:47
@seclorum "config" is actually within crosstool-ng itself, it is called xtensa-lx106-elf

So on Linux you just follow crosstool-ng manual and do something like

./bootstrap && ./configure --prefix=`pwd` && make && make install
./ct-ng xtensa-lx106-elf
./ct-ng build

After that the toolchain will be inside builds/xtensa-lx106-elf directory

On OS X things get a bit more tricky: you need to run crosstool-ng on a case-sensitive volume, plus you need some GNU tools from macports or homebrew
Ivan Grokhotkov
@igrr
Nov 06 2015 06:53
@seclorum btw, @kireevco has been working on build scripts for the toolchain recently: https://github.com/kireevco/packages/tree/master/xtensa-lx106-elf
perhaps that's what you need
Dmitry Kireev
@kireevco
Nov 06 2015 06:54
@seclorum @igrr it works on all platforms, now I’m making my jenkins work
@seclorum I don’t think it’s for crosstool-ng. it’s building all components separately
I was not able to make esp-open-sdk work on windows (yet)
mac+linux works ok
@seclorum work for esp-open-sdk has been done here https://github.com/kireevco/packages/tree/master/esp-open-sdk
seclorum
@seclorum
Nov 06 2015 08:13
superlative, thanks @igrr @kireevco
Ivan Grokhotkov
@igrr
Nov 06 2015 10:32
damn, OTA thing in 1.6.6 is worse than I thought.
Markus
@Links2004
Nov 06 2015 10:32
you mean the ssh problem?
Ivan Grokhotkov
@igrr
Nov 06 2015 10:32
originally i thought the issue to be just with the UploaderFactory, but it turns out there is another one
Basically IDE checks if the advertised port accepts TCP connections
And since we are using UDP, this check fails.
Markus
@Links2004
Nov 06 2015 10:34
k that is bad, and open one of our limited tcp sockets isnt the best idea.
Ivan Grokhotkov
@igrr
Nov 06 2015 10:34
@reaper7 stumbled upon this in #970
yeah. I was about to open a pull request for the UploaderFactory issue (basically a one-line change), but i have no idea how to work around this BoardReachabiltyFilter
Markus
@Links2004
Nov 06 2015 10:37
is is possible to disable the filter for udp ports.
and change the code to:
    MDNS.addService("arduino", "udp", _port);
Ivan Grokhotkov
@igrr
Nov 06 2015 10:37
possible, but less likely to be accepted
Markus
@Links2004
Nov 06 2015 10:38
yes, that is the main problem, i think.
Ivan Grokhotkov
@igrr
Nov 06 2015 10:38
on the IDE side this will also need a change in that case:
jmDNS.addServiceListener("_arduino._tcp.local.", this);
Markus
@Links2004
Nov 06 2015 10:40
may simple adding as seconde jmDNS.addServiceListener("_arduino._udp.local.", this); is working.
Ivan Grokhotkov
@igrr
Nov 06 2015 10:46
nah, this still doesn't work: BoardReachabiltyFilter still runs, and it call NetUtils.isReachable, which tries to open TCP socket.
there is no provision for UDP there
i.e. that information is not passed from board discovery mechanism
I am tempted to write a plugin, similar to ESP8266FS tool, which will implement OTA uploads.
downside of this approach is that users will not be able to do OTA with "Upload" button
upside is that Arduino team is less likely to break our OTA mechanism with future changes
Markus
@Links2004
Nov 06 2015 10:51
I think that the Upload button will not work will be the biggest problem for the most normal Users,
but get it working is not easy to reach.
for user who read the documentation its not the problem, but the most simply try without reading and then we get more issues.
Markus
@Links2004
Nov 06 2015 11:21
we have to many Issues oO
try to clean up but no end in sight.
Ivan Grokhotkov
@igrr
Nov 06 2015 11:48
well you have reduced the number of issues by 10%. if we do this every day, in two weeks we will be back to normal :)
Me No Dev
@me-no-dev
Nov 06 2015 12:07
I also attempted to modify the mainstream IDE to be able to upload using the upload button
I got to the point of uploading, but had to modify more than what you just said
the main difference is that they stopped filtering boards that have "using_ssh" and just treat all network boards as such
the best aproach I thought of was to branch from that point and filter network devices that have let's say "upload_using_programmer" or something like it
then it can go the regular upload_tool way and just add a couple of lines in it to detect network device and replace the serial port with the network address
overall 10-15 lines can get it to upload
the Monitor is another story all together
Me No Dev
@me-no-dev
Nov 06 2015 12:13
I think if it's done smart and in a way that can not possibly interfere with AVR/SAM boards, then the arduino team might take it
Me No Dev
@me-no-dev
Nov 06 2015 12:23
maybe I should give it another go?
Ivan Grokhotkov
@igrr
Nov 06 2015 12:27
@me-no-dev that would be awesome
I think it might be better to start without Monitor function, with just the minimum we need to support OTA
if this patch is accepted, the go ahead with changes to Monitor
also note this BoardReachabilityFilter issue (#970)
not sure if it was present when you worked on this last time
Me No Dev
@me-no-dev
Nov 06 2015 12:32
let me see
yes, the reachabiliti check is there
Me No Dev
@me-no-dev
Nov 06 2015 12:56
but looking at my sketch I was using a tcp socket on the same port for the Monitor
so check was passing
since we do not have access to the network packets on the ESP we can not answer to tcp connection requests unless we declare a connection
Me No Dev
@me-no-dev
Nov 06 2015 13:07
@igrr if we are ever to implement Monitor in the IDE, we will need to have a tcp socket open for that
Ivan Grokhotkov
@igrr
Nov 06 2015 13:10
yes, that could be an option in ArduinoOTA class
Me No Dev
@me-no-dev
Nov 06 2015 13:10
if we want to go without it, more changes will be required (NetUtils, BoardPort,BoardReachabilityFilter)
so we can add some more data to the mDNS response to say that we are using UDP and board should not be checked
then this data will go into the BoardPort data and be accessible by the ReachabilityFilter
Ivan Grokhotkov
@igrr
Nov 06 2015 13:12
or perhaps this filter could be made to work over IGMP?
Me No Dev
@me-no-dev
Nov 06 2015 13:12
and from then can be passed to SerialUploader and propagataed to the upload binary/script
Ivan Grokhotkov
@igrr
Nov 06 2015 13:12
not sure how that would affect Yuns though
Me No Dev
@me-no-dev
Nov 06 2015 13:13
currently it only looks for TCP ports and does not check for anything else so only IP and Port are passed
I imagine the filter can check for connection even over UDP if made so
but we need to tell it that we are UDP
Ivan Grokhotkov
@igrr
Nov 06 2015 13:14
...and tell how to check for UDP reachability (i.e. send a datagram and expect a reply)
currently OTA will not reply over UDP
Me No Dev
@me-no-dev
Nov 06 2015 13:15
can be made though :)
for now I say we skip the check and see how much rewrite will be needed
then see how Arduino team will respond and go from there
Ivan Grokhotkov
@igrr
Nov 06 2015 13:16
sounds like a plan
Markus
@Links2004
Nov 06 2015 13:43
@igrr is it ok when i move the doc to the github wiki?
Ivan Grokhotkov
@igrr
Nov 06 2015 13:46
wiki is a different repository (i.e. https://github.com/name/repo.wiki.git), so i don't see how this will make our life easier. i prefer to have documentation and code in the same repository, otherwise it's hard to tell which version of code corresponds to which version of docs
my proposal is to use wiki to write new content, and then when it's relatively stable, move it to doc/ folder in the main repository
Markus
@Links2004
Nov 06 2015 13:48
ok over this point i have not Think yet.
the version match is a imported point
Anwar Hahj Jefferson-George
@anwarhahjjeffersongeorge
Nov 06 2015 16:10
When I want to typedef a function object using std::function, i get an error saying that 'function' in namespace 'std' does not name a type". Do I need to explicitly include std library in the header that implements aforesaid typedef?
Anwar Hahj Jefferson-George
@anwarhahjjeffersongeorge
Nov 06 2015 16:15
nevermind :/