Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By dareko99
#86106 Hello

I have e problem with ESP8266 12E.
When i programming ESP with default software like WiFIESP8266 -> WiFiScan, program work normally, in monitor i have result schearch. But when I programming some software from APP RemoteMe, is programming normaly but don't work. Esp don't connect with server and in baud 74880 i see:

ctx: cont sp: 3ffffd40 end: 3fffffd0 offset:
01a0 >>>stack>>> 3ffffee0: 0000000c 3fffff50 3fffff5c 4020352e

or


ETS JAN 8 2013,RST CAUSE:2, BOOT MODE:(3,7).


In attach is automatic generated program form RemoteME. And schemat mu application.

Earliy I made similiar app with RemoteMe app and it work normally. I don't know where is a problem.




Code: Select all#define WIFI_NAME "2.4G-vnet-9776DC"
#define WIFI_PASSWORD "****************"
#define DEVICE_ID 2001
#define DEVICE_NAME "Smart_Home_1"
#define TOKEN "************"


#include <RemoteMe.h>
#include <RemoteMeSocketConnector.h>
#include <ESP8266WiFi.h>



RemoteMe& remoteMe = RemoteMe::getInstance(TOKEN, DEVICE_ID);

//*************** CODE FOR COMFORTABLE VARIABLE SET *********************


//*************** IMPLEMENT FUNCTIONS BELOW *********************


// method will be called when user message came

void onUserMessage(uint16_t senderDeviceId, uint16_t dataSize, uint8_t *data) {
   Serial.printf("got message sth size: %d\n",dataSize);
}

// this method will be called when sync message came to arduino You have to fill  returnData and returnDataSize
// as example now it reponse  one byte with 1 as value

void onUserSyncMessage(uint16_t senderDeviceId, uint16_t dataSize, uint8_t* data, uint16_t &returnDataSize, uint8_t *&returnData) {
   Serial.printf("got sync message sth size: %d\n",dataSize);
   returnDataSize = 1;
   returnData = (uint8_t*)malloc(returnDataSize);
   returnData[0]=1;
}


void setup() {
   Serial.begin(115200);

   WiFi.begin(WIFI_NAME, WIFI_PASSWORD);

   while (WiFi.status() != WL_CONNECTED) {
      delay(100);
   }


   remoteMe.setUserMessageListener(onUserMessage);
   remoteMe.setUserSyncMessageListener(onUserSyncMessage);
   remoteMe.setConnector(new RemoteMeSocketConnector());
   remoteMe.sendRegisterDeviceMessage(DEVICE_NAME);
}


void loop() {
   remoteMe.loop();
 
}
You do not have the required permissions to view the files attached to this post.