mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #12227 from AnttiKauppila/BG96_fix
Cellular: AT + QICSGP set up APN fixpull/12245/head
commit
c53f4d2344
|
@ -69,11 +69,21 @@ 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) {
|
||||
type = 1;
|
||||
}
|
||||
|
||||
if (_pwd && _uname) {
|
||||
if (_at.at_cmd_discard("+QICSGP", "=", "%d%d%s%s%s%d", _cid, 1,
|
||||
if (_at.at_cmd_discard("+QICSGP", "=", "%d%d%s%s%s%d", _cid, type,
|
||||
_apn, _uname, _pwd, _authentication_type) != NSAPI_ERROR_OK) {
|
||||
return NSAPI_ERROR_AUTH_FAILURE;
|
||||
}
|
||||
} else {
|
||||
if (_at.at_cmd_discard("+QICSGP", "=", "%d%d%s", _cid, type,
|
||||
_apn) != NSAPI_ERROR_OK) {
|
||||
return NSAPI_ERROR_AUTH_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
return NSAPI_ERROR_OK;
|
||||
|
|
Loading…
Reference in New Issue