These are chat archives for esp8266/Arduino

23rd
Jan 2016
probonopd
@probonopd
Jan 23 2016 11:22
Hi all. is someone around who could look at the SerialUploaderExceptoin? esp8266/Arduino#1453
it basically prevents me from using the hourly IDE builds along with esp8266/Arduino from git
Markus
@Links2004
Jan 23 2016 11:24
the error is form the Arduino IDE (java) not from the ESP core.
its a NullPointerException.
Caused by: java.lang.NullPointerException
    at java.lang.String.replace(String.java:2240)
may report it to the Arduino git :)
probonopd
@probonopd
Jan 23 2016 11:24
thanks @Links2004 - could it be related to the new OTA stuff?
maybe it's not finding its upload tool?
could that be?
Me No Dev
@me-no-dev
Jan 23 2016 11:25
no
you are uploadung over serial
i did not touch that code
probonopd
@probonopd
Jan 23 2016 11:26
let me verify quickly with a genuine(tm) arduino
Markus
@Links2004
Jan 23 2016 11:27
it try to replace some string and get a Null ptr,
its a internal operation in the IDE no tool from us is involved at this point.
may the IDE not like some config in the board.txt or else but the release version work.
I think it need to be fixed in the Arduino IDE not in the core.
probonopd
@probonopd
Jan 23 2016 11:29
you are right
thank you very much
upload to arduino pro mini is also broken
as it's the only change I see recently to the file
and I can tell you what it is...
boardPort.getPrefs().get("iserial") returns NULL
so when the replacer trys to replace with NULL, which can not happen
code should be boardPort.getPrefs().getOrExcept("iserial") to trigger exception and not fill the item
probonopd
@probonopd
Jan 23 2016 11:36
I will try, thanks @me-no-dev
Me No Dev
@me-no-dev
Jan 23 2016 11:39
yeah, let me know as I do not see a pull request about it
nor a fix merged upstream
probonopd
@probonopd
Jan 23 2016 11:41
Let me see if I can build the IDE (never done that)
arduino/Arduino#4471
Me No Dev
@me-no-dev
Jan 23 2016 11:41
good job :)
probonopd
@probonopd
Jan 23 2016 11:42
duh, I'm absolutely not a Java guy ;-)
Me No Dev
@me-no-dev
Jan 23 2016 11:43
nah, it's easier than this here
at least you can catch an exception and not kill the chip instead :D
probonopd
@probonopd
Jan 23 2016 11:43
:-)
duh, that source tree is huge
around a gig
Me No Dev
@me-no-dev
Jan 23 2016 11:44
yeah, and most is obsolete with the builder
lots of nothing for a basic editor with custom highlighting
probonopd
@probonopd
Jan 23 2016 11:45
maybe it's really time to take Atom or the likes and make a decent IDE out of it
Me No Dev
@me-no-dev
Jan 23 2016 11:45
maybe atom, maybe else
does not matter :) platformio guys are trying something
probonopd
@probonopd
Jan 23 2016 11:46
it's not as easy as taking 1 .java file and just editing this, I need to comile the whole thing, right?
Me No Dev
@me-no-dev
Jan 23 2016 11:46
yes
ant build
probonopd
@probonopd
Jan 23 2016 11:46
sigh
Me No Dev
@me-no-dev
Jan 23 2016 11:46
maybe ant run will be enough
probonopd
@probonopd
Jan 23 2016 11:47
i vaguely remember having done that before once
Me No Dev
@me-no-dev
Jan 23 2016 11:47
not a biggie if you have jre in path and all that java jazz
just run and it's done
probonopd
@probonopd
Jan 23 2016 11:53
can't build, can't download temboo, 404
commenting it out for now
Me No Dev
@me-no-dev
Jan 23 2016 11:55
i'mma give it a go as well
probonopd
@probonopd
Jan 23 2016 11:56
know what, it WORKS :-)))
do you want to do the PR or should I?
Me No Dev
@me-no-dev
Jan 23 2016 11:57
i'll do it :P
probonopd
@probonopd
Jan 23 2016 11:57
cool. thanks @me-no-dev
Me No Dev
@me-no-dev
Jan 23 2016 11:57
no probs :)
they should thank and all of us :D
could have released bad ide
probonopd
@probonopd
Jan 23 2016 11:58
indeed. hard to believe
@me-no-dev your latest link in the ticket links to other lines...
Me No Dev
@me-no-dev
Jan 23 2016 12:01
not in my browser?
probonopd
@probonopd
Jan 23 2016 12:01
anyhow, do a PR and let's hope they pick it up rather soonish :)

