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

more Control over CMUX virtual Channels (IDFGH-8559) #168

Closed
diplfranzhoepfinger opened this issue Oct 19, 2022 · 9 comments
Closed

more Control over CMUX virtual Channels (IDFGH-8559) #168

diplfranzhoepfinger opened this issue Oct 19, 2022 · 9 comments

Comments

@diplfranzhoepfinger
Copy link
Contributor

the Issue
#167
was about enter CMUX and leave CMUX.

but this was not the right Question. Or at least not getting to the point too much.

if we enter CMUX Mode we can have up to 5 Virtual Channels according to CMUX Spec.
as i understood, ESP-Modem does establish 2 channels, 1 AT Channel, and one Data Channel.

but now +PPP disconnect comes in as a URC, then this cannel is in command mode.
so we now have 2 Channels in Command mode.

so

  1. ... how to get more info about each channel ?
  2. ... how to switch this channel again into Data Mode ?
@diplfranzhoepfinger
Copy link
Contributor Author

@david-cermak

@github-actions github-actions bot changed the title more Control over CMUX virtual Channels more Control over CMUX virtual Channels (IDFGH-8559) Oct 19, 2022
@diplfranzhoepfinger
Copy link
Contributor Author

other Question:

is there a way to pro-actively shut down the DataMode (PPP Session) on one Channel without leaving CMUX, and again enter Data mode later ?

@MartinPatarinski
Copy link

This issue is also observed on our side. We do the following steps:
Enter Command mode
Enter CMux mode and and connect to internet successfully
Simulate disconnection event
Re-Enter command mode
Enter Data Mode and and connect to internet successfully
send AT command => does not work any more. Seems like the port is used for Data only instead of AT commands

So after we enter CMUX mode, we need to have control over the 2 ports in order to be able to switch between Command and Data mode

@david-cermak
Copy link
Collaborator

That was the original design, but was simplified in f3ff98b to automatically maintain DATA mode in one virtual terminal when in CMUX. I would like to provide more control of the individual terminals in CMUX, but that would complicate the API. I think the main reason for using this auto CMUX mode was, that for the devices I tested seamlessly exited (all possible) data mode(s) when closing CMUX mode.

This issue is also observed on our side. We do the following steps:

  1. Enter Command mode
  2. Enter CMux mode and and connect to internet successfully
  3. Simulate disconnection event
  4. Re-Enter command mode
  5. Enter Data Mode and and connect to internet successfully

@RilabsAutomotive about the step 5): Why entering Data mode here, if you wanted to use AT commands? Would it work if you enter CMUX mode?

@MartinPatarinski
Copy link

MartinPatarinski commented Oct 21, 2022

Right, so the re-entering in Data mode in step 5, we tried in order to retrigger the PPP to establish and authenticate.
SIMCOM support explained that CMUX is entered only once after start-up to create the virtual ports. Then we shall only switch between Command and Data mode in order to re-establish connection via PPP.

p.s. we tested that indeed enterring second time in CMUX fails. We receive "NO CARRIER" from SIMCOM at AT command ATD
p.s2. we tested also that if we enter Data mode the second time, the PPP connection is established and we receive IP Event and re-connect succefully. However, after that AT commands do not work and we can't control the SIMCOM.

@david-cermak
Copy link
Collaborator

SIMCOM support explained that CMUX is entered only once after start-up

Does that mean that your device doesn't support runtime exit of CMUX?

I'll try to think about how we can extend the interface and provide better control over these virtual terminals.

@diplfranzhoepfinger
Copy link
Contributor Author

SIMCOM support explained that CMUX is entered only once after start-up

Does that mean that your device doesn't support runtime exit of CMUX?

exit was possible, but re-Enter not. 

I'll try to think about how we can extend the interface and provide better control over these virtual terminals.

@diplfranzhoepfinger
Copy link
Contributor Author

also the Topic is: if a PPPos Session on Data terminates, the Channel switch to command. (see initial Post above)

@david-cermak
Copy link
Collaborator

also the Topic is: if a PPPos Session on Data terminates, the Channel switch to command. (see initial Post above)

Good point, thanks! Will have to do something about re-entering the DATA mode if it spontaneously exits. On my devices it's usually enough to transition CMUX -> CMD and back CMD -> CMUX (the first transition assures that the PPPoS graciously shutdowns on these devices)

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

4 participants