TCP IP Examples (W5500)

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
User avatar
celebriums
Posts: 125
Joined: Sun Sep 25, 2016 3:50 pm
Has thanked: 71 times
Been thanked: 33 times
Contact:

TCP IP Examples (W5500)

Post by celebriums »

Dear Leigh and Benj
Dear Matrix Multimedia Family
Istanbul Turkey warm greetings from everyone.

I stopped dealing with ENC28J60 and
Today I bought the W5500 TCP IP product card.
But I looked for an example on the Matrix Wiki about the W5500,
But I couldn't find it.
)
I searched the forum on this subject but still could not find an example.

Can you share a sample program for the W5500?

I would appreciate if there is an instance that receives automatic IP on DHCP.
Last edited by celebriums on Fri Oct 11, 2019 4:05 pm, edited 2 times in total.
Sincerely Regards
Sadık SUME

www.kaandesign.com.tr

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: TCP IP Examples (W5500)

Post by LeighM »

Greetings Sadık!
I have attached a Webserver example using the W5500
However, this does not support DHCP either.
I would have thought that for a server you would want a static IP anyway, and not use DHCP?
But if it is essential, his document might help you to use ARP and UDP to implement your own DHCP request ...
https://www.matrixtsl.com/resources/fil ... ternet.pdf
For this you would need to use the W5500 TCPIP component, not the Webserver component.
Attachments
Webserver2.fcfx
(21.66 KiB) Downloaded 284 times

User avatar
celebriums
Posts: 125
Joined: Sun Sep 25, 2016 3:50 pm
Has thanked: 71 times
Been thanked: 33 times
Contact:

Re: TCP IP Examples (W5500)

Post by celebriums »

Dear Leigh
I hope you are fine. :D
Thank you for helps.
Sample code is very fine working.

I want to ask one more question?

The string expression in the while main loop, (for Example:STRA[20])
How do I show my web server in HTML page 1?

HTML page1 codes:

Code: Select all

<body bgcolor="#33FFFF">
<center><p><h1>Sensor1</h1></p>
<br/>Test Data<br/>
<h1><hr> <a href=\"http://www.sadiksume.com\">www.sadiksume.com<a></h1>
Sincerely Regards
Sadık SUME

www.kaandesign.com.tr

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: TCP IP Examples (W5500)

Post by LeighM »

In your flowchart use: SetOutValue(1, STRA)
In the HTML use %1 where you want to place the string

User avatar
celebriums
Posts: 125
Joined: Sun Sep 25, 2016 3:50 pm
Has thanked: 71 times
Been thanked: 33 times
Contact:

Re: TCP IP Examples (W5500)

Post by celebriums »

Dear Leigh
Thank you for your quick support. The codes work fine. :D

Now what I'm going to do is:

Add the TCP / IP Component and send this string data to the port that is open at a destination address such as 192.168.1.8:85

I am work for reading to the incoming codes, via the same port.

Can I do this by adding the TCP IP (W5500) component?
Sincerely Regards
Sadık SUME

www.kaandesign.com.tr

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: TCP IP Examples (W5500)

Post by LeighM »

Yes

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: TCP IP Examples (W5500)

Post by Benj »

I've been working on the W5500 support for the network comms component today and though I've fixed a number of problems it's still not working 100% nicely for me. I've pushed the various changes to the update system so you can see if it's any better for you now.

Here's my project file.
NetworkComms-W5500-Server.fcfx
(17.02 KiB) Downloaded 245 times
I'll try and get back on this next week.

User avatar
celebriums
Posts: 125
Joined: Sun Sep 25, 2016 3:50 pm
Has thanked: 71 times
Been thanked: 33 times
Contact:

Re: TCP IP Examples (W5500)

Post by celebriums »

Hello Ben
Thanks your replies, I hope your are fine..

I tried the code you sent me.
I did the following but couldn't run it.
When I scan only in the IP Scanner,
I can see that the W5500 Ethernet module can receive IP.

Creations:
I made the following changes through your program.
I replaced 18F877 with 18F25K22.
I made the configuration settings.
I replaced 2x16 LCD with 4x16 LCd.
I replaced the C code for OSC settings.
I have set my IP address to 192.168.1.25


Everything works normally on the LCD.
OSC settings are normal, I checked.

However, I didn't see any pages at 192.168.1.25
Attachments
W5500_2019_0917_New_Webserver_Try.fcfx
(19.56 KiB) Downloaded 229 times
Sincerely Regards
Sadık SUME

www.kaandesign.com.tr

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: TCP IP Examples (W5500)

Post by Benj »

Hi Sdaik,

Sorry yes the Network comms component isn't quite working with the W5500 yet. Better to use Leigh's example for now as that is known to work well.

I replied to the wrong topic :oops:

Currently trying to get the Network comms working with the W5500 so hopefully in the near future this will work ok.

User avatar
celebriums
Posts: 125
Joined: Sun Sep 25, 2016 3:50 pm
Has thanked: 71 times
Been thanked: 33 times
Contact:

Re: TCP IP Examples (W5500)

Post by celebriums »

Dear Ben
Thank you for the quick reply.
Sometimes such errors can happen, it's not a problem.

The W5500 works well with the WEB Server component. Leigh's example is seamless.

A temporary period; The TCP IP W5500 component does not work alone.
Did I get right?

Because I am currently doing software for the TCP IP W5500 component. I need to know that.
Sincerely Regards
Sadık SUME

www.kaandesign.com.tr

User avatar
celebriums
Posts: 125
Joined: Sun Sep 25, 2016 3:50 pm
Has thanked: 71 times
Been thanked: 33 times
Contact:

Re: TCP IP Examples (W5500)

Post by celebriums »

Dear Ben
Thank you for the quick reply.
Sometimes such errors can happen, it's not a problem.

The W5500 works well with the WEB Server component. Leigh's example is perfect.

A temporary period; The TCP IP W5500 component does not work alone.
Did I get right?

Because I am currently doing software for the TCP IP W5500 component. I need to know that.
Sincerely Regards
Sadık SUME

www.kaandesign.com.tr

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: TCP IP Examples (W5500)

Post by LeighM »

The TCP IP W5500 component will work alone, you can use this component directly from your program

User avatar
celebriums
Posts: 125
Joined: Sun Sep 25, 2016 3:50 pm
Has thanked: 71 times
Been thanked: 33 times
Contact:

Re: TCP IP Examples (W5500) AUTO IP

Post by celebriums »

Dear Ben, Leigh and Matrixmultimedia Family
Warm greetings from Istanbul Turkey

https://www.matrixtsl.com/wiki/index.ph ... etworking)

Thank you very much for your example NetworkComms W5500 Client.fcfx.
I organized this program for myself. I ran the code. I have successfully run code.
I can move on to the next stage.

Help Request:
The W5500 should be able to receive IP automatically from the Modem.
Can you help me figure out how to do this? I will continue to work on this.


Error 1
https://www.matrixtsl.com/wiki/index.ph ... etworking)
On the Flowcode Wiki, it says ESP8266 instead of W5500.
There's a typo.

My Sample Software is attached.
W5500_20191010.fcfx
(76.11 KiB) Downloaded 204 times
Sincerely Regards
Sadık SUME

www.kaandesign.com.tr

Post Reply