JAndrassy / WiFiEspAT

Arduino networking library. Standard Arduino WiFi networking API over ESP8266 or ESP32 AT commands.
GNU Lesser General Public License v2.1
288 stars 44 forks source link

Ip address error in Wifi Client mode #4

Closed sgamoct closed 4 years ago

sgamoct commented 4 years ago

Hi, my esp8266, with At 1.7 command release,it's set in client mode (temporary o super persistent connection) received ip address isn't correct. My WiFi network dchp server have ip range 192.168.0.2 to 255 but ip recived in serial monitor from esp8266 is 65.38.83.95. This received address will not ping from cmd. Work only whith fixed ip address, gatway and subnetmask. can you help me?

JAndrassy commented 4 years ago

please change in src/utils/EspAtDrvLogging.h to #define LOG_LEVEL LOG_LEVEL_DEBUG to see the AT commands

sgamoct commented 4 years ago

hi i didn't understand the change because My file in src/utils/EspAtDrvLogging.h it's

define LOG_LEVEL_SILENT 0

define LOG_LEVEL_ERROR 1

define LOG_LEVEL_WARN 2

define LOG_LEVEL_INFO 3

define LOG_LEVEL_DEBUG 4

I send the AT commands manually from console and i have the same ip problem. any ideas?

JAndrassy commented 4 years ago

there is #define LOG_LEVEL LOG_LEVEL_SILENT in EspAtDrvLogging.h

you could try AT 1.7.1 version

sgamoct commented 4 years ago

Unfortunately doesn't work. I can use ESP only fixed ip address in this moment, but is'nt a good solution. I tried AT 1.7.1 version with same problems. I had upgrade ESP from 1.3 sdk2 512+512 to 1.7 sdk 3 1024+1024 using 16Mb-c1 option. I'm not sure but Problems will depending from upgrade? now i will try to downgrade at AT1.62. this version it's unsupported in WiFIEspAT?

JAndrassy commented 4 years ago

only AT 1.7 and 1.7.1 have the 'passive mode' used by the library. older versions and AT 2.0 don't have 'passive mode'. Espressif works on 'passive mode' for 2.1. We will see whether they will succeed. Right now in git version and ESP32 AT 2.0 release UDP doesn't work at all in passive mode.

sgamoct commented 4 years ago

My ESP8266 is a model with only 512 + 512 user memories. I downgraded the user.bin option 8 Mb and 512 + 512 now from 1.7 to 1.62. In this case the IP address in dhcp mode works. Now I'm sure the problem is upgrading to the 1.7 AT file size. I ran the update with 1024 + 1024 user.bin and selected the 16 MB -c1 option. so, excluse the dynamic ip, with this solution everything seems to work.

JAndrassy commented 4 years ago

on any flash size except 512kB use 2MB-c1 0x0 boot_v1.7.bin 0x01000 at/1024+1024/user1.2048.new.5.bin 0x1fb000 blank.bin 0x1fc000 esp_init_data_default_v08.bin 0xfe000 blank.bin 0x1fe000 blank.bin

sgamoct commented 4 years ago

This is the flash set up. correct? Cattura after flash i run in terminal At command and this it's the result: InkedCattura2_LI

but my network gateway it' 192.168.0.1.

JAndrassy commented 4 years ago

for me it worked the 2MB-c1 on 1 MB. I don't remember if it was 1.7 or 1.7.1

try the AT Lobo build for 1 MB flash https://github.com/loboris/ESP8266_AT_LoBo/#flashing

sgamoct commented 4 years ago

i have try 1.7 and 1.71 espressif AT without success. For LoBo AT i can compile only in linux machine? i 'm not linux frienly user and not have competente for compiling correct file :(. thx for all.

JAndrassy commented 4 years ago

i have try 1.7 and 1.71 espressif AT without success. For LoBo AT i can compile only in linux machine? i 'm not linux frienly user and not have competente for compiling correct file :(. thx for all.

there are compiled binaries.

sgamoct commented 4 years ago

please can you link the correct file i will download?

JAndrassy commented 4 years ago

bin/upgrade/esp8266_AT_1_2.bin should be the right for 1 MB flash the other bin files should go to addresses as for the normal AT firmware for 1MB flash

sgamoct commented 4 years ago

Thank you, i try it now. replace \user1.1024.new.2.bin with esp8266_AT_1}_2.bin file in the same memory address?

sgamoct commented 4 years ago

Thank you, i try it now. replace \user1.1024.new.2.bin with esp8266_AT_1_2.bin file in the same memory address?

yes 0x1000

dosen't work. i now write in the github LoBo for ask the correct configuration. buil.sh not work in my windows power shell. Thankyou for all i will try to resolve ...

sgamoct commented 4 years ago

how it doesn't work?

I received error in terminal after flash:

No configured firmware found, check all... Address: 001000 Wrong flash mode Address: 101000 Wrong flash mode FATAL ERROR, no firmware found

Cattura

Cattura1

JAndrassy commented 4 years ago

the addresses are not right for 1 MB blank.bin 0xFB000 esp_init_data_default.bin 0xFC000 blank.bin 0x7E000 blank.bin 0xFE000

sgamoct commented 4 years ago

Happy Happy! Very thanks my friend. All work fine ESP fimware and your WiFiESP library. Thank you very much for you support.