This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

PPP connection dinamically configured

With RL-TCPnet library my PPP situation is:
1) setting PPP Local IP address = 0.0.0.0 in Net_Config.c, I successfully establish a PPP connection with my isp using ppp_connect (i get a public PPP IP address): everything works fine.
2) with identical software, i change only the PPP Local IP address in Net_Config.c, setting it to 10.0.0.1.
Reloading the target, i can't establish the ppp connection with isp. Monitoring the PPP protocol with PPP_monitor utility (i send all frames between CPU and modem to the PC using 2 serial ports on my target), i see that, after a successfull PAP, the target sends a IPCP Configure Request with IP=10.0.0.1. At this point, the isp hangs up.
3) now i delete the ppp_connect and use ppp_listen. From my pc i phone to the target. Now the situation is the reverse: if i set PPP IP local address in Net_config.c at 10.0.0.1, PC can connect successfully to my target. But if i set 0.0.0.0, PC can't connect. Once again, the problem is in the IPCP handshake.
4) i need to configure dinamically my kind of connection: at target startup i must decide if call a ppp_connect or a ppp_listen. I have tried to change localm[NETIF_PPP].IpAdr variable before init_TcpNet, without success. It seems that the library uses only nlocalm structure, but i can't change it. Any help will be greatly appreciated.
Regards.

0