-
Notifications
You must be signed in to change notification settings - Fork 160
Unable to get network interface while using CMUX mode (IDFGH-8297) #140
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
Comments
@RaD Could you please share the
Are you really using |
@david-cermak , I use SIM800L on Xinyuan LilyGo-T-Call-SIM800 board. Here is a verbose output:
|
Maybe this would helpful:
It fails here: https://github.com/espressif/esp-protocols/blob/master/components/esp_modem/src/esp_modem_cmux.cpp#L385 |
|
@RaD Thanks so much for sharing the debug logs!
I'll try to add the |
Added the Could you please check if this helps with the mode switching for your device? If so, I'd add some logic around it and post a PR. |
|
Can you create a branch with fixes that I need to check, it is more convinient, than patch. I just don't remember how to apply them and I have some ESP_LOG* in the sources of modem. After applying your patch:
|
created #142 Could you please give it one more try? Saw that I've sent the MSC's also for the control term, which we shouldn't have... |
I do all until success, no problem ) |
|
I have logged out SABM transmit data:
It looks like there is MSC response but we did no MSC request, hm. |
weird, I would expect we should get the second (dlci=1)
I think it's the disconnection message from the control term, showing that something was wrong... I guess I would have to play with a real |
here is more info:
Pay attention that this output is much similar to https://manualzz.com/download/9010415 |
What is about this?
|
It was not helpful:
|
I am on @ruslanpopov (telegram) and can make tests online... |
It run once successfully! No need to send MSC! No need to send SABM confirm frame! Timing matters! It works only in verbose mode! |
Otherwise it gets confused with DISC frame and causes trouble when entering CMUX mode (if device sends MSC requests) Closes espressif#140
I think I found the issue. It's a simple race condition, as the |
But if I exit from verbose logs the following is not reproducing:
|
Worked patch:
Also pay attention on 5 seconds delay before launching AT+CMUX=0... BTW, how to send and receive commands and their answers in CMUX mode? ;) |
Are you saying that after applying the latest fix 72a603f, you're getting the IP address correctly? But this works only when full verbose logging is enabled (once you lower verbosity, it just fails with no message whatsoever)? Is that correct? |
The patch above works even in DEBUG mode. |
oh, I see, a delay here and there fixes the issue, too. |
Waiting for 0.1.23 ) |
Made some tests, it is not very stable |
|
Could you please decode the addresses in the backtrace below? As described here: ...-addr2line -pfiaC -e build/PROJECT.elf ADDRESS |
Otherwise it gets confused with DISC frame and causes trouble when entering CMUX mode (if device sends MSC requests) Closes espressif#140
|
Applied your patch! It looks like the problem is solved ;) |
10 successful starts of 10 tries, great! |
Will you bump the component version? |
There is a problem when the verbose mode was disabled:
|
The solution:
Output:
|
It is funny, but 500'000 is too long for verbose. It failed again. |
Alright, I'll make it a config option. Seems like it also depends on devices, and we don't want to wait second(s) to switch modes on other devices. |
Otherwise it gets confused with DISC frame and causes trouble when entering CMUX mode (if device sends MSC requests) Closes espressif#140
Otherwise it gets confused with DISC frame and causes trouble when entering CMUX mode (if device sends MSC requests) Closes espressif#140
[1/2] espressif/esp_modem (0.1.21)
[2/2] idf (4.4.1)
For the code:
I got:
If I uncomment the DATA mode block and comment CMUX block, then I can use network. But I need CMUX mode, huh...
The text was updated successfully, but these errors were encountered: