-->
Page 1 of 1

HTTPS connection not working

PostPosted: Sat Jan 10, 2015 4:22 pm
by ampakinetic
Hi, I've have just signed up on this forum. Amazing power in small packages, made super flexible by this firmware. Thank you for creating NodeMCU and making it open source!

I'm trying to connect to a SSL HTTP service and saw this example in the fragments file:

Code: Select allsk=net.createConnection(net.TCP, 1) sk:on("receive", function(sck, c) print(c) end )
sk:on("connection", function(sck) sck:send("GET / HTTPS/1.1\r\nHost: www.google.com.hk\r\nConnection: keep-alive\r\nAccept: */*\r\n\r\n") end ) sk:connect(443,"173.194.72.199")


I've tried running this using the latest firmware (08012015) however it returns no response (from http://www.google.com.hk) - I've also tried resolving and requesting from the more local http://www.google.co.nz.

When I request from my own SSL service, if I have GET / HTTPS I get a 400 malformed request error from the server, and if I change it to GET / HTTP there is no response, or there is a firmware reset.

Is there something I am doing wrong or is there a problem with the secure mode connection at the moment?