Hello TI Team,
If a CC3220SF connects to a server (via the router), is the port number used by the router (access point) to the server is known by the device ?
If yes, which simplelink api must be used ?
Thank you,
Cheers,
Sneha
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello TI Team,
If a CC3220SF connects to a server (via the router), is the port number used by the router (access point) to the server is known by the device ?
If yes, which simplelink api must be used ?
Thank you,
Cheers,
Sneha
Hi Sneha,
CC32xx know only source port (own port) and destination port (port of server). If router (NAT) do some kind of port translation, CC32xx is not able determine this.
I am not sure, if I answered your question. Because your question does not technically make much sense. What is a port number used by router? Router does not use any port. Router is just a device between two subnets, which forwards packets according router tables.
Jan
Hi Jan,
Just to make my question clear
When I create a socket using sl_Socket(), I get a value between 0 and 15 on the cc32xx device.
However on the server, I see the device connecting with port 1234 or 53456 etc.
Where does this come from ?
Thanks!
Hi Sneha,
What is returning sl_Socket() is a just a socket descriptor. Identification of socket inside NWP. This descriptor have nothing to do with TCP port.
What you see at server side is a source port which is assigned by CC3220. Generally is this port incremented or randomly generated for each TCP connection. This behaviour have nothing to do with CC32xx. It is common for almost all network devices round the world.This allow to router better manage router tables (determine between connections). But at some cases it may to be needed translate source port at router (NAT) more here.
Jan