L in combination with /master/ is a moving target

sorry about the large font
i meant #L
Me No Dev
@me-no-dev
Jan 23 2016 12:08
yeah :D not the PR though :P
FWeinb
@FWeinb
Jan 23 2016 12:08
What is this about the DIO and QIO on these NodeMCU clones?
Me No Dev
@me-no-dev
Jan 23 2016 12:08
qio is twice faster
dio has 2 extra pins usable
FWeinb
@FWeinb
Jan 23 2016 12:09
Okay SD2 and SD3 are not usable in QIO mode?
Me No Dev
@me-no-dev
Jan 23 2016 12:10
yes
they are used for data lines to the flaash
FWeinb
@FWeinb
Jan 23 2016 12:11
Okay that makes sense. But why would anyone lose two GPIOs for that, we have OTA which is fast enough.
Me No Dev
@me-no-dev
Jan 23 2016 12:19
why?
because I want flash to be read faster
so my functions are executed faster
I can live without those GPIOs for the speed gain
FWeinb
@FWeinb
Jan 23 2016 12:21
Okay I did not know that it has some runtime performance improvements.
Me No Dev
@me-no-dev
Jan 23 2016 12:22
flash -> the memory chip that holds your application code
when you read it faster, you can load the code faster in ram and execute it
there are two ways to do it
FWeinb
@FWeinb
Jan 23 2016 12:23
That makes perfect sense.
Me No Dev
@me-no-dev
Jan 23 2016 12:23
change the SPI clock for the Flash chip and Add data lines to e ale to read more data in parallel
a combination of the two is 80MHz QIO
which reads twice faster than 80MHz DIO and 4 times 40MHz DIO
probonopd
@probonopd
Jan 23 2016 12:24
@me-no-dev let's see if they merge it. some projects don't like PRs that consist of more than one commit
FWeinb
@FWeinb
Jan 23 2016 12:24
Thanks for the explanation. I am totally new to embedded hardware.
probonopd
@probonopd
Jan 23 2016 12:25
e.g., OpenWrt advises to rebase so that there is only one commit per PR
Me No Dev
@me-no-dev
Jan 23 2016 12:25
they were fine before ;) plus the commit is kinda embarassing :D
cuz there is try/catch but nothing to raise exception
maybe if there were more than one commits that were changes yes, but they are all merges from master (keeping up with them)
Ivan Grokhotkov
@igrr
Jan 23 2016 12:30
@stefangordon I was having a few issues with the server which hosts package json files, but these are fixed now. 2.1.0-rc2 should be up within few hours
probonopd
@probonopd
Jan 23 2016 12:35
i just would like to say a big "thank you" to @igrr @me-no-dev and this awesome community which totally rocks
Me No Dev
@me-no-dev
Jan 23 2016 12:39
you're welcome @probonopd ! not sure for what though :D
probonopd
@probonopd
Jan 23 2016 13:10
does anyone have mosquitto running with esp and TLS?
i end in a reboot loop
Helio Machado
@0x2b3bfa0
Jan 23 2016 13:47
@/all Anybody knows if exists any small, commercial and affordable transformerless solution to power up my ESP from mains. I've seen some circuits based on LNK306, but I can't find (even on Ali) a board with the chip mounted. Only the chips.
Me No Dev
@me-no-dev
Jan 23 2016 14:04
@crushedice2000 let me know if you find anything ;) i'm also interested in such thing. Most found are either too noisy or too big
don't know if this fits your "transformerless" solution though, but I don't know how you'd get from 230VAC down to 3.3VDC without some sort of transformer :)
Me No Dev
@me-no-dev
Jan 23 2016 14:45
there are ways. issues come with current :)
it's really easy to get 30mA, but that is not going to feed the esp
Me No Dev
@me-no-dev
Jan 23 2016 16:14
@AdySan I have that thing and it's not that small :) you can fit small transformer and bridge inside
Aditya Tannu
@AdySan
Jan 23 2016 16:21
@me-no-dev haha, thanks for the heads up, has been in my cart for a few weeks now. but yeah, cheap iPhone chargers ~$1 are the best/smallest power supply for projects.
I tried to open a smart 433MHz socket but the capacitive PS was extremely wimpy.
Me No Dev
@me-no-dev
Jan 23 2016 16:24
those 433MHz "smart" things use verry little electricity to receive data and they on their own are sooo unpredictable
i send perfect signal to those 3-4 times to be sure they heard me
Aditya Tannu
@AdySan
Jan 23 2016 16:26
yeah, the transmitters ususally keep repeating the binary pattern as long as you press the button
Me No Dev
@me-no-dev
Jan 23 2016 16:27
try swithching 10 at the same time
probonopd
@probonopd
Jan 23 2016 16:34
@AdySan and an usafe option, these $1 chargers...
unsafe
@me-no-dev @Makuna could we use something like Protothreads http://dunkels.com/adam/pt/ for fades and animations?
I have a sketch that does MQTT, OTA and Neopixels now.
But adding animation to it is not easy
so I wonder whether something like Protothreads could help to make it easier
e.g., instead of strip.SetPixelColor(0, blue); I would like to strip.FadePixelColor(0,1000,blue);
without adding someting to loop() that I need to take care of/that interferes with OTA, MQTT and other stuff
Me No Dev
@me-no-dev
Jan 23 2016 16:40
ideally OTA and MQTT should run async and your pixels in the loop
then you would not have that problem
OTA needs attention after successful handshake with the computer
and that has tomeout of around 10-20 seconds
do not worry much about OTA
maybe if Espressif gets RTOS for ESP at the same level as NON_OS (this) we will move over and forget about issues like this one
Aditya Tannu
@AdySan
Jan 23 2016 17:55
hi all, would it be possible to make a SSH client using the arduino core, basically I want to make a dash-button like device, which will ssh into a certain computer and run something. Any other approaches are welcome too, as long as I can run a root level command at the terminal
Markus
@Links2004
Jan 23 2016 17:58
@AdySan there is no SSH lib for Arduino, can you run a program on the computer?
Aditya Tannu
@AdySan
Jan 23 2016 17:59
@Links2004 yes, basically I want a remote reboot button for my RPi, I can run any sort of host on the RPi side
Markus
@Links2004
Jan 23 2016 17:59
ok simple start a https webserver that runs a script that exec your command by sudo.
but think about how to secure (only allow the ESP to run stuff)
Me No Dev
@me-no-dev
Jan 23 2016 18:01
@AdySan you can write your own server for the Pi the same way you write for the ESP
99% the same code
I know you've seen the repository :)
Aditya Tannu
@AdySan
Jan 23 2016 18:03
interesting, was planning to have a remote display using VNC library made by @Links2004 but in case the RPi freezes or the VNC server is not up for some reason, it would be nice to have a backup option which can reboot or start the vnc server
Markus
@Links2004
Jan 23 2016 18:03

