Skip to content

SSL connection faiture on Benckmark ( using delay bellow < 80ms) #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ricardojlrufino opened this issue May 17, 2016 · 1 comment

Comments

@ricardojlrufino
Copy link
Contributor

In tests, the ESP8266 module fails when enabling SSL and receive more data in a smaller range than 80ms

Error:

ssl->need_bytes=51032 > 6859

Test:

var device = ODev.findDevice(1);
setInterval(function(){device.on()},80);
@ricardojlrufino
Copy link
Contributor Author

Sketch

//#include <ESP8266AT.h> // Enable: AT Firmware

#include <ESP8266WiFi.h>  // Enable ESP8266 Standalone
#include <PubSubClient.h> // Enable MQTT

#include <OpenDevice.h>
#include <utility/Timeout.h>

const char* ssid = "ricardo-ap";
const char* password = "1";

void setup() {
  ODev.name("ODev-Thing1");
  Config.server = "192.168.3.105"; // Only for MQTT
  Serial.begin(115200);
  ODev.enableDebug();

  ODev.addDevice("LED", 2, Device::DIGITAL)->invertedState()
    ->onChange(onDeviceChange);

  // WiFi.init(new ESP8266(Serial1, 115200)); // Only for: AT Firmware
  WiFi.mode(WIFI_AP_STA);
  WiFi.begin(ssid, password);
  ODev.begin(WiFi);
}

void loop() {
  ODev.loop();
}


bool onDeviceChange(byte id, unsigned long value){

  Device* device = ODev.getDevice(id);
  if(device->isON()){
    device->off();
  }

  return true;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant