Links2004 / arduinoWebSockets

arduinoWebSockets
GNU Lesser General Public License v2.1
1.88k stars 555 forks source link

Needs to change ESP8266 dependent libs to use ESP32 in PlatformIo #205

Closed williamesp2015 closed 7 years ago

williamesp2015 commented 7 years ago

I am using PlatformIO [env:node32s] platform = espressif32 board = node32s framework = arduino I try to use ArduinoWbesockets but some dependencies to ESP8266 found. I copied queue.h from old ESP8266 version but other headers required persistently. the best attempt done here by changing websocketserver.ino: https://github.com/bbx10/arduinoWebSockets/tree/esp32

In file included from src\ESP8266\ESP8266WiFi.h:33:0, from src\ESP8266\ESP8266WiFiGeneric.cpp:27: src\ESP8266\ESP8266WiFiType.h:26:19: fatal error: queue.h: No such file or directory compilation terminated. *** [.pioenvs\node32s\src\ESP8266\ESP8266WiFiGeneric.o] Error 1 [ERROR] Took 3.26 seconds

Links2004 commented 7 years ago

not sure how the ESP8266 header and source files end up in you include paths on a ESP32 build. but this is the first problem you need to fix, if we have a clean build environment we can look for other Problems.

williamesp2015 commented 7 years ago

Links2004 I tested with Arduino IDE 1.8.2. Similar with platformIO compiled when hash library added from https://github.com/bbx10/Hash_tng/tree/master/src but it failed to run on different ESP 32 development boards (NodeMCU-32S and Maple ESP32 R1). rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0x00 clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff0008,len:8 load:0x3fff0010,len:160 load:0x40078000,len:10632 load:0x40080000,len:252 entry 0x40080034

Links2004 commented 7 years ago

I dont own a ESP32, only a ESP31 and many ESP8266. which make this very hard to debug for me.

williamesp2015 commented 7 years ago

solved when headers copied into src directory using PlatformIo.

PawanRao93 commented 5 years ago

@williamesp2015 - I am facing a similar problem. I am trying to run a program that needs ESP8266WiFi.h on a NodeMCU- ESP32s module. When I compile the file I get the following error - ----------------------Error----------------------------------- fatal error: ESP8266WiFi.h: No such file or directory compilation terminated. exit status 1 Error compiling for board NodeMCU-32S.

However, when I select the board type to "Generic ESP8266 Board" and compile, I do not get any error. I see you solved the problem, however, I did not understand how. Could you please help me by explaining what you did / what I should do to solve this problem?

rtek1000 commented 5 years ago

Hello,

If someone else is with this error, please check this other post:

https://github.com/esp8266/Arduino/issues/4483