-->
Page 1 of 1

Help: integrated MEGA 2560 + ESP8266 issue after flashing...

PostPosted: Wed Jun 05, 2019 8:52 am
by 8bit-Dude
Hello guyz,

It is my first post here, and I apologize in advance for my complete noob post.

I bought from Amazon an Arduino Mega 2560 + ESP8266 (maker: WINGONEER). I got an Arduino sketch working through AT commands, and quickly stumbled on a widely reported problem: UDP packets have a delay of ~250ms unless the server sends a response to each packet (and in my case, the ping is 300ms so I cannot speed up packet sending...!). I need to send packets every 50ms or so.

I checked the ESP8266 firmware on my board and found it was SDK 0.9.5. After some research, I decided to follow this article (https://www.instructables.com/id/Arduin ... n-ESP8266/) and upgraded to SDK 1.5.0 (I used the exact addresses shown in the flashing section).

The board boots alright, and AT commands are accepted by the ESP8266. But I cannot connect to my Wifi Hotspot any longer, AT+CWJAP throws a "9 error", for which I cannot find any explanation for.

I tried several firmwares (ESP8266_AT_Bin_V1.5.1, esp_iot_sdk_v1.5.0) and get the same outcome each time: AT commands work, but I can't connect to a Wifi hotspot (9 error).

Just wondered if anyone had some tips for me here to get this board running again...?

Cheers,
Tony

Re: Help: integrated MEGA 2560 + ESP8266 issue after flashin

PostPosted: Wed Jun 05, 2019 3:55 pm
by btidey
Have you tried using AT+CWJAP_DEF which is now the preferred form of the command?

Different versions of the AT firmware support different versions of the commands.

The other thing to think about is ditching the AT command set and putting your own firmware on the board. You may even be able to ditch the Mega and put your whole app on the esp8266 depending on what your app hardware requirements are.

Re: Help: integrated MEGA 2560 + ESP8266 issue after flashin

PostPosted: Wed Jun 05, 2019 5:13 pm
by 8bit-Dude
btidey wrote:Have you tried using AT+CWJAP_DEF which is now the preferred form.


I have not tried. I will give it a go tonight. As for my setup, I need to read from the mega's digital pins, including interrupts for pins changing state, which triggers the sending of udp packets. I guess the esp8266 cannot access the mega's pins, right?

Re: Help: integrated MEGA 2560 + ESP8266 issue after flashin

PostPosted: Fri Jun 07, 2019 4:51 am
by 8bit-Dude
btidey wrote:Have you tried using AT+CWJAP_DEF which is now the preferred form of the command?


I tried this command, but I am still getting the same error code.

For info, this a dump of what I am seeing in the Console, any further help would be greatly appreciated:

Code: Select all
AT+GMR

AT version:0.51.0.0(Nov 27 2015 13:37:21)
SDK version:1.5.0
compile time:Nov 27 2015 13:58:02
OK

AT+RST

OK

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

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      : 80MHz
  SPI Mode       : QIO
  SPI Flash Size & Map: 32Mbit(512KB+512KB)
jump to run user1 @ 1000

don't use rtc mem data
rl�ÿ
ready

AT+CWMODE=1

OK

AT+CWJAP_DEF="xxxx","xxxxx" (my wifi/key)

9

ERROR

AT+CIPSTA?

IP: 0.0.0.0