JAndrassy/arduino-library-wifilink

Mega + wifi board: does not seem to be able to do anything wifi-related

Closed this issue · 3 comments

I got myself one of the boards as described in this article: https://www.instructables.com/id/Arduino-MEGA-2560-With-WiFi-Built-in-ESP8266/

I've installed the wifilink firmware, and it seems to be working fine. It is connected to my wifi, and I can check all data when surfing to its ip address.

I've tried running the example sketch "ConnectWithWPA", filled out my SSID and pass, and put some checkpoints in the code:

void setup() {
  //Initialize serial and wait for port to open:
  Serial.begin(115200);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }

  Serial.println("check 1");
  
  if (WiFi.checkFirmwareVersion("1.1.0")) {
    Serial.println("check firmware");
    
    WiFi.resetESP(); // to clear 'sockets' after sketch upload
    delay(500); // let firmware initialize
  }
  
  Serial.println("check 2");

In the serial monitor, I see the below output:

check 1
23:52:09.787 -> ⸮7�

So, the code successfully runs until 'check 1', but then does something weird: instead of either printing 'check firmware' or 'check 2', as expected, I seem to be getting some weird output '⸮7'. I have no idea how to continue. It seems to be stuck on the WiFi.checkFirmwareVersion call, and changing this to WiFi.status() yields the same issue. What might I be doing wrong?

WiFi.init() is missing in your code.
try the WebClient example of the WiFiLink library.
but use Serial3 if it is the Mega+WiFi with the DIP switches

btw. compile the firmware for esp8266 with the esp8266 arduino core 2.4.2. newer don't work good

I removed it just before posting, but it wasn't working either. The esp8266 arduino core is at 2.4.1, because 2.4.2 wasn't working either for the normal mega connected to a NodeMCU for wifi.

However, using Serial3 seems to have fixed it. I'm fairly new to this, so just trying to understand: is the esp8266 module connected to the mega over Serial3, on my board? Is this why the Serial1 was not working?

However, using Serial3 seems to have fixed it. I'm fairly new to this, so just trying to understand: is the esp8266 module connected to the mega over Serial3, on my board? Is this why the Serial1 was not working?

You have the Robotdyn Mega+WiFi with the DIP switches to select the Serial connections between USB, ATmega2560 and the esp8266? then one of the options on the switches is Serial of esp8266 to Serial3 of the ATmega2560