8000 [Bug Fix]: v1.18.2.r1 · pycom/pycom-micropython-sigfox@d6b3616 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Commit d6b3616

Browse files
author
iwahdan88
committed
[Bug Fix]: v1.18.2.r1
Fix for wrong Kw arguments acquisition in LTE.attach and LTE()
1 parent 07a52e4 commit d6b3616

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

esp32/mods/modlte.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ static mp_obj_t lte_init_helper(lte_obj_t *self, const mp_arg_val_t *args) {
387387
}
388388

389389
// set legacy flag
390-
lte_legacyattach_flag = args[1].u_bool;
390+
lte_legacyattach_flag = args[2].u_bool;
391391

392392
// configure the carrier
393393
lte_push_at_command("AT+SQNCTM?", LTE_RX_TIMEOUT_MAX_MS);
@@ -565,8 +565,8 @@ STATIC mp_obj_t lte_attach(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t
565565
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
566566
mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
567567

568-
if (args[3].u_obj != mp_const_none) {
569-
lte_legacyattach_flag = mp_obj_is_true(args[3].u_obj);
568+
if (args[5].u_obj != mp_const_none) {
569+
lte_legacyattach_flag = mp_obj_is_true(args[5].u_obj);
570570
}
571571

572572
lte_check_attached(lte_legacyattach_flag);
@@ -648,6 +648,10 @@ STATIC mp_obj_t lte_attach(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t
648648
if (!lte_push_at_command("AT+CFUN=1", LTE_RX_TIMEOUT_MAX_MS)) {
649649
nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, mpexception_os_operation_failed));
650650
}
651+
else
652+
{
653+
lte_push_at_command("AT!=\"setlpm airplane=1 enable=1\"", LTE_RX_TIMEOUT_MAX_MS);
654+
}
651655
}
652656
return mp_const_none;
653657
}

esp32/pycom_version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#ifndef VERSION_H_
1111
#define VERSION_H_
1212

13-
#define SW_VERSION_NUMBER "1.18.2"
13+
#define SW_VERSION_NUMBER "1.18.2.r1"
1414

1515
#define LORAWAN_VERSION_NUMBER "1.0.2"
1616

0 commit comments

Comments
 (0)
0