These are chat archives for esp8266/Arduino

17th
Aug 2016
Ivan Grokhotkov
@igrr
Aug 17 2016 00:04
Ah, right. That's because Ticker doesn't take std::function
it takes a function pointer and an argument
Akash Ashok
@thehellmaker
Aug 17 2016 03:37
Thanks @igrr . You answered all my questions.
Also is there a way to detect ip adress conflict on esp8266 ? Yesterday esp8266 ip conflicted with my mac ....and mac said theres a conflict
but esp was connected to the ap without any issues
i dnt know if there were issue but until i reconnected mac to my wifi and it got another ip.. the module was still connected to the conflicted ip
adn was reachable post that
I know from the logs #2330 that somewhere in the wifi library it cries "err already allocied" is there a way to reconnect on such an event ?
Germán Martín
@gmag11
Aug 17 2016 04:43
Me too. Thanks @igrr . I've learned a few things.
I have to move to PlatformIO. Visual Micro still gives intellisense errors.
Ivan Grokhotkov
@igrr
Aug 17 2016 04:53
There's also makeEspArduino + eclipse if you're into makefiles.
obviously this option doesn't have library manager and other niceties Platform.IO has
but makeESPArduino can now pull compiler flags from platform.txt, so it doesn't break when we update something.
Akash Ashok
@thehellmaker
Aug 17 2016 07:58
Hi, Is https calls supported from esp8266
?
are*
Germán Martín
@gmag11
Aug 17 2016 08:01
As a client, yes
Akash Ashok
@thehellmaker
Aug 17 2016 08:03
awesome. I am actually trying to call this api which is on amazon aws https://kswwjtf831.execute-api.us-east-1.amazonaws.com/prod/ota
HTTPClient http;

    USE_SERIAL.print("[HTTP] begin...\n");
    // configure traged server and url
    http.begin("https://kswwjtf831.execute-api.us-east-1.amazonaws.com/prod/ota", "7a 9c f4 db 40 d3 62 5a 6e 21 bc 5c cc 66 c8 3e a1 45 59 38"); //HTTPS
    //http.begin("https://kswwjtf831.execute-api.us-east-1.amazonaws.com/prod/ota"); //HTTP

    USE_SERIAL.print("[HTTP] GET...\n");
    // start connection and send HTTP header
    int httpCode = http.GET();

    // httpCode will be negative on error
    if(httpCode > 0) {
        // HTTP header has been send and Server response header has been handled
        USE_SERIAL.printf("[HTTP] GET... code: %d\n", httpCode);

        // file found at server
        if(httpCode == HTTP_CODE_OK) {
            String payload = http.getString();
            USE_SERIAL.println(payload);
        }
    } else {
        USE_SERIAL.printf("[HTTP] GET... failed, error: %s\n", http.errorToString(httpCode).c_str());
    }
