Inbuilt ESP 8266 WiFi with Arduino Mega 2560 not working

Dear Guys

My friend and I are working on our internship project using Arduino boards. Initially, we were using Arduino Leonardo, but we were not able to set up the ethernet connection for connecting it to the internet. So we changed the board to Arduino Mega 2560 with an inbuilt 8266 WiFi module.

Because we both are not experienced in Arduino, we are not able to configure this also. We have searched numerous posts and youtube videos regarding the same, but unsuccessful.

We were able to set the IP and MAC address, but the output is not generated when we run the serial monitor. So can anybody please reply what to do step by step for the successful connection?

I know its hectic and practically impossible to explain the whole process here. Any links to the websites or forums which explain everything in detail also will be helpful for us. Because we both are not having much idea regarding this field, we don’t know what to do. We are not using any shield. Just the Arduino Mega is connected with the USB cable. Any advice will be of great help. Thank You.

Long story short:

you started with the wrong module (by the way you should link to it, because we can't see on your desk).

Use some kind of NodeMCU or WemosD1 and program these modules (not an Arduino Mega).
If you run out of ports, add I2C port expanders.

With this mindset, then there's no need for an Arduino to exist, or this forum for that matter. Everyone could just be using NodeMCU and port expanders.

You speak as if your first reply is of any value...

Does this help at all? https://www.instructables.com/id/Arduino-MEGA-2560-With-WiFi-Built-in-ESP8266/

or tis: https://forum.arduino.cc/index.php?topic=604490.0

hzrnbgy:
With this mindset, then there's no need for an Arduino to exist, or this forum for that matter. Everyone could just be using NodeMCU and port expanders.

If someone doesn't need the Ethernet or wiFi, then the Arduino is perfectly fine.
Otherwise, it is easier to use a module that has built-in Ethernet or wiFi or Bluetooth.

.

hzrnbgy:
You speak as if your first reply is of any value...

Actually common sense is of value!

abhiraam:
So we changed the board to Arduino Mega 2560 with an inbuilt 8266 WiFi module.

Provide a link to the actual board you bought.

These boards are non-standard.
You better hope that the one you bought has good documentation.

.

Thanks for the responses friends.

Please feel free to ask any info regarding the board. Because I am a newbie, the information I provide might not be adequate. Now only I noticed that it is a duinotech board that is written Arduino compatible. I don't know whether that creates any compatibility issues (the company provided this board). Here is the link to it -

Mega with Wi-Fi | Jaycar Electronics New Zealand.

And thanks for sharing the links and other opinions, I am going through all of them.

Hii...I am using the zip files provided by the product website only. I haven't done any changes to that (because I don't know that much coding). However, my friend is working on the board as of now and I will update you regarding his work after asking him. Thank you very much for your time.Cheers

Hi All
I have used the same codes which I downloaded from the website of this controller. They had provided the codes for Arduino and ESP as well. Followed the same procedures in the readme file they gave. If anyone wants to have a look, I have furnished the procedures from that notepad below -

If you haven't already, install the ESP8266 Boards addon as per the XC3802
manual located on the product page:

https://jaycar.com.au/p/XC3802

the code in this zipfile is used as an example for our new XC4421 and XC4411
boards.

To write arduino code:

Configure the dip switches as shown: 3,4 are on, the others are off.

|-|-|o|o|-|-|-|-| on
|o|o|-|-|o|o|o|o| off
|1|2|3|4|5|6|7|8|

for XC4421 select Tools->Board->Arduino Mega (for XC4421) Or Uno (for XC4411)

open arduino.ino and press upload.

To write esp code:

Configure the dip switches as shown: 5,6,7 are on, the others are off.

|-|-|-|-|o|o|o|-| on
|o|o|o|o|-|-|-|o| off
|1|2|3|4|5|6|7|8|

for XC4421 select Tools->Board->Generic 8266 Module
-> If you cannot see it, you did not read the XC3802 Manual!

open esp.ino and press upload; after compiling, when the IDE says "Uploading.."
You should begin to see ".......___........" during this time, press
the reset button on the MCU; the ESP should begin to accept
instructions.

To run the example:

Upload both of the code as above, then configure the switches as shown: (1,2 are on)

|o|o|-|-|-|-|-|-| on
|-|-|o|o|o|o|o|o| off
|1|2|3|4|5|6|7|8|

Open up your wireless internet and you should see a new wireless network.
Connect to it and navigate to http://10.0.0.7, you'll see two hyperlinks
to turn the arduino L13 led on/off. You should be able to see the device
interplay between your phone/computer, the ESP, and the arduino.

Thank You

here is an article that may be relevant to your problem : https://diyodemag.com/projects/fixing_firmware_arduino_bootloader_on_uno_mega_part_1

edit:
also read the post by gubernaculum https://forum.arduino.cc/index.php?topic=655690.msg4621191#msg4621191

.

Thank you very much, friends

Last day I got some progress on the task. I have uploaded the codes given on the product website again by resetting the board. One thing I did differently was changing the data cable to a new one. Now the wifi module is getting detected on the mobile and laptop. My next challenge is to connect the 8266 to the company wifi (because now the phone is getting connected to the hotspot generated by 8266 only) so that I can control the mega board from the mobile/lap through the company wifi.

Thank You All