These are chat archives for esp8266/Arduino

7th
Jan 2016
Aditya Tannu
@AdySan
Jan 07 2016 00:34
Some fun stuff, people running esp8266 servers exposed to the internet: https://www.shodan.io/search?query=esp8266
Markus
@Links2004
Jan 07 2016 00:35
including GPIO control not the best idea
Aditya Tannu
@AdySan
Jan 07 2016 00:36
haha, those are not password protected
@Links2004 btw, any specific ILI9341 display you recommend, wanted to prepare before you release the library :)
Markus
@Links2004
Jan 07 2016 00:41
ILI9341 any one with 320*240 will work, touch support is possible but not implemented yet, 8 Months ago only had the non touch version.
Aditya Tannu
@AdySan
Jan 07 2016 00:45
@Links2004 Ok, thanks!
Stavros Korokithakis
@skorokithakis
Jan 07 2016 01:09
@martinayotte ebay links again? :P are those diodes good?
Stavros Korokithakis
@skorokithakis
Jan 07 2016 01:16
too late!
Martin Ayotte
@martinayotte
Jan 07 2016 01:33
@skorokithakis , simply that it was cheaper than the one provided mozgy
@skorokithakis , do you want some new purchases ? :-)
Did you purchased some MCP23017 SOIC28W ?
Matt Kocaj
@cottsak
Jan 07 2016 01:44
@FWeinb looks like my issue esp8266/Arduino#1375 is something @igrr has already mentioned on the SSL thread :(
Does anyone know if it's possible to ask a server to handshake with TLS 1.1 instead of TLS 1.2? or does it not work like that?
Angus Gratton
@projectgus
Jan 07 2016 02:29
cottsak: if the server supports 1.1 then the handshake process will negotiate 1.1. if it doesn't then, it doesn't :/
Matt Kocaj
@cottsak
Jan 07 2016 02:38
@projectgus so if the server supports 1.2, it won't force the client to 1.2. I'm wondering if that's whats happening with the 4096 bit key on esp8266/Arduino#1375
Angus Gratton
@projectgus
Jan 07 2016 02:43
I think you're just out of memory due to key size, pretty sure TLS v1.1 supports 4096 bit keys
Matt Kocaj
@cottsak
Jan 07 2016 02:43
ok.
:(
Angus Gratton
@projectgus
Jan 07 2016 02:46
you can get a full dump of supported protocols/ciphers using nmap
nmap --script ssl-enum-ciphers -p 443 api.twilio.com
looks like your options are 4096 bit RSA, or ECDHE (not supported by axTLS)
Matt Kocaj
@cottsak
Jan 07 2016 02:47
:( :(
Matt Kocaj
@cottsak
Jan 07 2016 02:52
@projectgus how did you get that from nmap? is there something I'm doing wrong?
Angus Gratton
@projectgus
Jan 07 2016 02:55
your command line is a little different to the one I asted, but if I use yours I still get a list of ciphers
Matt Kocaj
@cottsak
Jan 07 2016 02:55
thats weird
Angus Gratton
@projectgus
Jan 07 2016 02:55
I'm using nmap 7 on debian testing, maybe the script isn't in your version? (although odd there's no error)
you can download the script itself from nmap.org and run it there
Matt Kocaj
@cottsak
Jan 07 2016 02:55
ok. i just did brew instapp nmap. maybe the script isn't included by default
install*
Matt Kocaj
@cottsak
Jan 07 2016 03:08
maybe my env is broke. i just verified the script is there but i still don't seem to be getting the output you have. i just installed nmap from the site now so i have version 7 https://www.dropbox.com/s/r5ul9foejpke6mn/Screenshot%202016-01-07%2011.06.49.png?dl=0
Angus Gratton
@projectgus
Jan 07 2016 03:09
weird
maybe the lua environment is missing openssl support or something?
(the --script is a lua script)
Matt Kocaj
@cottsak
Jan 07 2016 03:10
yeh. the script is present. see the ls line above
and i do have openssl. it was installed as a dependancy when i used brew
i think i had it before that anyway
nevermind. I don't think i can use the Twilio api with HTTPClient so I'm sad
Angus Gratton
@projectgus
Jan 07 2016 03:11
I think the SSL labs site will give you the same output as well
the short version is - TLS v1.0,v1.1 or v1.2 but only using ECDHE or 4096 bit keys
if you can free up some RAM then you can probably use the Twilio API
Matt Kocaj
@cottsak
Jan 07 2016 03:11
the frustrating thing is that it worked with WiFiClientSecure which is weird
Angus Gratton
@projectgus
Jan 07 2016 03:12
httpclient will allocate its own additional buffers, etc. - probably just enough to drop the free RAM
but I do know Twilio changed their cert a month or so back so maybe they upped the key length
Angus Gratton
@projectgus
Jan 07 2016 03:13
nod
I guess you could always set up a proxy on a server somewhere to relay traffic to/from twilio
Matt Kocaj
@cottsak
Jan 07 2016 03:13
is there a manual call i can invoke to collect free fragmented memory just before the .POST() ?
maybe then it will release enough for the TLS work?
Angus Gratton
@projectgus
Jan 07 2016 03:14
i'm not aware of anything
Matt Kocaj
@cottsak
Jan 07 2016 03:18
@porkyneal @igrr suggested i change this message size limit an hour ago
but I'm unsure how to do that easily in my Arduino IDE. is there a const value that i just need to add to the top of my sketch to overwrite the current size limit?
sorry i meant to @ you @projectgus
Angus Gratton
@projectgus
Jan 07 2016 03:19
ah my bad, i didn't read the thread properly - you might have plenty of RAM, you just need to tune that size up
I'm not sure what the best way to recompile the library is though, sorry
Matt Kocaj
@cottsak
Jan 07 2016 03:19
so how do i do that?
I'm only trying to update http://hammerproject.com/post/130804023369/iot-intro-sms-me-when-i-leave-my-garage-door-open after a certificate change by Twilio
it's prob not reasonable to include in a beginners tutorial how to recompile the source. gah! :'(
Stavros Korokithakis
@skorokithakis
Jan 07 2016 10:44
@martinayotte I didn't get MCP23017 yet, it was a bit too expensive and I don't need it yet
i did get the diodes though :P
fmgomes
@fmgomes
Jan 07 2016 11:01
Hi, can anyone confirm if the possible return values of WiFiClient::status are the following: enum tcp_state {
CLOSED = 0,
LISTEN = 1,
SYN_SENT = 2,
SYN_RCVD = 3,
ESTABLISHED = 4,
FIN_WAIT_1 = 5,
FIN_WAIT_2 = 6,
CLOSE_WAIT = 7,
CLOSING = 8,
LAST_ACK = 9,
TIME_WAIT = 10
};
Because the WiFiClient for the Wifi shield has no status methode
Markus
@Links2004
Jan 07 2016 11:03
yes its this status
fmgomes
@fmgomes
Jan 07 2016 11:03
Ok, thanks! :-)
Markus
@Links2004
Jan 07 2016 12:28
Harrison Mclean
@h4rm0n1c
Jan 07 2016 12:45
wow. that's damn impressive.
FWeinb
@FWeinb
Jan 07 2016 14:09
@Links2004 Awesome thanks for sharing
ystrem
@ystrem
Jan 07 2016 14:15
+1
tzapu
@tzapu
Jan 07 2016 15:00
+10000 ... it s so responsive as well...whoever mentioned brain steroids was probably right ... when do you manage to come up with all this amazing stuff
Aditya Tannu
@AdySan
Jan 07 2016 16:29
@Links2004 Thanks for sharing! Truly impressive!
Markus
@Links2004
Jan 07 2016 16:39
@tzapu the first VNC where running after one evening "after work". 3 or 4 evenings later it where optimized for speed.
tzapu
@tzapu
Jan 07 2016 17:43
you are a man of incredible skill then... i m struggling with so basic stuff, i can't even fathom how you could achieve such a thing :P thanks for sharing
@skorokithakis is your tiny breakout design complete? what regulator is it using? can i order it? :p is there some documentation to go with it? hard to solder those backside smds?
ah, found answers to most stuff https://github.com/skorokithakis/tiny-ESP8266-breakout :P
so pin 8 would be any vin, and pin 9 would give me back regulated 3.3 to the board, nice
Steve Nelson
@zenmanenergy
Jan 07 2016 18:46
has anyone seen this spiffs error where it starts spitting out: E:M 7640
E:M 7640
E:M 7640
in the serial monitor?
Steve Nelson
@zenmanenergy
Jan 07 2016 19:08
it seems to either be related to appending or too large of a file. I’m not 100% sure.
Helio Machado
@0x2b3bfa0
Jan 07 2016 19:23

@Links2004: Only a question (now I'm going offline, so please ping on the response): I don't have any 6K resistor. What can I do? Can you change the values of the voltage divider?

Follow-up from: https://files.gitter.im/esp8266/Arduino/zmSn/blob

Helio Machado
@0x2b3bfa0
Jan 07 2016 19:32
This message was deleted
Markus
@Links2004
Jan 07 2016 19:32
@crushedice2000 R14 20k R13 12k will work too,
the goal is to have not more then 5V and with the R8 33k (opto on) not less 3.5V.
the calculation is a simple loaded voltage divider
Helio Machado
@0x2b3bfa0
Jan 07 2016 19:32
blob.png
Markus
@Links2004
Jan 07 2016 19:33
@crushedice2000 will not work since you have a sinus wave there
Helio Machado
@0x2b3bfa0
Jan 07 2016 19:33
@Links2004: And with diodes and capacitor?
Markus
@Links2004
Jan 07 2016 19:33
or better the prospective half with 100hz
you can try but the voltage divider is more stable.
Helio Machado
@0x2b3bfa0
Jan 07 2016 19:34
@Links2004: Oh, I see. I'll use the voltage divider with 20+12K
@Links2004: What is the capacitor (C6, the red-ish one on your drawing) for?
Markus
@Links2004
Jan 07 2016 19:36
that the voltage not drop instand when opto goes on
Helio Machado
@0x2b3bfa0
Jan 07 2016 19:37
@Links2004: For?
Why would it drop?
Markus
@Links2004
Jan 07 2016 19:38
when the opto goes on the load for the voltage divider change
no load it has: 4.5V
with the load (the 33k): 3.667V
Helio Machado
@0x2b3bfa0
Jan 07 2016 19:39
@Links2004: Ok. Now i'm tired, however tomorrow I'll try the scheme. Now I have the downlight with me.
@Links2004: Good night! (and thank you for your help)
Markus
@Links2004
Jan 07 2016 19:39
gn
PyB
@PyBerger
Jan 07 2016 19:44
@Links2004 Have you been able to look at the DHCP issue ?
Markus
@Links2004
Jan 07 2016 19:45
in my first test all where working, still try to reproduce it.
PyB
@PyBerger
Jan 07 2016 20:11
hum...
Just made a test with the WiFiAP example as is (just commenting the server.begin/on/handleClient)... and that isn't working...
still failing to get an IP address...
is there some settings in flash i should clean ?
Markus
@Links2004
Jan 07 2016 20:13

strange, i use:


#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>

/* Set these to your desired credentials. */
const char *ssid = "ESPap123";
const char *password = "thereisnospoon";

ESP8266WebServer server(80);

/* Just a little test message.  Go to http://192.168.4.1 in a web browser
 * connected to this access point to see it.
 */
void handleRoot() {
    server.send(200, "text/html", "<h1>You are connected</h1>");
}

void setup() {
    delay(1000);
    Serial1.begin(115200);
    Serial1.println();
    Serial1.print("Configuring access point...");
    /* You can remove the password parameter if you want the AP to be open. */
    WiFi.softAP(ssid, password);

    IPAddress myIP = WiFi.softAPIP();
    Serial1.print("AP IP address: ");
    Serial1.println(myIP);
    server.on("/", handleRoot);
    server.begin();
    Serial1.println("HTTP server started");
}

void loop() {
    server.handleClient();
}

and its working.
can you use

   ESP.eraseConfig();
    ESP.reset();

and use the example again?

PyB
@PyBerger
Jan 07 2016 20:13
will try
I used

#include <ESP8266WiFi.h>
#include <WiFiClient.h> 
#include <ESP8266WebServer.h>

/* Set these to your desired credentials. */
const char *ssid = "ESPap";
const char *password = "thereisnospoon";

ESP8266WebServer server(80);

/* Just a little test message.  Go to http://192.168.4.1 in a web browser
 * connected to this access point to see it.
 */
void handleRoot() {
    server.send(200, "text/html", "<h1>You are connected</h1>");
}

void setup() {
    delay(1000);
    Serial.begin(921600);
   while(!Serial);
    Serial.println();
    Serial.print("Configuring access point...");
    Serial.setDebugOutput(true);
    /* You can remove the password parameter if you want the AP to be open. */
    WiFi.softAP(ssid);

    IPAddress myIP = WiFi.softAPIP();

    Serial.print("AP IP address: ");
    Serial.println(myIP);
    //server.on("/", handleRoot);
    //server.begin();
    Serial.println("HTTP server started");
}

void loop() {
    //server.handleClient();
}
Markus
@Links2004
Jan 07 2016 20:17
the only difference i see is that you not have a password will try.
Mario Mikočević
@mozgy
Jan 07 2016 20:18
hey @Links2004 and @me-no-dev, found the culprit in my code (it was dumb use of cast) and it's working fine now !
ystrem
@ystrem
Jan 07 2016 20:28
hi, anybody using eclipse with cdt plugin ?
Markus
@Links2004
Jan 07 2016 20:28
yes for arduino with cdt + arduino plugin
ystrem
@ystrem
Jan 07 2016 20:29
I don't know why,but it stopped to upload program and now it only build it.
Markus
@Links2004
Jan 07 2016 20:30
you use:
blob
ystrem
@ystrem
Jan 07 2016 20:30
blob
Markus
@Links2004
Jan 07 2016 20:33
ok you use a other arduino plugin.
ystrem
@ystrem
Jan 07 2016 20:33
hmm ok, it started work after restart workspace :D
PyB
@PyBerger
Jan 07 2016 20:33
@Links2004 no diff with the password
how should i use the esp reset and erase config, in an empty sketck ?
Markus
@Links2004
Jan 07 2016 20:34
yes
PyB
@PyBerger
Jan 07 2016 20:37
Now works with wpa...
let me remove it again
ystrem
@ystrem
Jan 07 2016 20:41
what plugin do y use ?
PyB
@PyBerger
Jan 07 2016 20:43
removed the security - failing again.
put it back - fails again...
this must have something to do with the ESP eraseConfig and Reset.
Markus
@Links2004
Jan 07 2016 20:44
SDK stuff....
PyB
@PyBerger
Jan 07 2016 20:44
How long should the ESP.EraseConfig run ? I see the led blinking, the terminal showing loads of 'ç'
Yep SDK stuff and I don't see much means to debug
Markus
@Links2004
Jan 07 2016 20:45
its fast <1sec
PyB
@PyBerger
Jan 07 2016 20:45
ok.
trying to do it again
Markus
@Links2004
Jan 07 2016 20:49
i use password and no pass and pass again but not get the bug.
PyB
@PyBerger
Jan 07 2016 21:07
Yep and on my side, I have a pretty weird behavior, got it working once , but can't figure out how - trying again since with no luck
I thought I had nailed it down - but the last test I just tends to proove it isn't this.
could you test @ 160MHz and see if it works.
Markus
@Links2004
Jan 07 2016 23:10
@PyBerger i have tested at 160Mhz