-
Notifications
You must be signed in to change notification settings - Fork 3k
PDP Type needs to be IPV4V6 #12396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PDP Type needs to be IPV4V6 #12396
Conversation
1.Testing with Verizon and AT&T SIMs, PDP type is automatically set to IPV4V6. 2. Testing with AT&T IoT SIM, PDP type automatically sets to IP. It will connect but not communicate. Setting a subsequent APN to IPV4V6 with the same APN communicates.
@felser, thank you for your changes. |
@@ -32,9 +32,9 @@ static const intptr_t cellular_properties[AT_CellularDevice::PROPERTY_MAX] = { | |||
1, // AT_CSMP | |||
1, // AT_CMGF | |||
1, // AT_CSDH | |||
1, // PROPERTY_IPV4_STACK | |||
0, // PROPERTY_IPV4_STACK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably define all IPV4, IPV6 and IPV4V6 to 1, or AT_CellularContext::get_context()
fails to find IPV4/IPV6 only contexts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enabling IPV4 results in failed communication with AT&T IoT SIMs. The ublox radio automatically populates context 1 with IP as the PDP type and doesn't allow the user to change it to IPV4V6. If mbed detects a PDP type of IPV4, it sets the LWIP stack to IPV4 which fails to communicate. However if the LWIP stack is set/forced to IPV4V6 communication is successful. With the change I made, mbed sets context 2 with the same APN as context 1 but PDP type as IPV4V6. Though probably not ideal, it works with all the SIM cards we have. I plan to put a note on our mbed page describing where and why users might need to change this setting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@felser Do you mean that the initial context PDP type is IP, but it has actually just IPV6 address? Can you have traces with cellular.debug-at: true
?
It seems your modem allows multiple contexts with the same APN name, but that's not a generic case. It could be better to force the initial context to IPV4V6? For that, you need to disable initial context activation (e.g. AT+CIPCA could work if you are not in LTE), or detach from the network, delete the one modem created and create a new PDP with IPV4V6 before attaching again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is an example of what it returns from AT+CGDCONT?...
+CGDCONT: 1,”IP”,”m2m.com.attz”,”10.254.68.252”,0,0,0,0
I was unable to find a way to force context 1 to be IPV4V6. Every time I change it then register it goes back to IP. I don't see the command AT+CIPCA or any other command in the ublox manual to disable initial context activation. I'm not sure I'd want to use that if I could given that this change appears to work without complication.
The radio (kind of) allows multiple contexts with the same APN. According to ublox, after I sent them debug capture with their debug tool, the call on CID 2 is actually routed to CID 1. So all this change is really doing is telling mbed to use IPV4V6 stack.
Our code is specific to this ublox radio. We have no other radio on this platform. This change is working well for all SIMs I have tested.
FYI, I can connect and send data on context 1 using the radio stack or Windows dial up networking but mbed-os does not work. At one point I edited the AT_CellularContext code to force IPV4V6 to the nsapi_ppp_connect(...) call. That works on context 1.
CI started |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Moved to needs: review to finalize the reivew |
@ARMmbed/team-ublox please comment |
First apologies, some more information is required
|
This is the SARA-R410-02B. If I recall correctly, setting +UMNOPROF to AT&T or letting it auto select didn't matter. |
|
With +UMNOPROF=0, the context still changes. Even worse, if I set +UMNOPROF=2, it locks up the radio serial port! The second problem is something we are working on with Steve Brown at ublox. Please see the attached. Note: I had previously been using and AT&T SIM that provide a context populated as IPV4V6 and APN = phone. |
UPDATE: When changing +UMNOPROF from 0 to 2, PSM mode gets enabled. That's what appeared to cause the serial port lock up. However, once set to 2 with PSM disabled, the PDP type is still over written. So with +UMNOPROF 0 or 2, the PDP type changes from IPV4V6 to IP with my IoT SIM installed. |
|
CI restarted |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
1.Testing with Verizon and AT&T SIMs, PDP type is automatically set to IPV4V6.
2. Testing with AT&T IoT SIM, PDP type automatically sets to IP. It will connect
but not communicate. Setting a subsequent APN to IPV4V6 with the same APN communicates.
Summary of changes
Enable stack/PDP type IPV4V6 and not IPV4 for this platform. Verizon and AT&T LTE SIM cards automatically set the PDP type to IPV4V6. AT&T IoT SIM cards automatically set PDP type to IPV4 but mbed-os is not able to communicate with that setting passed to LWIP. With only IPV4V6 enabled, mbed-os will configure the next available context with IPV4V6 in the PDP type and set the APN included in the json file. This allows for successful communication.
Impact of changes
Migration actions required
Documentation
None
Pull request type
Test results
Reviewers