Ethernet module

For general Flowcode discussion that does not belong in the other sections.
RGV250
Posts: 333
http://meble-kuchenne.info.pl
Joined: Sat Mar 19, 2022 4:53 pm
Has thanked: 32 times
Been thanked: 33 times

Ethernet module

Post by RGV250 »

Hi,
I have tried to modify code which used an Arduino and TCP_IP_W5500 module for a Raspberry Pi. It appeared to get so far IE Initialise and open a socket but did not seem to get a response. After a lot of head scratching I realised it is probably down to the W5500 module. I added the TCP_IP_Pi component and have then drawn a blank. The functions available are totally different, I figure it should be possible but wondered if anyone had any ideas why there are so many functions missing.

The TCP_IP_ENC28J60, TCP_IP_WIZ3100 & TCP_IP_WIZ810MJ1 all seem to have similar functions so why not the RaspberryPi one?

Regards,
Bob

RGV250
Posts: 333
Joined: Sat Mar 19, 2022 4:53 pm
Has thanked: 32 times
Been thanked: 33 times

Re: Ethernet module

Post by RGV250 »

Hi,
My poor little brain cell is really getting fried, I looked at the help for the TCP_IP_Pi component and it did not have a lot of functions. I downloaded the example and was really stunned as it had all the same functions as the W5500. The only issue is that this has TCP_Base in the project explorer. Where is this component as I cannot find it anywhere.

Regards,
Bob

chipfryer27
Valued Contributor
Posts: 1676
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 372 times
Been thanked: 581 times

Re: Ethernet module

Post by chipfryer27 »

Hi Bob

Not really sure what you mean.

Personally I have only used WiFi on the RPi and haven't really used any LAN since the 8266's came along, as I found them to be an exceptionally cheap way to give a PIC or whatever internet capabilities. Thankfully espressif haven't "improved" (ahem) them in many years so they continue to work :)

I seem to have gathered enough Pi's to open my own bakery (for half-baked ideas) so hopefully I can try and assist.

Regards

RGV250
Posts: 333
Joined: Sat Mar 19, 2022 4:53 pm
Has thanked: 32 times
Been thanked: 33 times

Re: Ethernet module

Post by RGV250 »

Hi,
It was late so probably not that well explained, I will try to do better now the brain cell is awake :-)

This is the program I am trying to convert to the Pi, it was written for Arduino and uses W5500 ethernet.
ARP_01.fcfx
(49.67 KiB) Downloaded 41 times
This is some of the functions for the W5500
W5500.JPG
W5500.JPG (42.13 KiB) Viewed 863 times
This is what the TCP_IP_Pi has
Pi.JPG
Pi.JPG (21.77 KiB) Viewed 863 times
I cannot add any more files / screenshots so need to continue with another post

RGV250
Posts: 333
Joined: Sat Mar 19, 2022 4:53 pm
Has thanked: 32 times
Been thanked: 33 times

Re: Ethernet module

Post by RGV250 »

Continued
And this is what is in this example for the TCP_IP_Pi file
FC_Comp_Source_TCPIP_RPI.fcfx
(32.39 KiB) Downloaded 30 times
Base.JPG
Base.JPG (41.25 KiB) Viewed 862 times
From what I can see this has all the functions to W5500 has, I could not find this component anywhere.

Hope that explains it a bit better.

Regards,
Bob

RGV250
Posts: 333
Joined: Sat Mar 19, 2022 4:53 pm
Has thanked: 32 times
Been thanked: 33 times

Re: Ethernet module

Post by RGV250 »

Hi,
I did consider using an ESP32 but prefer wired in my house, WiFi not always good.
I have just looked at an old program for one of those and that does not have the same network functions as the W5500 either so would be in the same position.

Bob

RGV250
Posts: 333
Joined: Sat Mar 19, 2022 4:53 pm
Has thanked: 32 times
Been thanked: 33 times

Re: Ethernet module

Post by RGV250 »

Hi,
I looked at the help for TCP_Base and it appears that is for simulation only no no use anyway.

Bob

chipfryer27
Valued Contributor
Posts: 1676
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 372 times
Been thanked: 581 times

Re: Ethernet module

Post by chipfryer27 »

Hi Bob

Just guessing here that as the RPi has an on board LAN, then the FC component may be using inherent code that isn't exposed, whereas for the LAN component it is needed.

Of course that could be entirely wrong.. :)

Regards

RGV250
Posts: 333
Joined: Sat Mar 19, 2022 4:53 pm
Has thanked: 32 times
Been thanked: 33 times

Re: Ethernet module

Post by RGV250 »

Hi,
I think you are right, the thing I need to figure out is how to use the Pi functions to do the same or I will need a total rewrite which is probably beyond me.
For example, W5500 has CreateMACSocket, CreateTCPSocket & CreateUDPSocket. The TCP_Pi only has SocketOpen and parameters for either UDP or TCP. Nothing for MAC so that does not seem possible.
Then there is SendMyIP & SendMyMAC, I an not sure if I can get away with Send and then the 4 bytes.
Way too many problems I think, not enough drinking time to figure it all out.

Regards,
Bob

LeighM
Valued Contributor
Posts: 486
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 83 times
Been thanked: 260 times

Re: Ethernet module

Post by LeighM »

Yes, you are correct :D the Raspberry Pi TCP component interfaces with the (Linux) operating system API,
which is not the same as the drivers for the likes of the W5500 which expose the lower level code to the user.

Post Reply