1 (edited by ungesimmt 2017-07-28 16:04:01)

Topic: Help with esp8266

Hi there,

great programm smile
I have actually two issues. First is the app, see: http://forum.remotexy.com/viewtopic.php?id=221

My second problem is the esp8266-12.
It is connected to my arduino micro. It should communicate to the arduino, but it does not work properly.

In the serial monitor, i can see that the arduino is sending "AT". After that "AT+RST". But then it says: "Module not available, RemoteXY stoped".

If i check the RX on the Arduino with an FTDI UART-USB-Converter, I can see that the esp gives the response "OK" to the first "AT"-request. But than nothing.
In my thinking, that means that the wiring should be ok.
I have plugged the esp via an external 3,3V power supply.

Why is the esp not responding on the restart-command?

Do you have any idea?
Here is my sketch, just 2 LED added to see if the arduino is running...

Thanks in advance, ungesimmt

//////////////////////////////////////////////
//        RemoteXY include library          //
//////////////////////////////////////////////

// RemoteXY select connection mode and include library 
#define REMOTEXY_MODE__ESP8266_HARDSERIAL_POINT
#define REMOTEXY__DEBUGLOGS Serial

#include <RemoteXY.h>


// RemoteXY connection settings 
#define REMOTEXY_SERIAL Serial1
#define REMOTEXY_SERIAL_SPEED 115200
#define REMOTEXY_WIFI_SSID "Lichtsteuerung"
#define REMOTEXY_WIFI_PASSWORD "12345678"
#define REMOTEXY_SERVER_PORT 6377 


// RemoteXY configurate  
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
  { 255,7,0,0,0,68,0,6,0,2,
  6,0,1,10,43,43,5,10,39,39,
  6,4,0,50,5,8,53,49,2,9,
  54,6,1,1,81,34,18,24,6,78,
  18,18,2,83,97,118,101,0,1,1,
  81,9,18,24,6,57,18,18,4,77,
  111,100,101,0,3,4,62,9,13,49,
  49,62,9,31,2 };
  
// this structure defines all the variables of your control interface 
struct {

    // input variable
  uint8_t rgb_picker_r; // =0..255 Red color value 
  uint8_t rgb_picker_g; // =0..255 Green color value 
  uint8_t rgb_picker_b; // =0..255 Blue color value 
  int8_t helligkeit_slider; // =0..100 slider position 
  uint8_t button_save; // =1 if button pressed, else =0 
  uint8_t button_mode; // =1 if button pressed, else =0 
  uint8_t select_1; // =0 if select position A, =1 if position B, =2 if position C, ... 

    // other variable
  uint8_t connect_flag;  // =1 if wire connected, else =0 

} RemoteXY;
#pragma pack(pop)

/////////////////////////////////////////////
//           END RemoteXY include          //
/////////////////////////////////////////////


//globale Variablen
  #define LED_gruen 14//MISO
  #define LED_rot   15//SCK 
  int test=0;
  unsigned long previousMillis = 0;

  
void setup() 
{ 
  pinMode(LED_BUILTIN, OUTPUT); //integrierte LED
  pinMode(LED_gruen, OUTPUT);
  pinMode(LED_rot, OUTPUT);

  Serial.begin(115200);  //Verbindung USB direkt zu PC (debug Console)
  delay(1000);
  RemoteXY_Init ();
} //Ende void setup() 


void loop() 
{ unsigned long currentMillis = millis();

  RemoteXY_Handler ();
      
  if (currentMillis - previousMillis >= 250) //Timer 1ms
    { previousMillis = currentMillis;
        if ( test == 0 )
          { digitalWrite(LED_gruen, HIGH);
            test=1;
          }
        else if ( test == 1 )
          { digitalWrite(LED_gruen, LOW);
            test=0;
          };
    };
} //Ende void loop() 

2

Re: Help with esp8266

When Arduino sends "AT+RST", it waits for the answer "ready".

AT+RST 

OK 

 ets Jan  8 2013,rst cause:2, boot mode:(3,1) 

load 0x40100000, len 1396, room 16  
tail 4 
chksum 0x89 
load 0x3ffe8000, len 776, room 4  
tail 4 
chksum 0xe8 
load 0x3ffe8308, len 540, room 4  
tail 8 
chksum 0xc0 
csum 0xc0 

2nd boot version : 1.4(b1) 
  SPI Speed      : 40MHz 
  SPI Mode       : DIO 
  SPI Flash Size & Map: 8Mbit(512KB+512KB) 
jump to run user1 @ 1000 

#т#n't use rtc mem data 
slЏ‚rlМя 
Ai-Thinker Technology Co.,Ltd. 

ready

Check the version of ESP AT commands.
Connect the ESP via a USB-UART converter and call AT+RST
http://remotexy.com/en/help/esp8266-firmware-update/

3

Re: Help with esp8266

Hi and thanks for your reply.

I've checked the things you said.
As I can see, I have AT Version 1.2.0.0 and after "AT+RST" I can see the "Ready"-answer.

Any Idea?
Thanks, Simon

Here are my outputs:

AT+GMR
AT version:1.2.0.0(Jul  1 2016 20:04:45)
SDK version:1.5.4.1(39cb9a32)
Ai-Thinker Technology Co. Ltd.
Dec  2 2016 14:21:16
OK
AT+RST
OK
 ets Jan  8 2013,rst cause:2, boot mode:(3,7
load 0x40100000, len 1856, room 
tail 0
chksum 0x63
load 0x3ffe8000, len 776, room 8 
tail 0
chksum 0x02
load 0x3ffe8310, len 552, room 8 
tail 0
chksum 0x79
csum 0x79
2nd boot version : 1.5 
SPI Speed      : 40MHz 
SPI Mode       : DOUT 
SPI Flash Size & Map: 32Mbit(512KB+512KB
jump to run user1 @ 1000
??<2>?p<3>?N??{??N|?<\f>l<\f>d??rl??r?l?l<18>?<\f><\f><\f>d <2>??r?$?l2?<4><4><\f>l`<2>??r?l<\f>??<\0>?<31><\0><\f>d$`<3>sd?<18>?c<\0>??<27>"b<\f>l?#{|<\f>?|l<4>B<28>??#<18>$s?<28>c<4>??n?<3>2NN?<16><3><\0><2>?l??o<4>$<\f>?<4>$??<\0>?<\f>?<4><\f>???$?<14>l?<2>N?<\0>??<27>B"<4>l???<4>"<\f><3><2>???cc<\f>d<4>?bp{$rl                                            
Ai-Thinker Technology Co. Ltd
Ready