---
title: "Assigning port no to ethernet module 812MJ's socket"
url: "https://maker.wiznet.io/forum/9697"
markdown_url: "https://maker.wiznet.io/forum/9697/md"
type: "Forum topic"
category: "IO Modules"
author: "prashantkumar"
created: "2013-11-22T11:59:24+09:00"
last_activity: "2024-06-01T09:17:16+09:00"
language: "en"
views: 915
replies: 5
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# Assigning port no to ethernet module 812MJ's socket

## Question

Asked by prashantkumar on 2013-11-22 in IO Modules.

Hello Sir ,
I wonder can socket be assigned any port no of our choice in 812MJ ethernet module ? I did this by assigning 502 to socket 0 but it failed to connect while if i am assigning socket 0 port no. as 80 i am able to connect , receive and send data .

## Replies

### Reply 1 by jbkim, 2013-11-24

Any port number can be assigned to the socket.
Do you use TCP server?
To debug this problem, you’d better use the Wireshark([url][http://www.wireshark.org/\[/url\]](http://www.wireshark.org/%5B/url%5D))) and see what happen when you connect to the board.

### Reply 2 by prashantkumar, 2013-11-26

Hello,
I am getting RST signal in the wireshark when i use 502 port . what does it mean ? why it is not giving SYN flag .

### Reply 3 by jbkim, 2013-11-26

RST means there is no socket having 502 port.
I think you need to check the port number is correct when you open the socket.

### Reply 4 by prashantkumar, 2013-11-27

Hi ,
I tested wheather my socket gets assigned with other port no or not . ! and i found that any port no greater than 255 doesn’t get connected while port no &lt;= 255 gets connected . I am using AX1 software from wiznets website , is there any limitation in this s/w or reason is something else ?

### Reply 5 by jbkim, 2013-11-28

AX1 support any port number (~65535).
As the port number is 2 byte and you need to define it as Integer(2 byte) in your code.

---

Source: https://maker.wiznet.io/forum/9697
