Skip to content
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

Added switch to skip CFUN=0 on INIT #24

Merged
merged 2 commits into from
Apr 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions mos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ config_schema:
- ["pppos.hexdump_enable", "b", false, {title: "Dump all the data sent over UART to stderr"}]
- ["pppos.last_oper", "s", "", {title: "This field is used to store last successfully connected operator"}]
- ["pppos.reg_cmd", "s", "CREG", {title: "AT command used for setting and checking network registration. CREG(default), CGREG, CEREG"}]
- ["pppos.cfun_cycle", "b", true, {title: "Set CFUN to 0, then to 1"}]

conds:
# ESP32 sets LwIP options via sdkconfig, for other platforms use cdefs directly.
Expand Down
4 changes: 3 additions & 1 deletion src/mgos_pppos.c
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,9 @@ static void mgos_pppos_dispatch_once(struct mgos_pppos_data *pd) {
add_cmd(pd, mgos_pppos_at_cb, 0, "AT");
add_cmd(pd, NULL, 0, "ATH");
add_cmd(pd, NULL, 0, "ATE0");
add_cmd(pd, NULL, 0, "AT+CFUN=0"); /* Offline */
if (mgos_sys_config_get_pppos_cfun_cycle()) {
add_cmd(pd, NULL, 0, "AT+CFUN=0"); /* Offline */
}
if (!pd->baud_ok) {
struct mgos_uart_config ucfg;
bool need_ifr = true, need_ifc = true;
Expand Down