Not Connecting
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: Not Connecting
by Eugeny ·
You try to connect to HTTPS port (I assume it is 443), from port 80. It may be that
RE: RE: Not Connecting
by Lee Trueman ·
HTTPS is just a acronym i.e. HTTP (S)ERVER the port number is 80.
it works very intermittently, maybe once every 15 tries
RE: Not Connecting
by Eugeny ·
Use Wireshark (in the best case installed on the server being connected to) to see what is going on the network interface and what packets are travelling from and to the W5500 - when it succeeds and when it is not.
RE: Not Connecting
by Lee Trueman ·
Already using packetyzer on the server, got a filter in port 80.
The analsyer captures nothing below is my debug output from the software
Version 1.00 - xx-08-2017
Build time: Sep 5 2017 - 17:01:07
ch>
$ MAC - ADDR[54:10:EC:28:98:6C]
$ NET - Network Initalisation Valid
$ APP - Server(www.mbsdemo.co.uk)
$ NET - ADDR[192.168.1.51]
$ NET - SUBN[255.255.255.0]
$ NET - GATW[192.168.1.254]
$ NET - MAC[54:10:EC:28:98:6C]
$ NET - Network Link[UP]
$ APP - Link Setup[HARD]
$ APP - Link Mode[AUTO]
$ APP - Link Speed[10]
$ APP - Link Duplex[HALF]
$ APP - Web client socket(1)
$ APP - Web client connecting(1)
$ APP - Web client socket(1)
$ APP - Web client connecting(1)
$ APP - WatchDog timeout(1)
$ APP - Web client timeout(1)
$ APP - Web client socket(1)
$ APP - Web client connecting(1)
RE: Not Connecting
by Lee Trueman ·
Right ive got it working why it needs this maybe someone can explain.
when doing ret = socket(sn, Sn_MR_TCP, any_port++, 0x00);
the any port must change, and it seems it must be over 50000 ?
RE: Not Connecting
by Eugeny ·
It seems that server is on the same subnet as your W5500 device, it simplifies the troubleshooting.
Remove port 80 filtering, just leave W5500 IP address filtering so that you can see also broadcast packets generated by the W5500. Is there anything from W5500 on the network when it configures and tries to connect?
RE: Not Connecting
by Lee Trueman ·
as i’m using an rtos is there anything i need to call in the back ground timers etc … i noted that in DNS.c there is a call DNS_time_handler(void) ?
But saying this the dns always resolves the url.
The only issue is intermittent connect(sn, domain_addr, PORT_HTTP);
Sometimes it works ok and others it doesn’t. Heres my debug output
$ HTT - Web client socket(1)
$ HTT - DNS Server : 8.8.8.8
$ HTT - Resolve : www.mbsdemo.co.uk
$ HTT - Resolved to 217.160.231.5
$ HTT - Web client connecting(1)
$ HTT - Web client timeout(1)
$ HTT - Web client socket(1)
$ HTT - DNS Server : 8.8.8.8
$ HTT - Resolve : www.mbsdemo.co.uk
$ HTT - Resolved to 217.160.231.5
$ HTT - Web client connecting(1)
RE: RE: Not Connecting
by Eugeny ·
Did you perform Wireshark logging? What is in the log? Where’s the log? What it contains?
Next step would be dumping all the registers of the socket and seeing values they contain. Dig into the W5500 libraries and header files to find out the function name to read socket registers.
RE: Not Connecting
by Lee Trueman ·
It works, but the first connection attempt will always fail. After this it will connect and send data for ever more.
So its something like the first fail, resets something… and this then allows it to work ok.
RE: RE: Not Connecting
by Eugeny ·
You do not give much diagnostic information, and also give contradicting problem description information.
then
and then
So initially connect did not not work at all, then connecting problem becomes intermittent, and in your last message it is only first connect that fails.
How do you think it is possible to deal with your problem scientifically?