Hello all!!!,
I am having a rather peculiar problem i use a pic24fj254ga106 with wiz5500.
Well i initialize the wiz i create the udp socket and i set destination....then loop and txstart...sent string...txend...
Then rxcheck for available data if >0 receive string and flush rx...
(It would be much easier to upload the code but i am not currently in the office.)
So i receive a hello message on my pc ok and i have a button on my pc app when i press it sents ok to the pic and it enables an Led by compare string.
So far so good...so after 1-2 minutes of operation the pic transmits normally but stops receiveing until i reset the mclr?????
Any ideas???i think the rx port closes but how to restart it???
UDP receive timeout
Moderator: Benj
-
- Posts: 128
- Joined: Thu Jul 27, 2017 5:23 am
- Has thanked: 8 times
- Been thanked: 8 times
- Contact:
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: UDP receive timeout
Hi,
You could try a call to GetSocketStatus()
This will return the Sn_SR register (see W5500 datasheet page 50)
For example, 0x22 indicates that the socket is opened in UDP mode,
0x00 indicates that the socket has closed,
in which case you would need to re-open it.
You could try a call to GetSocketStatus()
This will return the Sn_SR register (see W5500 datasheet page 50)
For example, 0x22 indicates that the socket is opened in UDP mode,
0x00 indicates that the socket has closed,
in which case you would need to re-open it.
-
- Posts: 128
- Joined: Thu Jul 27, 2017 5:23 am
- Has thanked: 8 times
- Been thanked: 8 times
- Contact:
Re: UDP receive timeout
Hello Leigh,
and thank you for your support!
I read the datasheet and i get your point!!!
Only one stupid question....How do I open again the UDP socket??? only create I can see...
And last question? what is the purpose of the communication channels 0-3....??
I tried to find some info but I couldn't
Thanks again for your assistance!!
and thank you for your support!
I read the datasheet and i get your point!!!
Only one stupid question....How do I open again the UDP socket??? only create I can see...
And last question? what is the purpose of the communication channels 0-3....??
I tried to find some info but I couldn't
Thanks again for your assistance!!
- Attachments
-
- MASTER MODULE.fcfx
- (22.55 KiB) Downloaded 145 times
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: UDP receive timeout
Hi,
Yes, create does the open.
The W5500 supports more than one "channel",
so for example you can open another UDP port to another host simultaneously,
just keep track of which channel (e.g. 0 and 1) you are using for which host,
pass the appropriate channel number to the read and write functions
Yes, create does the open.
The W5500 supports more than one "channel",
so for example you can open another UDP port to another host simultaneously,
just keep track of which channel (e.g. 0 and 1) you are using for which host,
pass the appropriate channel number to the read and write functions
-
- Posts: 128
- Joined: Thu Jul 27, 2017 5:23 am
- Has thanked: 8 times
- Been thanked: 8 times
- Contact:
Re: UDP receive timeout
Well i tried your suggestion and the socket is still open when the receiving stops....I connected a uart and a terminal and i keep getting "" which is 0x22 which indicates port is still open
It transmits but stops receiving
Why all the weird staff happens to me!!!!
It transmits but stops receiving
Why all the weird staff happens to me!!!!
-
- Posts: 128
- Joined: Thu Jul 27, 2017 5:23 am
- Has thanked: 8 times
- Been thanked: 8 times
- Contact:
Re: UDP receive timeout
Ok fixed!!!!!!it took me a while but i found it with your help!!!thanks a lot!!!!
I just switched to another port and disabled the firewall from the ap
I just switched to another port and disabled the firewall from the ap