[Resolved]ESP8266 only concts to ESP8266 in softAP w OPEN encryption

mvandere
Posts: 8
Joined: Thu Jun 11, 2015 1:41 pm

[Resolved]ESP8266 only concts to ESP8266 in softAP w OPEN encryption

Postby mvandere » Thu Jun 11, 2015 1:45 pm

Hi There seems to be some discussion in this area although it doesn’t always seem relevant. I’m trying to connect 2 ESP8266s with one in softAP mode. The connection fails unless OPEN encryption is used and I can’t figure out why. I’ve tried longer AP names as suggested in some posts but this seems to make no difference.
I’m using the latest AT commands AT_v0.25
Here’s the AP setup log

Code: Select all

AT+CWMODE_CUR=2


OK
AT+CWSAP_CUR="ESP826612345678","1234567890",5,3


OK


Here’s the attempt to connect

Code: Select all

AT+CWJAP_CUR="ESP826612345678","1234567890"

WIFI CONNECTED
+CWJAP:1

FAIL
WIFI DISCONNECT

Can anyone tell me how to get it to work.
Thanks,
Mark

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: ESP8266 only concts to ESP8266 in softAP w OPEN encrypti

Postby ESP_Faye » Thu Jun 11, 2015 2:59 pm

Hi,

Thanks for your interest in ESP8266 !

What's the version of your hardware module ? Is it ESP-01 ?

Could you offer the capture picture of your flash download tool while downloading AT firmware into flash ?

mvandere
Posts: 8
Joined: Thu Jun 11, 2015 1:41 pm

Re: ESP8266 only concts to ESP8266 in softAP w OPEN encrypti

Postby mvandere » Fri Jun 12, 2015 10:47 am

They are ESP-12s

Here's the log from your ESP FLASH DOWNLOAD tool

Code: Select all

