At the moment I'm using ESP8266WiFi to open a TCP connection on port 443 (which works), and then using client.print(packet) to send the data. It all compiles, but when I capture the packets on the access point, all I get is a load of TCP packets that don't contain any of the data I tried to send.
Am I using the print() method wrong, or is this the wrong way to go about doing this?
I've posted the important parts of the code below. everything after the [...] is in the loop() function.
#include <ESP8266WiFi.h>
[...]
WiFiClient client;
const int httpPort = 443;
if (!client.connect(host, httpPort)) {
Serial.println("connection failed");
return;
}
else {
char packet[] = "\x16\x03\x01\x00\x2c\x01\x00\x00\x28\x03\x03\x2b\x7e\x15\x16\x28\xae\xd2\xa6\xab\xf7\x15\x88\x09\xcf\x4f\x3c\x2b\x7e\x15\x16\x28\xae\xd2\xa6\xab\xf7\x15\x88\x09\xcf\x4f\x3c\x00\x02\x00\xa0\x00\x00";
client.print(packet);
}