I am trying to set up my Wiz550s2e to connect to a server using a client static IP. Basically on the uart side I want to connect a device that supports HTTP and obviously on the Ethernet side to the network.
My client Static IP is 192.168.1.251
Server IP is 192.168.1.250
HTTP port 80
My configuration is an ESP8266 configured as a WiFi Access Point. I have a second serial port SWSerial that is connected to the Wiznet550s2e serial port UART. I am able to send AT commands to the Wiznet and configure the IP, etc. I then issue the AT+MDATA command to go into data transmission mode.
I have the Ethernet port of the Wiznet connected to a web server via direct Ethernet cable(crossover type).
I then use my smartphone to access the ESP8266 AP and point my browser to the AP IP for the ESP8266 (192.168.4.1) default. I am using the ESP8266WiFi libraries in the Arduino IDE to run a simple program running a WiFi client. I can see the HTML request coming from my phones browser, but I don’t get any response from the web server connected to the Wiznet.
Is there something else I am missing? Is there a simple way to make this work? Seems simple enough, any help appreciated…
I think it would be nice to check that the WIZ550S2E’s network configuration exists on the same network as your Webserver.
Since WIZ550S2E acts as a simple serial to Ethernet converter, regardless of whether you are using the ESP8266 or not, your data will be sent to the Webserver via Ethernet if you send to WIZ550S2E’s serial data that the webserver understands.
In my case there is just a point to point connection from the Wiznet module to the web server device that is the reason I am using the cross-over cable.
The configuration is like you had except the cross-over cable:
[Smartphone Accessing 192.168.4.1] --(wifi)-- [ESP8266] --(serial)-- [WIZ550S2E Static IP 192.168.1.251] --(Cross-Over Cable)-- [Webserver IP 192.168.1.250]
I am actually using the WEMOS D1 Mini (Esp8266) which has a built-in USB to Serial on the default Serial port of the device. In addition, I have set up a Software Serial port on the D1 Mini that is connected to the Wiznet UART (115200 baud). I can send the +++ to enter command mode and then the other AT commands to set the static IP and to open the port 80, etc… That works fine. Lastly I send AT+MDATA to switch to data mode. From the D1 Mini set as WiFi AP I use my phone to open the D1 Mini’s IP (192.168.4.1) and hopefully connect to the web server by Ethernet. I can see the HTTP request come through as I am using the default serial port as a monitor, but I get no response from the web server…Does this help any? Should I upload the code I am using on the D1 Mini?
As I said before, it is most accurate to communicate only with WIZ550S2E and Webserver.
However, if you want to use it easily through the library provided with ESP8266, the following method is recommended.
From your other topics, your webserver seems to work on your PC.
If your OS is macOS or windows, please use Wireshark to see if the Ethernet data is coming to your PC correctly.
(Whether data comes from the IP address of WIZ550S2E)
Please check this first and ask us any additional questions.
When you followed the diagram, did you mean that random characters were returned? When using WIZ550S2E?
Is not there a response, or is there a response but a strange character is returned?
I am concerned about the use of soft serial in your code and the baud rate.
Soft serial is unstable as fast as it controls GPIO unlike hardware serial.
I do not know about the ESP8266, but there have been many such issues in Arduino. Especially when using 115200, there are users who say that there is data loss.
So, in my opinion, do not connect WIZ550S2E to your server, but connect to your PC server and check if the HttpRequest you sent is transmitted without loss.
You can easily test using programs like PuTTY or Hercules.
Have you tested Serial to Ethernet, the most basic feature of the module?
With direct connection to a regular PC, did you check if the simple transfer of data is possible without problems using the above program?
If this basic function does not work, there is a problem with the module, but if it is not, it is not a problem with WIZ550S2E.
I swapped the serial ports on the ESP8266 so that the HW serial port is talking directly to the Wiznet serial port at 115200 and using the SW serial port for debug. This time when sending the HTTP request I get a response of 0xFF (255) that just keeps coming across the serial port. It just seems to send 0xFF continuously.
Again, if I use my PC, I get a correct response from my web server, just not with the Wiznet device.