Git Product home page Git Product logo

Comments (14)

david-cermak avatar david-cermak commented on May 30, 2024

Yes, it should be possible to exit CMUX mode (haven't really tried with real devices, though), but this is not implemented in the esp-modem component. The CMUX mode only creates two virtual terminals so that one could be used for commands and the other one for PPP mode.
When PPP mode is not longer required, you can still exit the PPP mode and have two virtual terminals in command mode.

from esp-protocols.

jonathandreyer avatar jonathandreyer commented on May 30, 2024

Hi, thanks for your message. I will study both approaches, but I have a preference for closing the CMUX mode. I think that is more elegant than leave unused resources open. Do you have any recommendations about that?
Best regards,
Jonathan

from esp-protocols.

david-cermak avatar david-cermak commented on May 30, 2024

Yes, I agree that it's a good practice to cleanly exit whenever possible.

Do you have any recommendations about that?

Not really, just keep this open and will update it once the CMUX exit gets implemented. (PRs welcome, btw)

from esp-protocols.

jonathandreyer avatar jonathandreyer commented on May 30, 2024

Hi, thanks for your reply. I will study the behaviour of the CMUX and see if I can do something for this point (the CMUX protocol seems to me a bit complex). If I have something, I will leave a comment here.
Best regards,
Jonathan

from esp-protocols.

david-cermak avatar david-cermak commented on May 30, 2024

Implemented in #42

from esp-protocols.

jonathandreyer avatar jonathandreyer commented on May 30, 2024

Hi, thanks you for the implementation of the feature. I have tested but that not work in my case. To switch back in command mode (without CMUX & PPP), do I need only to:

dce->set_mode(esp_modem::modem_mode::COMMAND_MODE)

correct? The problem seems to come from exiting of PPP (but I am not sure). Regarding the right usage of the CMUX mode, maybe it will be an idea to implement it in the CMUX example (optionally activated with a define variable). If you would like, I can do it.

Best regards,

Jonathan Dreyer

from esp-protocols.

david-cermak avatar david-cermak commented on May 30, 2024

Hi Jonathan,

There's still a problem of the meaning of the modes. Currently, when we switch to CMUX we actually create two virtual terminals, both in command mode. then any further switching to PPP, changes the mode of one virtual terminal only.

So yes, you're correct.

  1. set mode to CMUX
  2. set mode to PPP
    ~ Do work
  3. Set mode to CMD should exit both virtual terminals and leave only one (physical) in command mode.

I think it would probably make more sense to have the CMUX mode automatically create one command terminal and one data terminal (i.e. points 1) and 2) in a single step: set mode to CMUX).


I have tested but that not work in my case.

Could you please share the logs?

implement it in the CMUX example (optionally activated with a define variable)

That would be helpful, thanks!

from esp-protocols.

bbinet avatar bbinet commented on May 30, 2024

@david-cermak on a similar topic, I was wondering what steps need to be followed if we are using CMUX and want to go to deep sleep during a few minutes: should we disable CMUX prior to going to deep sleep (is there any CMUX state maintained on the modem module side?) or is it fine to deep sleep without any de-initialization, and set mode to CMUX again after wake up?

from esp-protocols.

david-cermak avatar david-cermak commented on May 30, 2024

The modem could stay in the CMUX mode and we could just set the CMUX mode again when we wake-up. This should normally work, but I'm not sure if it's desirable if you go to sleep for some minutes? perhaps you want to power-off the modem, too?

from esp-protocols.

bbinet avatar bbinet commented on May 30, 2024

@david-cermak Yes you're right, but I thought of using PSM mode (see #54) to save energy on the modem, but I don't know if CMUX on module will still be on after waking up from PSM.

from esp-protocols.

jonathandreyer avatar jonathandreyer commented on May 30, 2024

Hi @david-cermak, thanks you for your reply and your confirmation regarding the implementation.

When I have written my previous message, I had the feeling that it is related to the #47 because the indication "NO CARRIER" are received on the UART. With your new message inside this issue, I have tested the PR #42 (with 4 different commits) and now that seems working.

Regarding the example, I will do that as soon as possible, but I have a bit busy this week.

Best regards,

Jonathan Dreyer

from esp-protocols.

david-cermak avatar david-cermak commented on May 30, 2024

@jonathandreyer Thanks for the feedback. Yes, I've updated the PR per the discussion here, to actually simplify the mode switching.

@bbinet I'll have to look into the low power modes for common modems and will comment on that issue. From what I see, these are typically just AT commands that configure and setup the PSM parameters (and perhaps some GPIOs as wake-up signals)

if CMUX on module will still be on after waking up from PSM.

I think the CMUX mode would be still active, but havent' really checked (can test it with 70xx device family)

from esp-protocols.

jonathandreyer avatar jonathandreyer commented on May 30, 2024

@david-cermak Thanks for the reply. I will prepare a PR, but I will wait a bit on the PR #42 (until it is no longer in WIP).

from esp-protocols.

jonathandreyer avatar jonathandreyer commented on May 30, 2024

@david-cermak I have created a branch with commits of this PR #52 and a new commit (here) with the code which closes the PPP. Maybe, you can already take a look, but I will wait until the PR #52 is merged to create a PR.

from esp-protocols.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.