it is not quite clear to me which mode I should use. I want to have the w5200 with one entry point let’s say. To this, I want to be able to send and receive messages from different peers. Therefore, I believe I should use MACRAW so I can choose destination IP and port when I want to send and filter it (my self via software) from which IP and port the message comes from.
This is what I want to achieve:
As you can see, I would need more than 8 sockets to achieve having the w5200 receiving and sending messages to different applications from different peers. So, each peer will have a unique IP but can communicate to the w5200 through different ports to send, receive or send and receive. So, that is why there are multiple peers (=multiple ips) and multiple ports per IP. I can do this with the hardwired TCP/IP stack but I am limited to 8.
As it can be seen in the diagram, some applications can only send, others can only receive and some can send an receive.
Checking the documentation, I understood that this is what it is referred to “software TCP/IP stack”, but my problem to understand is that in MACRAW mode, I will have 6 bytes which refer to the mac.
- How can I know the IP and port where a message comes from or how to tell the w5200 to which IP address and port send the message to?
- There is a limitation of up to 1500 bytes. What if I need to send more than that? Would it be possible to send chunks of 1500 bytes but have on the receiving end like it was one send instead of multiple ones?
Thank you for the help.
EDIT: So the answer to question 1 is in the tcp header that I will receive by reading the raw data.
However, I opened the socket in MACRAW, tried to connect from a PC but the w5200 never answers. I want to send data over TCP/IP so I have a simple python code for this. I see on wireshark that only the packets going out of the PC to open the socket are present but there is no response from the w5200. Do I need to first have socket 1 to 7 in used before I can start with MACRAW?