without security:
run apache + php on the pi.

<?php
exec($_POST);

use HTTP client to send a POST with the command.
if it always the same you can hardcode it.

<?php
exec("sudo reboot");
Aditya Tannu
@AdySan
Jan 23 2016 18:03
@me-no-dev oh the RPi/Arduino, yes I did :smile:
Me No Dev
@me-no-dev
Jan 23 2016 18:04
I have fully integrated the Bridge lirary API so you can do just about anything
even control what's going on on the HDMI screen
you can hack custom server to talk to the esp and execute whatever easily ;)
Aditya Tannu
@AdySan
Jan 23 2016 18:05
will take a dab at it, thanks!
Helio Machado
@0x2b3bfa0
Jan 23 2016 18:25
@celsworth @me-no-dev @AdySan @Links2004 : http://www.ebay.co.uk/itm/171794933876?_trksid=p2060353.m2749.l2648&ssPageName=STRK%3AMEBIDX%3AIT is the biggest thing I ever met, http://www.aliexpress.com/item/Free-Shippingn-HLK-PM01-AC-DC-220V-to-5V-mini-power-supply-module-intelligent-household-switch/32319515750.html?spm=2114.13010208.99999999.282.Fp5N2o seems big to me (I've seen it on Ali the past week, thanks however). I'm searching for a power supply like this one: http://forum.mysensors.org/uploads/upload-647e8ae2-ac42-4195-8031-3d77c92bbb71.jpg from this forum
Sorry for the late reply, I was offline
Helio Machado
@0x2b3bfa0
Jan 23 2016 18:28
@martinayotte @Links2004: These are my current emergency solutions (waiting for), however I expect to find anything smaller (like that one in the picture). That circuit is based on LNK306, however I couldn't find that circuit already mounted. I ordered 10 chips of that on Ali to DIM (do it myself).
Michael Miller
@Makuna
Jan 23 2016 20:24
@probonopd my library support async animations, but does require rethinking on your part on how they work. This is topic best brought up on my Gitter group. But look at the NeoPixelAnimator class. You can provide the function that does the specific update of the pixel and it will be called periodically with a progress that you use to define the animation.
I need to create a good sample for it, but there are examples of its use in the provided samples.
Remember, this project is about Arduino, it isn't inherently async so it doesn't solve these issues for you. We should strive for compatibility with Arduino first.
gonsays
@gonsays
Jan 23 2016 22:19
Hello Guys!
I'm trying to ping an IP address using the CallSDKFunctions.ino
my Arduino sketch is here: http://pastebin.com/MEXhdv88

