Good day,One of my programmers has pointed the following out to me.Hi Leo,
See below for the bug in the TCPClose function. The problem is the two highlighted instances where 0x401 is used instead of the local variable FCL_CR = 0x401 + (0x100 * FCL_CHANNEL). The result is that socket 0 is always closed, instead of the intended socket.
Regards,
Michael
/*=----------------------------------------------------------------------=*\
Use :When an established TCP connection has finished transmission of data, either the local application (i.e. your code) or the remote application (i.e. the application at the other end of the connection) can initiate closure of the socket.
:
:Parameters for macro TCPClose:
: Channel : Specifies the communications channel 0-3
\*=----------------------------------------------------------------------=*/
void FCD_01351_TCP_IP_WIZ810MJ1__TCPClose(MX_UINT8 FCL_CHANNEL)
{
//Local variable definitions
MX_UINT8 FCL_IS_EQUAL = (0x0);
MX_UINT8 FCL_TIMEOUT = (0x64);
MX_UINT16 FCL_IR;
MX_UINT16 FCL_CR;
MX_UINT8 FCL_TEMP;
FCL_CR = 0x401 + (0x100 * FCL_CHANNEL);
FCL_IR = FCL_CR + 1;
while (FCL_IS_EQUAL == 0)
{
FCL_TEMP = FCD_01351_TCP_IP_WIZ810MJ1__MAC_ReadByte(FCL_IR);
if (FCL_TEMP & 0x10)
{
FCL_IS_EQUAL = 1;
} else {
FCI_DELAYBYTE_MS(1);
FCL_TIMEOUT = FCL_TIMEOUT - 1;
if (FCL_TIMEOUT == 0)
{
FCL_IS_EQUAL = 1;
// } else {
}
}
}
if (FCL_TIMEOUT != 0)
{
FCD_01351_TCP_IP_WIZ810MJ1__MAC_WriteByte(0x401, 0x08);
FCL_IS_EQUAL = 1;
while (FCL_IS_EQUAL)
{
FCL_IS_EQUAL = FCD_01351_TCP_IP_WIZ810MJ1__MAC_ReadByte(FCL_CR);
}
FCD_01351_TCP_IP_WIZ810MJ1__MAC_WriteByte(0x401, 0x10);
FCL_IS_EQUAL = 1;
while (FCL_IS_EQUAL)
{
FCL_IS_EQUAL = FCD_01351_TCP_IP_WIZ810MJ1__MAC_ReadByte(FCL_CR);
}
// } else {
}
}Apologies, but I cannot get the CR to work.
WIZ810 Component bug
-
- Posts: 10
- http://meble-kuchenne.info.pl
- Joined: Wed Jan 19, 2022 11:20 am
- Has thanked: 1 time
- Been thanked: 1 time
Re: WIZ810 Component bug
Good day,
I posted the above a while ago, but it obviously didn't make sense to anybody, hence it being ignored. Below is the symptom that I experience.
I am experiencing a problem when using the WIZ810MJ component, as follows:
After passing data on two open sockets, e.g., socket 0 and socket 1, when closing the non-zero socket (i.e. socket 1, 2, or 3) , socket 0 always closes too, without being told/asked to close. This is experienced in FC7, FC8, and FC10.
It would be appreciated if someone could please comment as to whether this is an issue within the component itself, or whether the problem lies elsewhere.
Kind regards.
Leo
I posted the above a while ago, but it obviously didn't make sense to anybody, hence it being ignored. Below is the symptom that I experience.
I am experiencing a problem when using the WIZ810MJ component, as follows:
After passing data on two open sockets, e.g., socket 0 and socket 1, when closing the non-zero socket (i.e. socket 1, 2, or 3) , socket 0 always closes too, without being told/asked to close. This is experienced in FC7, FC8, and FC10.
It would be appreciated if someone could please comment as to whether this is an issue within the component itself, or whether the problem lies elsewhere.
Kind regards.
Leo
-
- Matrix Staff
- Posts: 1913
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 619 times
- Been thanked: 644 times
Re: WIZ810 Component bug
Hi Leo.
My apologies for the delay.
I have an updated component for you to try,
Browse to this location using file explorer , it's hidden by default so just paste the link into your address bar.
Place the attached component.
If Flowcode is already open, then you will need to reload your project for the new component to work
If you run any component updates, then the component you added will be overwritten, so it will stop working again (unless the component update has been pushed).
After testing, can you let me know how you get on.
My apologies for the delay.
I have an updated component for you to try,
Browse to this location using file explorer , it's hidden by default so just paste the link into your address bar.
Code: Select all
%ProgramData%\MatrixTSL\FlowcodeV10\Components
If Flowcode is already open, then you will need to reload your project for the new component to work
If you run any component updates, then the component you added will be overwritten, so it will stop working again (unless the component update has been pushed).
After testing, can you let me know how you get on.
- Attachments
-
- TCP_IP_EB023_00_2.fcpx
- (17.92 KiB) Downloaded 7 times
Martin
Re: WIZ810 Component bug
Hi Martin,
I did an update a day or so ago, and I think it included the TCP_IP_EB023_00_2.fcpx component, although I'm not 100% sure.
I am experiencing the same issues, with this new update version, as originally described. I went back to the version you posted on this thread, and it seems to resolve the problems, as per my post above.
Kind regards.
Leo
I did an update a day or so ago, and I think it included the TCP_IP_EB023_00_2.fcpx component, although I'm not 100% sure.
I am experiencing the same issues, with this new update version, as originally described. I went back to the version you posted on this thread, and it seems to resolve the problems, as per my post above.
Kind regards.
Leo
-
- Matrix Staff
- Posts: 1913
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 619 times
- Been thanked: 644 times
Re: WIZ810 Component bug
Hi Leo.
The fixed component should on the database next week , hopefully on Tuesday 22nd.
Until then, if you do an update, Flowcode will revert to the non working version.
The fixed component should on the database next week , hopefully on Tuesday 22nd.
Until then, if you do an update, Flowcode will revert to the non working version.
Martin