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.

Basic WiFi Application, choosing UDP ports

Hi, 

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!

Thanks. 

  • Hi Chandrashekar, 

    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.

    BR,

    Pedro 

  • Hi Pedro, 

    Thank you for the answer.