Skip to content

Synch Fork #1

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

Merged
merged 28 commits into from
May 16, 2020
Merged
Changes from 2 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e7f173a
Merge pull request #110 from pycom/rc6
peter-pycom Feb 28, 2020
1a12aed
Update pyexec.c
Xykon Mar 2, 2020
e4be1c6
Merge pull request #111 from pycom/forum_topic_5740
Xykon Mar 2, 2020
f92bba0
LTE: add debug flag
peter-pycom Mar 16, 2020
69ac2af
Merge pull request #112 from pycom/lte_debug
peter-pycom Mar 17, 2020
ff53818
Update get_idf_libs.py
Xykon Mar 17, 2020
20cc45c
Merge pull request #113 from pycom/secure_boot_fix_sdkconfig_copy
Xykon Mar 17, 2020
454c76a
add strlen_const() and sprint_binary_u8()
peter-pycom Mar 20, 2020
85007f9
LTE: add PSM Power Saving Mode
peter-pycom Mar 20, 2020
82c17cb
LTE: init() more expressive exceptions
peter-pycom Mar 20, 2020
d85d1f2
LTE: allow lte_debug to be toggled
peter-pycom Mar 20, 2020
0cdc8e8
LTE: psm not possible inppp
peter-pycom Mar 20, 2020
684d948
Merge pull request #114 from pycom/lte_psm_three
peter-pycom Mar 25, 2020
92ffa59
LTE debug: print milliseconds spent
peter-pycom Mar 26, 2020
3764541
lte_disconnect(): give ATH time to complete
peter-pycom Mar 26, 2020
89b5292
lte_disconnect(): wait less
peter-pycom Mar 26, 2020
5b5b0d9
check IDF git hash
peter-pycom Apr 6, 2020
36d934d
make: improve instructions for IDF_HASH mismatch
peter-pycom Apr 8, 2020
0d6c8bb
Merge pull request #117 from pycom/idf_ver_check
peter-pycom Apr 8, 2020
435d6f2
Merge pull request #116 from pycom/lte_misc
peter-pycom Apr 22, 2020
6621135
[pybytes] updated to v1.4.0 (pymesh integration and coap client)
May 4, 2020
9283f1d
Update version number to 1.20.2.rc7
peter-pycom May 4, 2020
f928e5f
Merge pull request #120 from pycom/pyb_1.4.0
peter-pycom May 4, 2020
64cdc1a
Merge pull request #121 from pycom/v1.20.2.rc7
peter-pycom May 4, 2020
325f89c
Merge pull request #122 from pycom/Dev
peter-pycom May 4, 2020
c4948da
Merge pull request #441 from pycom/release_rc7_again
Xykon May 4, 2020
766b304
Update _pybytes.py
Xykon May 4, 2020
6d01270
Merge pull request #442 from pycom/release_hotfix_for_PR441
Xykon May 4, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions esp32/mods/modlte.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ uart_config_t lte_uart_config0;
uart_config_t lte_uart_config1;

static bool lte_legacyattach_flag = true;
static bool lte_debug = false;

static bool lte_ue_is_out_of_coverage = false;

Expand Down Expand Up @@ -175,13 +176,16 @@ static void lte_callback_handler(void* arg)
static bool lte_push_at_command_ext(char *cmd_str, uint32_t timeout, const char *expected_rsp, size_t len) {
lte_task_cmd_data_t cmd = { .timeout = timeout, .dataLen = len};
memcpy(cmd.data, cmd_str, len);
//printf("[CMD] %s\n", cmd_str);
if (lte_debug)
printf("[AT] %s\n", cmd_str);
lteppp_send_at_command(&cmd, &modlte_rsp);
if ((expected_rsp == NULL) || (strstr(modlte_rsp.data, expected_rsp) != NULL)) {
//printf("[OK] %s\n", modlte_rsp.data);
if (lte_debug)
printf("[AT-OK] %s\n", modlte_rsp.data);
return true;
}
//printf("[FAIL] %s\n", modlte_rsp.data);
if (lte_debug)
printf("[AT-FAIL] %s\n", modlte_rsp.data);
return false;
}

Expand Down Expand Up @@ -494,7 +498,8 @@ static const mp_arg_t lte_init_args[] = {
{ MP_QSTR_id, MP_ARG_INT, {.u_int = 0} },
{ MP_QSTR_carrier, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} },
{ MP_QSTR_cid, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 1} },
{ MP_QSTR_legacyattach, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = true} }
{ MP_QSTR_legacyattach, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = true} },
{ MP_QSTR_debug, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = false} },
};

static mp_obj_t lte_make_new(const mp_obj_type_t *type, mp_uint_t n_args, mp_uint_t n_kw, const mp_obj_t *all_args) {
Expand All @@ -504,6 +509,8 @@ static mp_obj_t lte_make_new(const mp_obj_type_t *type, mp_uint_t n_args, mp_uin
// parse args
mp_arg_val_t args[MP_ARRAY_SIZE(lte_init_args)];
mp_arg_parse_all(n_args, all_args, &kw_args, MP_ARRAY_SIZE(args), lte_init_args, args);
if (args[4].u_bool)
lte_debug = true;

// setup the object
lte_obj_t *self = &lte_obj;
Expand All @@ -524,6 +531,8 @@ STATIC mp_obj_t lte_init(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t *k
// parse args
mp_arg_val_t args[MP_ARRAY_SIZE(lte_init_args) - 1];
mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(args), &lte_init_args[1], args);
if (args[3].u_bool)
lte_debug = true;
return lte_init_helper(pos_args[0], args);
}
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(lte_init_obj, 1, lte_init);
Expand Down