Wifi connection error
-
I followed the post given in the following link:
However, in the TCP server example when I try to upload the code, it gives the following error:
Arduino: 1.8.16 (Windows 10), Board: "Generic ESP8266 Module, 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, dtr (aka nodemcu), 26 MHz, 40MHz, DOUT (compatible), 1MB (FS:64KB OTA:~470KB), 2, nonos-sdk 2.2.1+100 (190703), v2 Lower Memory, Disabled, None, Only Sketch, 115200" <command-line>: error: expected identifier before numeric constant C:\Users\Admin\Documents\Arduino\libraries\ITEADLIB_Arduino_WeeESP8266-master/ESP8266.h:38:7: note: in expansion of macro 'ESP8266' 38 | class ESP8266 { | ^~~~~~~ <command-line>: error: expected unqualified-id before numeric constant C:\Users\Admin\Documents\Arduino\libraries\ITEADLIB_Arduino_WeeESP8266-master/ESP8266.h:38:7: note: in expansion of macro 'ESP8266' 38 | class ESP8266 { | ^~~~~~~ <command-line>: error: expected unqualified-id before numeric constant E:\College\IIST\Competetion\Codes\ESP\ESP_code1\TCPServer_ESP_Test\TCPServer_ESP_Test.ino:27:1: note: in expansion of macro 'ESP8266' 27 | ESP8266 wifi; | ^~~~~~~ E:\College\IIST\Competetion\Codes\ESP\ESP_code1\TCPServer_ESP_Test\TCPServer_ESP_Test.ino: In function 'void setup()': TCPServer_ESP_Test:34:5: error: 'wifi' was not declared in this scope 34 | wifi.begin(Serial2, 115200); | ^~~~ TCPServer_ESP_Test:34:16: error: 'Serial2' was not declared in this scope; did you mean 'Serial1'? 34 | wifi.begin(Serial2, 115200); | ^~~~~~~ | Serial1 E:\College\IIST\Competetion\Codes\ESP\ESP_code1\TCPServer_ESP_Test\TCPServer_ESP_Test.ino: In function 'void loop()': TCPServer_ESP_Test:78:20: error: 'wifi' was not declared in this scope 78 | uint32_t len = wifi.recv(&mux_id, buffer, sizeof(buffer), 100); | ^~~~ exit status 1 'wifi' was not declared in this scope
Can someone help with this?
-
@indriyam said in Wifi connection error:
Hello, Indriyam
I believe you have the wrong board selected in your arduino IDE. Please go to Tools > Board > Spresense Boards and select Spresense.
If this option is not available to you yet, please install the Spresense Arduino Library following the tutorial in this link: https://developer.sony.com/develop/spresense/docs/arduino_set_up_en.html#_install_spresense_arduino_library
Let me know if your problem was solved after this or if you need further assistance.