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

switch off Modem an on again (IDFGH-10544) #317

Closed
3 tasks done
diplfranzhoepfinger opened this issue Jul 2, 2023 · 10 comments
Closed
3 tasks done

switch off Modem an on again (IDFGH-10544) #317

diplfranzhoepfinger opened this issue Jul 2, 2023 · 10 comments

Comments

@diplfranzhoepfinger
Copy link
Contributor

Answers checklist.

  • I have read the documentation for esp-protocols components and the issue is not addressed there.
  • I have updated my esp-protocols branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

Code:
https://github.com/diplfranzhoepfinger/esp-protocols-tree-master-components-esp_modem-examples-simple_cmux_client/tree/feature/CMUX_PWR_DOWN_UP

Log:
https://gist.github.com/diplfranzhoepfinger/744cb0e775afe25e9d8b5d70b4627d3d

I want to switch off the Modem, switch it on again,
and then make again a CMUX Session with Data and Command Channel.

but i get a URC of +PPPD: DISCONNECTED

how to solve this ?

@github-actions github-actions bot changed the title switch off Modem an on again switch off Modem an on again (IDFGH-10544) Jul 2, 2023
@diplfranzhoepfinger
Copy link
Contributor Author

i thnik we will need a new ppp and/or netif Object, but i am far away of an Expert in this. 

@david-cermak

@diplfranzhoepfinger
Copy link
Contributor Author

i guess we need something like this:

    // UART DTE clean-up
    esp_modem_destroy(dce);
    esp_netif_destroy(esp_netif);

but this code is from pppos Sample, and 'esp_modem_destroy' is not available in C++

also which Code is required to re-establish the dce and netif ? 

this are only guesses, we need clear advice here.

@diplfranzhoepfinger
Copy link
Contributor Author

Hi, 

i tried hard to destroy DCE and Netif, 

but it leads to crashes:

Log:

https://gist.github.com/diplfranzhoepfinger/8d679dcb099aa86aca3d977f53543111
Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.

Code:

https://github.com/diplfranzhoepfinger/esp-protocols-tree-master-components-esp_modem-examples-simple_cmux_client/tree/feature/CMUX_PWR_DOWN_UP_with_new_netif

@diplfranzhoepfinger
Copy link
Contributor Author

@diplfranzhoepfinger
Copy link
Contributor Author

and next:

Log:
https://gist.github.com/diplfranzhoepfinger/4ee1a7f61b107dc1ecd80c9a1d34a4b5
Code: feature/leave_CMUX5

tokk over 3 Lines from the non-Working branch, but still working ?

isn't this curious ?

@david-cermak
Copy link
Collaborator

I guess you just have to send a hanpup() command (ATH) to complete the closure correctly.

@david-cermak
Copy link
Collaborator

Closing, feel free to reopen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants