I am facing an “out of sync IP address” issue with EM7455 under Linux.
The interface IP address gets acquired by udhcpc. Most of the time the acquired IP address matches with the IP address shown in “Active PDP Context”.
But there were some instances of mismatch in uchcpc acquired IP address and the IP address shown in “Active PDP Context”.
This mismatch results in communication failure.
IP Address: 100.65.248.157 Subnet Mask: 255.255.255.252
Active PDP Context:
+CGCONTRDP: 1,5,VZWINTERNET,100.67.32.47,198.224.171.135,198.224.169.135
I have tried “AT!CUSTOM=“DHCPRELAYENABLE”,1”. I am not sure if this is the right solution.
This prepaid SIM does not have any static IP address assigned. By interpreting the Active PDP result it seems that the network operator assign a new IP address time to time. I want to maintain an instant sync of an IP address change. (exact match of Active PDP IP address to DHCP client acquired IP address)
udhcpc is always running. The problem gets resolved after few minutes or after the operator changes its IP address. I want to reduce this delay and somehow minimize the frequency of the IP address change.
Then you can’t use DHCP. The DHCP mapping is bound to be imperfect. The address your operator assigns has no guranteed lease time. It is valid as long as the session lasts, and is immediately invalidated when the session ends. You can’t model this with DHCP (at least not without a lot of additional stuff around the DHCP session). The modem has to give the DHCP client some fake, short, least time. But however short - there will be the sort of breakage you describe
So don’t use DHCP. Get the address from the connection manager, and reconfgure your IP interface whenever the session is (re-)established.