ENC28J60 SMTP

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
cruzxia
Posts: 88
Joined: Wed Jan 04, 2006 7:34 am
Been thanked: 8 times
Contact:

ENC28J60 SMTP

Post by cruzxia »

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

User avatar
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

Post by Benj »

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.
TCPIP_ENC28J60.fcpx
(13.04 KiB) Downloaded 263 times

cruzxia
Posts: 88
Joined: Wed Jan 04, 2006 7:34 am
Been thanked: 8 times
Contact:

Re: ENC28J60 SMTP

Post by cruzxia »

Hi Ben

I have setup the new component, That is exactly what I needed, Thanks. :D
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.

User avatar
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

Post by Benj »

Hello,

I might have missed something. Here is another version you can try.
Attachments
TCPIP_ENC28J60.fcpx
(13.14 KiB) Downloaded 220 times

cruzxia
Posts: 88
Joined: Wed Jan 04, 2006 7:34 am
Been thanked: 8 times
Contact:

Re: ENC28J60 SMTP

Post by cruzxia »

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

Post Reply