Hi
When sending SMTP Email, I need to use a random port number.
The issue I have is that Port 80 is hard coded into the ENC28J60 component in several places.
This causes component too reply with the incorrect port (80) number, causing a TCP failure
Is it possible amend the ENC28J60 to add a parameter for the port number on the macros that use the hard coded port 80?
The user can then just define the port number prior to using the relevant macro.
Port = Random;
or
Port = 80;
Cruzxia
ENC28J60 SMTP
Moderator: Benj
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: ENC28J60 SMTP
Hello,
Ok I have removed the hard coded port property and added the port as a parameter to the macros.
Let me know how you get on.
Ok I have removed the hard coded port property and added the port as a parameter to the macros.
Let me know how you get on.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: ENC28J60 SMTP
Hi Ben
I have setup the new component, That is exactly what I needed, Thanks.
There is a bug though.
If the port value exceeds 255, then I cant get passed "CheckForTCPPort"
Can you please check and see why it wont accept an uint above 255 for the port value.
I have setup the new component, That is exactly what I needed, Thanks.

There is a bug though.
If the port value exceeds 255, then I cant get passed "CheckForTCPPort"
Can you please check and see why it wont accept an uint above 255 for the port value.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: ENC28J60 SMTP
Hello,
I might have missed something. Here is another version you can try.
I might have missed something. Here is another version you can try.
- Attachments
-
- TCPIP_ENC28J60.fcpx
- (13.14 KiB) Downloaded 237 times
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: ENC28J60 SMTP
There is something strange with this, the latest version also did not work correctly.
I wrote some C code as a work around, It works with greater than 255, but it wont work with a value of 80.
Where the Enc28J60 is just the opposite. I will try to find a solution and get back to you.
Cruzxia
I wrote some C code as a work around, It works with greater than 255, but it wont work with a value of 80.
Where the Enc28J60 is just the opposite. I will try to find a solution and get back to you.
Cruzxia