I'm working with an OpenWRT-based 4G router that has one EC200A modem and two SIM cards. The SIM cards can be selected using GPIO. Until now, I've been using a simple DHCP client with some mbwan script provided by the router vendor for SIM connectivity, but the connection has been unstable.
I decided to switch to using the 3G protocol, which works well except when using a Jio SIM (an Indian service provider that only supports IPv6 and 464xlat). With Jio, the 3G protocol using an IPv4 PDP context doesn't work, but it does with an IPv6 PDP context, and I can get IPv4 connectivity with 464xlat.
The problem is that I have an active-passive SIM setup. One slot has a Jio SIM, and the other has a non-Jio SIM, or both might have Jio SIMs. I need to determine which configuration to use (IPv4 PDP context or IPv6 PDP context with 464xlat) based on the SIM in use. I thought I could use the IMSI number to determine if the SIM is Jio or non-Jio and make the decision based on that, but Jio complicates things. For postpaid users, there's no support for 464xlat as they get direct IPv4, whereas prepaid users only support 464xlat.
Can you help me figure out what to check and what logic to use for this?
It appears you are using firmware that is not from the official OpenWrt project.
When using forks/offshoots/vendor-specific builds that are "based on OpenWrt", there may be many differences compared to the official versions (hosted by OpenWrt.org). Some of these customizations may fundamentally change the way that OpenWrt works. You might need help from people with specific/specialized knowledge about the firmware you are using, so it is possible that advice you get here may not be useful.
Ask for help from the maintainer(s) or user community of the specific firmware that you are using.
Provide the source code for the firmware so that users on this forum can understand how your firmware works (OpenWrt forum users are volunteers, so somebody might look at the code if they have time and are interested in your issue).
If you believe that this specific issue is common to generic/official OpenWrt and/or the maintainers of your build have indicated as such, please feel free to clarify.
@brada4
I'm the one who is maintaining this version of openwrt.
It's generic version.
I'm having issue with the logic where I need to switch from ipv4 PDP context to ipv6 PDP context with 464xlat.
For now I have added an option to define which context to use but i don't want to do this manually.
If I'm sending a device on site, I don't want to log into the router and define which context I want to use.
It need to be automated.