-
Notifications
You must be signed in to change notification settings - Fork 3k
BG96 CELLULAR : check context_type value #12340
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
Conversation
6c8abe5
to
5082eb0
Compare
@jeromecoutant, thank you for your changes. |
@@ -70,7 +70,7 @@ ControlPlane_netif *QUECTEL_BG96_CellularContext::get_cp_netif() | |||
nsapi_error_t QUECTEL_BG96_CellularContext::do_user_authentication() | |||
{ | |||
uint8_t type = (uint8_t)_pdp_type; | |||
if ((uint8_t)_pdp_type < 1) { | |||
if (((uint8_t)_pdp_type < 1) || ((uint8_t)_pdp_type > 2)) { |
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.
According to BG96_TCP/IP_AT_Commands_Manual_V1.1 context_type IPv4v6 (value 3) is also valid for +QICSGP
.
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.
This value 3 didn't work with my modem... Maybe this v1.1 needs some specific modem version ?
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.
Yes, BG96 firmware update could help?
@AriParkkila @jeromecoutant From the review above , is there anything that needs to be done or this is ready |
@0xc0170 This is not good to be merged. @jeromecoutant If you can't upgrade your BG96 firmware then you could try to override this function, as it seems that at least
|
Hi |
@jeromecoutant Can you share the AT traces about failing (and successful) connection? |
Mmm it seems that my patch reverts your #12227... |
@jeromecoutant We had to fix an issue arised and we did it according to Quectel's forum thread: This PR should not be merged because of above reason! |
Maybe we should use AT+QICSGP? instead of CGDCONT in get_context() ? |
Maybe delete_current_context() as well should be overwritten in BG96 ? |
ping |
@jeromecoutant It seems that QICSGP and CGDCONT make somewhat overlapping configuration, and CGDCONT may not be needed when configuring modem's TCP/IP stack. However, CGDCONT seems still to be the way to query a list of contexts (with APN). BG96 driver could clear QICSGP parameters at delete_current_context(), but I don't know if that has any change. Do see some problem how BG96 works with the current implementation? |
Yes, got some "pre-configured" context in my BG96 module with the expected APN and PDP-type 3. |
I didn't try "cellular.clear-on-connect" option yet |
@jeromecoutant If BG96 does not accept IPv4v6 for QICSGP, it's likely because of an old firmware. If you can't update BG96 firmware to accept IPv4v6, I guess you need to patch it just in your project. |
Summary of changes
From AT commands BG96 manual:
https://www.quectel.com/UploadImage/Downlad/Quectel_BG96_TCP(IP)_AT_Commands_Manual_V1.0.pdf
it seems that only 2 values are possible:
<context_type> Integer type. The protocol type.
1 IPV4
2 IPV6*
@AriParkkila
Impact of changes
Migration actions required
Documentation
Pull request type
Test results
Reviewers