TCP IP Examples (W5500)

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

Moderator: Benj

User avatar
celebriums
Posts: 107
Joined: Sun Sep 25, 2016 3:50 pm
Has thanked: 65 times
Been thanked: 30 times
Contact:

TCP IP Examples (W5500)

Postby celebriums » Wed Sep 04, 2019 7:56 pm

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.

User avatar
LeighM
Matrix Staff
Posts: 1942
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 467 times
Been thanked: 666 times
Contact:

Re: TCP IP Examples (W5500)

Postby LeighM » Fri Sep 06, 2019 3:00 pm

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.68 KiB) Downloaded 53 times
These users thanked the author LeighM for the post (total 2):
celebriums (Sat Sep 07, 2019 7:36 pm) • chipfryer27 (Wed Sep 18, 2019 11:57 am)
Rating: 10.53%
 

User avatar
celebriums
Posts: 107
Joined: Sun Sep 25, 2016 3:50 pm
Has thanked: 65 times
Been thanked: 30 times
Contact:

Re: TCP IP Examples (W5500)

Postby celebriums » Thu Sep 12, 2019 12:05 pm

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>

User avatar
LeighM
Matrix Staff
Posts: 1942
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 467 times
Been thanked: 666 times
Contact:

Re: TCP IP Examples (W5500)

Postby LeighM » Thu Sep 12, 2019 2:37 pm

In your flowchart use: SetOutValue(1, STRA)
In the HTML use %1 where you want to place the string
These users thanked the author LeighM for the post:
celebriums (Thu Sep 12, 2019 6:14 pm)
Rating: 5.26%
 

User avatar
celebriums
Posts: 107
Joined: Sun Sep 25, 2016 3:50 pm
Has thanked: 65 times
Been thanked: 30 times
Contact:

Re: TCP IP Examples (W5500)

Postby celebriums » Thu Sep 12, 2019 6:21 pm

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?

User avatar
LeighM
Matrix Staff
Posts: 1942
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 467 times
Been thanked: 666 times
Contact:

Re: TCP IP Examples (W5500)

Postby LeighM » Fri Sep 13, 2019 10:23 am

Yes
These users thanked the author LeighM for the post:
celebriums (Fri Sep 13, 2019 11:20 am)
Rating: 5.26%
 

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

Re: TCP IP Examples (W5500)

Postby Benj » Fri Sep 13, 2019 5:16 pm

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.03 KiB) Downloaded 40 times


I'll try and get back on this next week.

User avatar
celebriums
Posts: 107
Joined: Sun Sep 25, 2016 3:50 pm
Has thanked: 65 times
Been thanked: 30 times
Contact:

Re: TCP IP Examples (W5500)

Postby celebriums » Tue Sep 17, 2019 11:21 am

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.57 KiB) Downloaded 28 times

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

Re: TCP IP Examples (W5500)

Postby Benj » Tue Sep 17, 2019 5:23 pm

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.
These users thanked the author Benj for the post:
celebriums (Wed Sep 18, 2019 9:44 am)
Rating: 5.26%
 

User avatar
celebriums
Posts: 107
Joined: Sun Sep 25, 2016 3:50 pm
Has thanked: 65 times
Been thanked: 30 times
Contact:

Re: TCP IP Examples (W5500)

Postby celebriums » Wed Sep 18, 2019 9:59 am

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.

User avatar
celebriums
Posts: 107
Joined: Sun Sep 25, 2016 3:50 pm
Has thanked: 65 times
Been thanked: 30 times
Contact:

Re: TCP IP Examples (W5500)

Postby celebriums » Wed Sep 18, 2019 10:04 am

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.

User avatar
LeighM
Matrix Staff
Posts: 1942
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 467 times
Been thanked: 666 times
Contact:

Re: TCP IP Examples (W5500)

Postby LeighM » Wed Sep 18, 2019 12:34 pm

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

User avatar
celebriums
Posts: 107
Joined: Sun Sep 25, 2016 3:50 pm
Has thanked: 65 times
Been thanked: 30 times
Contact:

Re: TCP IP Examples (W5500) AUTO IP

Postby celebriums » Thu Oct 10, 2019 11:49 am

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

https://www.matrixtsl.com/wiki/index.php?title=Component:_TCPIP_(W5500)_(Comms:_Networking)

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.php?title=Component:_TCPIP_(W5500)_(Comms:_Networking)
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 28 times
These users thanked the author celebriums for the post:
Benj (Fri Oct 11, 2019 1:16 pm)
Rating: 5.26%