wdoekes / asterisk-chan-dongle

chan_dongle channel driver for Huawei UMTS cards, works with Asterisk 14+
Other
296 stars 104 forks source link

E1550 broken by commit 3d2a97f26ba84473a0926a9fe9a32e451a56bc36 #148

Closed AlexHighTower closed 2 years ago

AlexHighTower commented 2 years ago

Hello

Just updated to latest commit 3d2a97f26ba84473a0926a9fe9a32e451a56bc36 and all my E1550 now broken They in state Dongle has connected, initializing... Before latest changes it was Dongle has connected, initializing... Dongle initialized and ready

now it stuck at command write command 'AT+CMGR' expected response '+CMGR' length 12

looks like it sends AT+CMGR without any params and this is not supported

wdoekes commented 2 years ago

Your subject says 3d2a97f26ba84473a0926a9fe9a32e451a56bc36 is the culprit. But I have a hard time believing that.

Are you using a big endian platform? Do things work if you revert that commit? Or is it perhaps a different commit.

Did you git bisect to find the cause between the last known good commit and the problematic commit?

Also, please add more verbose debug logs to your report. I don't own a dongle, I cannot trace what you're doing.

AlexHighTower commented 2 years ago

But it is true....

I tried all commits from ca9b692 (last work for me) till 6073c91 - it stop to work

I use x64 ubuntu 18

log is attached

dongle is all the time in "Not initia" state

dongle_log.log

wdoekes commented 2 years ago

I cannot parse what you're saying.

There are 13 commits from ca9b692 to 3d2a97f. Which commit is the oldest that fails? The one after ca9b692 (= 5a0ee5318) or 6073c91 or 3d2a97f ?

Please be precise.

If you say ca9b692 works. Then you could do:

git bisect
git bisect good ca9b692
git bisect bad 3d2a97f

and git will provide you with a binary search after which you can say git bisect good or git bisect bad according to whether the provided commit works or not.

EDIT: Also: if you provide a debug log of a good session as well, that helps.

wdoekes commented 2 years ago

Having said that, I suspect that you need this:

--- a/at_command.c
+++ b/at_command.c
@@ -149,8 +149,8 @@ EXPORT_DEF int at_enqueue_initialization(struct cpvt *cpvt, at_cmd_t from_comman
                ATQ_CMD_DECLARE_STI(CMD_AT_CNUM, "AT+CNUM\r"),
                /* read the current voice mode, and return sampling
                 * rate, data bit, frame period */
-               ATQ_CMD_DECLARE_ST(CMD_AT_CVOICE, "AT^CVOICE?\r"),
-               ATQ_CMD_DECLARE_ST(CMD_AT_QPCMV, "AT+QPCMV?\r"), /* for Quectel */
+               ATQ_CMD_DECLARE_STI(CMD_AT_CVOICE, "AT^CVOICE?\r"),
+               ATQ_CMD_DECLARE_STI(CMD_AT_QPCMV, "AT+QPCMV?\r"), /* for Quectel */

                /* Get SMS Service center address */
                ATQ_CMD_DECLARE_ST(CMD_AT_CSCA, "AT+CSCA?\r"),
AlexHighTower commented 2 years ago

Having said that, I suspect that you need this:

it helped! thanks!

rojer commented 2 years ago

so, i just finished debugging this issue myself, came to submit a patch and found that it's already been fixed.

i think these lines can also be removed, since ATQ_CMD_DECLARE_STI will plow ahead anyway, no need to manually restart the sequence.