PPP AND ETHERNET

I’m trying to use PPP and Ethernet in the same program.
Anybody has any advice to make PPP and
Ethernet work together ???

I did a little bit of work on this a while back and will be returning to it soon but there are a few gotchas:

Amongst other things, I think that the Ethernet interface can only use fixed IP addressing and not DHCP when PPP is being used.

I think I also had to change net.lib (in 10.66) as follows:

      // Test if interface uses ethernet NIC (we don't count PPPoE, even though it uses ethernet)

// PMCS #define IF_USES_ETH(i) ((word)(i) < USING_WIFI)
#define IF_USES_ETH(i) ((word)(i) < USING_ETHERNET)

as the way the test was done was not correct but I can’t remember exactly what was wrong.

I’m using Dynamic C 10.72 and RCM6700
I use static IP for Ethernet PPP need the modem generates the IP.
What I can do?

If I recall correctly I think the same change to net.lib is required in 10.72 as USING_WIFI is 0 if not using a WIFI interface so the test always fails.
Also the value of USES_PPP depends on the serial port used.
When opening TCP or UDP sockets you may need to reference the interface to use and not just IF_ANY.

I probably should have taken some notes at the time as my understanding of it is a bit hazy and will need refreshing soon :slight_smile: