TI E2E Community
Low Power RF & Wireless Connectivity
Basic WiFi Application, choosing UDP ports
Are there any preferred set of ports numbers to choose from while using the Send Data command via UDP. My knowledge in this regard is minimal, but it seems like there might be conflicts with choosing specific port numbers. If anyone can help with this, that'd be great!
Usually in a system that can handle multiple servers for different services (FTP, webserver, telnet, etc), you will need to be careful which port you will want to use since it may conflict with existing servers, that is why most operating system reserve ports for well known services, for example port 80 for web servers. This helps client application to always use the same port when attempting to use a service, for example ftp clients by default use port 20 to connect to an FTP server. It is wiser to stay away from the well known ports (http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers) so your server application does not inadvertently get requested to connect. For example if you select port 80 and someone types the IP address of the cc3000 in their web browser by mistake, the server app will receive the request and attempt to service it.
If in the other hand you are trying to implement a web server, then choosing port 80 is required to be compatible with the default port selected by web browsers.
Since in a cc3000 only one server will be available, the port selected will not ha cove any conflict with. Usually the range 49152–65535 is frequently used for custom ports.
Thank you for the answer.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.