test offset :  4177920 0x3fc000
case ok
test offset :  4186112 0x3fe000
case ok
test offset :  0 0x0
case ok
test offset :  4096 0x1000
case ok
test offset :  528384 0x81000
case ok
(True, [[u'C:\\4Droot\\ESP8266\\esp_iot_sdk_v1.1.1\\bin\\boot_v1.4(b1).bin', 0], [u'C:\\4Droot\\ESP8266\\esp_iot_sdk_v1.
1.1\\bin\\at\\user1.1024.new.2.bin', 4096], [u'C:\\4Droot\\ESP8266\\esp_iot_sdk_v1.1.1\\bin\\at\\user2.1024.new.2.bin',
528384], [u'C:\\4Droot\\ESP8266\\esp_iot_sdk_v1.1.1\\bin\\esp_init_data_default.bin', 4177920], [u'C:\\4Droot\\ESP8266\\
esp_iot_sdk_v1.1.1\\bin\\blank.bin', 4186112]])
rep_path : C:\4Droot\ESP8266\FLASH_DOWNLOAD_TOOLS_v1.2_150512\bin_tmp\downloadPanel1
size_speed : 40
test fpath: C:\4Droot\ESP8266\esp_iot_sdk_v1.1.1\bin\_temp_by_dltool/downloadPanel1
test fname: C:\4Droot\ESP8266\esp_iot_sdk_v1.1.1\bin\_temp_by_dltool/downloadPanel1\boot_v1.4(b1).bin_rep
mode : ☻   speed:
write bin :  C:\4Droot\ESP8266\esp_iot_sdk_v1.1.1\bin\_temp_by_dltool/downloadPanel1\boot_v1.4(b1).bin_rep
test fpath: C:\4Droot\ESP8266\esp_iot_sdk_v1.1.1\bin\_temp_by_dltool/downloadPanel1
test fname: C:\4Droot\ESP8266\esp_iot_sdk_v1.1.1\bin\_temp_by_dltool/downloadPanel1\esp_init_data_default.bin_rep
mode : ☻   speed:
write bin :  C:\4Droot\ESP8266\esp_iot_sdk_v1.1.1\bin\_temp_by_dltool/downloadPanel1\esp_init_data_default.bin_rep
test running : False
serial port opened
Connecting...
chip sync ok!
chip_flg 1
r1: a6; r2:62 ; r3: d7
MAC AP : 1A-FE-34-A6-62-D7
MAC STA: 18-FE-34-A6-62-D7
('tttest uuuuuuuuuuart : uart reg: ', 461)
(' baudrate: ', 115200)
get crystal: 26553600
head: 0 ;total: 0
erase size : 0
get flash id : 0xff1640ef
 manufacturer_id: 0xef

 device_id: 0x4016

vendor: 239
mode: 64
size: 22
filename:  C:\4Droot\ESP8266\FLASH_DOWNLOAD_TOOLS_v1.2_150512\bin_tmp\downloadPanel1\boot_v1.4(b1).bin_rep
offset :  0
filename:  C:\4Droot\ESP8266\FLASH_DOWNLOAD_TOOLS_v1.2_150512\bin_tmp\downloadPanel1\user1.1024.new.2.bin
offset :  4096
filename:  C:\4Droot\ESP8266\FLASH_DOWNLOAD_TOOLS_v1.2_150512\bin_tmp\downloadPanel1\user2.1024.new.2.bin
offset :  528384
filename:  C:\4Droot\ESP8266\FLASH_DOWNLOAD_TOOLS_v1.2_150512\bin_tmp\downloadPanel1\esp_init_data_default.bin_rep
offset :  4177920
filename:  C:\4Droot\ESP8266\FLASH_DOWNLOAD_TOOLS_v1.2_150512\bin_tmp\downloadPanel1\blank.bin
offset :  4186112
Erasing flash...
head: 1 ;total: 1
erase size : 4096
Writing at 0x00000800... (0 %)
Leaving...
Erasing flash...
head:  15 ;total: 64
erase size :  200704
Writing at 0x00040c00... (49 %)
Leaving...
Erasing flash...
head:  15 ;total: 64
erase size :  200704
Writing at 0x000c0c00... (98 %)
Leaving...
Erasing flash...
head: 1 ;total: 1
erase size : 4096
Writing at 0x003fc000... (98 %)
Leaving...
Erasing flash...
head: 1 ;total: 1
erase size : 4096
Writing at 0x003fec00... (99 %)
Leaving...
com closed

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: ESP8266 only concts to ESP8266 in softAP w OPEN encrypti

Postby ESP_Faye » Tue Jun 16, 2015 2:57 pm

Hi,

Sorry that I can't duplicate your problem.

Please notice that if you are using 32Mbit flash , blank.bin need to be downloaded to both 0x7E000 and 0x3FE000

mvandere
Posts: 8
Joined: Thu Jun 11, 2015 1:41 pm

Re: ESP8266 only concts to ESP8266 in softAP w OPEN encrypti

Postby mvandere » Tue Jun 16, 2015 3:11 pm

Could you provide a command log from both sides that works, so that I can use that and try and work out the difference between my failing commands and yours that work?

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: ESP8266 only concts to ESP8266 in softAP w OPEN encrypti

Postby ESP_Faye » Tue Jun 16, 2015 4:03 pm

Hi,

Here is my test steps and flash download tool configuration
STA_AP_test.png
STA_AP_test.png (50.85 KiB) Viewed 13127 times


Serial-COM6 is the ESP8266 as softAP, Serial-COM7 is another ESP8266 as station

I'm using the AT bin (\esp_iot_sdk_v1.1.1\bin\at) http://bbs.espressif.com/viewtopic.php?f=5&t=554

mvandere
Posts: 8
Joined: Thu Jun 11, 2015 1:41 pm

Re: ESP8266 only concts to ESP8266 in softAP w OPEN encrypti

Postby mvandere » Wed Jun 17, 2015 2:16 pm

I started with what you have shown and was still getting the "FAIL". Due to the 'WIFI GOT IP' message that is received when everything is working I was playing around with DHCP settings and the like and 'suddenly' it came good. Here's a log of it not working and then working (Remember there are other 'changes' that have happened, this is just the last one)

Code: Select all

AT+CWJAP_CUR="ESP826612345678","1234567890"

WIFI CONNECTED
+CWJAP:1

FAIL
WIFI DISCONNECT
AT+CIFSR

+CIFSR:STAIP,"0.0.0.0"
+CIFSR:STAMAC,"18:fe:34:a6:63:cb"

OK
AT+CIPSTA_CUR="142.255.49.99","142.255.49.94","255.255.255.0"


OK
AT+CIFSR

+CIFSR:STAIP,"0.0.0.0"
+CIFSR:STAMAC,"18:fe:34:a6:63:cb"

OK
AT+CWJAP_CUR="ESP826612345678","1234567890"

WIFI CONNECTED
WIFI GOT IP

OK


I think tried various things and it worked every time. I even reflashed it and it still works using the exact commands that previously failed.

The "SPI Flash Size & Map: 32Mbit(512KB+512KB)" message that comes up during boot, is that actual, or from a setting somewhere?

How can I completely clear the flash to ensure that I am starting with a 'clean slate'?

Thanks.

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: ESP8266 only concts to ESP8266 in softAP w OPEN encrypti

Postby ESP_Faye » Tue Jun 23, 2015 11:31 am

Hi,

blank.bin is downloaded for initialization,please download blank.bin into flash according to documentation “4A-ESP8266__AT Instruction Set”

elchupacabra
Posts: 5
Joined: Mon Oct 12, 2015 3:46 am

Re: ESP8266 only concts to ESP8266 in softAP w OPEN encryption

Postby elchupacabra » Mon Oct 12, 2015 4:22 am

yes... got the same disconnecting errors. Problem solved by flashing the blank.bin to both 0x7E000 and 0x3FE000 !!. Now works OK!
<happy :D >

Who is online

Users browsing this forum: No registered users and 188 guests