but it is not compiling:

CallSDK-v2.ino: In function 'void setup()':
CallSDK-v2:35: error: expected unqualified-id before string constant
CallSDK-v2:111: error: expected '}' at end of input
expected unqualified-id before string constant

these are the errors :sa:
do I need to call any .h file?
"ICACHE_FLASH_ATTR"
I think the problem is here
Markus
@Links2004
Jan 23 2016 22:25
remove the ICACHE_FLASH_ATTR its not need, it automatically in flash
and move #include "Esp.h" out of the extern.
void setup() {
    Serial.begin(115200);
  #ifdef ESP8266
  extern "C" {
void ICACHE_FLASH_ATTR user_ping_recv(void *arg, void *pdata){
you can not create a function in a function
and no extern "C" { in this case.
gonsays
@gonsays
Jan 23 2016 22:28
thank you so much!
no extern "C" here, but the function must be inside the ifdef right?
Markus
@Links2004
Jan 23 2016 22:29
the ifdef is not needed for the ESP
only if you what to use the same code in AVR
Gives me these errors:
CallSDK-v2.ino: In function 'void setup()':
CallSDK-v2:23: error: a function-definition is not allowed here before '{' token
CallSDK-v2:34: error: a function-definition is not allowed here before '{' token
CallSDK-v2:39: error: a function-definition is not allowed here before '{' token
a function-definition is not allowed here before '{' token
Markus
@Links2004
Jan 23 2016 22:33
still function in function
gonsays
@gonsays
Jan 23 2016 22:33
I've removed the ICACHE_FLASH_ATTR
ohh
ok
I got it
outside the setup or loop
yes
Note os_printf is only visible if you do:
Setup.setDebugOutput(true);
gonsays
@gonsays
Jan 23 2016 22:36
blob
oh, ok
it gives me all these errors when I try to compile it
gonsays
@gonsays
Jan 23 2016 22:39
yup, I tried to compile your code
and gave me these errors
Markus
@Links2004
Jan 23 2016 22:40
the http://bbs.espressif.com/viewtopic.php?t=583 code seams not to good.
i only write it "free hand", have no IDE & compiler at my tablet.
gonsays
@gonsays
Jan 23 2016 22:42
ohh ok thank you
gonsays
@gonsays
Jan 23 2016 22:49
CallSDK-v2:39: error: 'ping_start' was not declared in this scope
the ping_Start function from the SDK is not being identified
it should been identified right?
maybe i'm not including something
Ivan Kravets
@ivankravets
Jan 23 2016 22:54
Dear PlatformIO Users, welcome to PlatformIO IDE beta testing https://twitter.com/platformio_org/status/691030836720844800
Markus
@Links2004
Jan 23 2016 22:59
@gonsays include ping.h
gonsays
@gonsays
Jan 23 2016 23:03
oh ok thnaks!
I don't think that I have that file
well, at least it compiled now
Setup.setDebugOutput(true);
in order to "watch" the answer
gonsays
@gonsays
Jan 23 2016 23:08
should I include a lib to use it?
oh
is it Serial.setDebug...
oh ok, now it has compiled :P I've declared it on the setup
@Links2004 it is WOKING! Thank you SO MUCH! :D