[HTTP] begin...
[HTTP] GET...
[HTTP] GET... failed, error: connection refused
HTTP_UPDATE_FAILD Error (-102): File not Found (404)
but its working from browser
Akash Ashok
@thehellmaker
Aug 17 2016 08:12
please ignore the 404 ... thats a different call
Ivan Grokhotkov
@igrr
Aug 17 2016 08:13
You can enable SSL debug info in the IDE to get more info (Tools > Debug Level > Core + SSL)
and add Serial.setDebugOutput(true); after Serial.begin
Akash Ashok
@thehellmaker
Aug 17 2016 08:14
ok thanks igrr@ and @gmag11 i'll look into it
Ivan Grokhotkov
@igrr
Aug 17 2016 08:15
also make sure your server supports TLS_RSA_WITH_AES_128_CBC_SHA or TLS_RSA_WITH_AES_256_CBC_SHA cipher suites
otherwise ESP won't be able to connect to it.
Akash Ashok
@thehellmaker
Aug 17 2016 08:17
thanks @igrr I am not hosting a server I am useing Amazon AWS API Gateway + AWS Lambda
as u said debug gave me the issue
it had a certificate mismatch
once i changed the certificate it started working
thanks a lot
Akash Ashok
@thehellmaker
Aug 17 2016 08:26
just a question
woudl this certificate change based on the server
Ivan Grokhotkov
@igrr
Aug 17 2016 08:43
depending on how these servers are set up, i guess.
i don't have experience with amazon AWS so i can't tell.
Faraz Ahmed
@faraz117
Aug 17 2016 09:59
Hey guys can anyone give me a little hint how WiFiClientSecure.verify() works ..
I have uploaded the certificate and i am reading the certificate in .der format as a File using SPIFFS
I have loaded the ceritficate using WiFiClientSecure.loadCertificate()
Is this the right way to go to verify the certificate ?
How can obtain the fingerprint from the certificate loaded .. in order to use it in .verify()
Ivan Grokhotkov
@igrr
Aug 17 2016 10:06
loadCertificate is for client side certificate
i.e. the certificate which ESP will provide when it connects to the server (if the server uses client side certificate authentication — most don't use that)
for verify, you need to provide SHA1 hash of the certificate
Faraz Ahmed
@faraz117
Aug 17 2016 10:08
Oh ok .. thank you for clearing that up .. What if the server side certifcate is stored on the device i.e the ESP to verify the server ? What could be done in that case .. ?
Faraz Ahmed
@faraz117
Aug 17 2016 10:18
Because verifying using fingerprint is not very secure
Akash Ashok
@thehellmaker
Aug 17 2016 11:01
Sure thanks @igrr .. Also do you have any idea about ip address conflict handling
Yesterday my module got a conflicted ip as my mac and it wasn't reachable because my mac was on the same ip address
is there an even i can listen to so that i can force reconnect the module ?
Alex Solomaha
@CyanoFresh
Aug 17 2016 11:47
Hello. Please, I need some help. I am on windows, use Arduino IDE 1.6.10. I've installed all packages and it was working... Now I cannot upload any sketch to my nodemcu (from aliexpress). It compiles and when uploading - led on the esp blinks twice and then nothing (in arduino ide this errors:
Uploading 226352 bytes from C:\Users\cyano\AppData\Local\Temp\build170da49fc7c03f6f27bd9bfa3dd7aa94.tmp/Blink.ino.bin to flash at 0x00000000
warning: espcomm_send_command: didn't receive command response
warning: espcomm_send_command(FLASH_DOWNLOAD_BEGIN) failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed
Akash Ashok
@thehellmaker
Aug 17 2016 11:47
which module do u have? I had this problem on esp12f where Chip select ping CS0 was high.
Akash Ashok
@thehellmaker
Aug 17 2016 11:49
i had faced this issue when the module had gone bad... not sure if other know if this is solvable
Alex Solomaha
@CyanoFresh
Aug 17 2016 11:49
it worked before, I've uploaded some sketches, but now I had that errors
Akash Ashok
@thehellmaker
Aug 17 2016 11:50
power off and power on the module ?
Alex Solomaha
@CyanoFresh
Aug 17 2016 11:51
tried, nothing changes
Alex Solomaha
@CyanoFresh
Aug 17 2016 12:04
hm, tried to flash with esp flasher - had errors. Now reconnected and tried with arduino ide - it successfully flashed
and now not working again :(
Me No Dev
@me-no-dev
Aug 17 2016 12:08
try holding the flash button while trying to upload
overall the worst modules out there
Alex Solomaha
@CyanoFresh
Aug 17 2016 12:09
nodemcu worst or exactly this on ali?
Me No Dev
@me-no-dev
Aug 17 2016 12:10
this exact model nodemcu
lolin v3
Alex Solomaha
@CyanoFresh
Aug 17 2016 12:10
can you please give link to a normal one?
it is my first experience with nodemcu and I dont know what is better
Me No Dev
@me-no-dev
Aug 17 2016 12:12
everything else that I have tested and as far as I can tell all others are fine
wemos, amica v2, adafruit… any other module with integrated usb uart
SteveToulouse
@SteveToulouse
Aug 17 2016 12:34
@CyanoFresh not sure if it's your problem but there have been lots of people having trouble with 1.6.10
Me No Dev
@me-no-dev
Aug 17 2016 12:49
@SteveToulouse this issue is unrelated to arduino IDE :)
Alex Solomaha
@CyanoFresh
Aug 17 2016 13:12
i am so disappointed. I've been waiting for this module for 1 month and now I have to do it again (
Germán Martín
@gmag11
Aug 17 2016 13:15
Try to use another cable
Mehrdad K
@mkeyno
Aug 17 2016 13:26
hi guys , I have out of memory for text region and received .text' will not fit in regioniram1_0_seg'` error ,, is there any way to increase this region space
I might add this is not due to const char prams and in fact my multiple object instant kindda eat this space
to solve this issue I have to reduce number of object instance , so is there any way to increase this space and avoid decrease object instance
Me No Dev
@me-no-dev
Aug 17 2016 13:39
no
that space is max that much
Akash Ashok
@thehellmaker
Aug 17 2016 15:18
hi guys, I just encountered a wierd problem. Http client responds just fine if its called from loop method()
if its called from a ticker however. it keeps saying connection refused. http status code is -1
can't we make http calls from ticker?
Ivan Grokhotkov
@igrr
Aug 17 2016 15:23
no, you can't do any blocking calls from ticker
Germán Martín
@gmag11
Aug 17 2016 15:24
No, move client stuff to loop and use ticket to control a flag
Ivan Grokhotkov
@igrr
Aug 17 2016 15:24
it's mentioned in the few lines of documentation about ticker
Akash Ashok
@thehellmaker
Aug 17 2016 15:26
thanks guys for the help .... @igrr sorry i missed that in the documentation ...
i'll move it out ...of ticker
Also guys any way to listen to ip address conflicts in the module ?
Ivan Grokhotkov
@igrr
Aug 17 2016 15:30
none that i know of
does lwip have this feature?
Akash Ashok
@thehellmaker
Aug 17 2016 15:30
yes. i am not sure if its in lwip or esp8266 wifi
but in debug logs it prints the error that its already associated
Ivan Grokhotkov
@igrr
Aug 17 2016 15:31
well IP addresses are in IP stack, right?
wifi libraries work on 802.11 layer, which doesn't have IP addresses and all that
Akash Ashok
@thehellmaker
Aug 17 2016 15:32
yup thats right ip stack provides that.....
which mean handling conflicts should reside in that layer right
interesting
i should dive a little deeper and figure out the root cause ... will get back if i have a solution for that ... i can handle lwip now
Germán Martín
@gmag11
Aug 17 2016 16:06
@igrr Do you know if there is any AVR Arduino equivalent to <functional> to be able to use std::bind() it out of ESP8266? I've modified timeLib.h to use std::function and it works but would like to extend that mod to Avr.
Germán Martín
@gmag11
Aug 17 2016 16:47
@igrr std::bind() is great! Goodbye static functions.
Thanx
Michael Miller
@Makuna
Aug 17 2016 17:39
@gmag11 I searched for this about eight months ago. I found libraries that had ported STL over to Arduino AVR, but some removed functional, some removed parts of it, and one that stated it supported never compiled. Search for STL and Arduino and you might find some updates that have fixed this.
For my library which uses callbacks that are compliant I had to ifdef them for AVR and loose functionality.
Germán Martín
@gmag11
Aug 17 2016 18:08
@Makuna Thank you. I will do so.
Martin Ayotte
@martinayotte
Aug 17 2016 21:02
@igrr , did you got chance to look at esp8266/Arduino#2398 ?
Stavros Korokithakis
@skorokithakis
Aug 17 2016 22:43
hey guys
what's the highest voltage you saw the ESP working comfortably at?
i want to run it off a LiPo battery and am wondering if i can forgo the LDO
Me No Dev
@me-no-dev
Aug 17 2016 22:51
can’t ;) i fried one connected directly to lipo
can do life though
they operate at 3.3V 90% of the time
LiFe require special charger also
Stavros Korokithakis
@skorokithakis
Aug 17 2016 22:53
hmm, 18650s are LiPo, right?
Me No Dev
@me-no-dev
Aug 17 2016 22:53
right
Stavros Korokithakis
@skorokithakis
Aug 17 2016 22:53
hm okay, i'll stop being a cheapskate and add an LDO, thanks :P
Barry Chiarello
@bchar
Aug 17 2016 23:38
Hello