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
GSM_SetIncomingUSSDCallback is never called with libgammu 1.36.5 #130
Comments
There is no difference in the communication with the modem, so that looks quite strange. Do you get some error from Gammu? |
No,no errors at all. Another thing to add is that A place in my code why I think |
It doesn't return bool, it returns number of bytes read. So it might be that Gammu didn't yet receive complete reply and could not parse it because of it. |
I currently do not have the modem so i cant debug the problem by tracing code paths taken for now but looking at the code and i think there is a bug documented below: When things work as expected,user callback function is called[1] and then the function exits with "success"[2]. But when things fail,there is this[3] code path that exits with "success" without calling the user callback function. How does whoever calls Looking at other premature exists due to errors and i think the user callback should be called with an "empty" object to let the user know something went wrong instead of just deciding to say nothing. [1] gammu/libgammu/phone/at/atgen.c Line 1719 in bbe8224
[2] gammu/libgammu/phone/at/atgen.c Line 1723 in bbe8224
[3] gammu/libgammu/phone/at/atgen.c Line 1647 in bbe8224
|
The [3] happens only when invoking the AT+CUSD (the reply string then doesn't start with +CUSD, but with AT+CUSD, so it's not the incoming message. So I believe the code is correct here. As your log doesn't show the received message at all, I'm still quite sure it's the problem I've described - Gammu didn't read enough data to get complete response so it did not process it yet. Calling GSM_ReadDevice just once is not enough in this case. |
I have a modem that ``lsusb` identifies as:
When the modem is connected to the computer,dmesg reports the following:
The problem seems to be that a call back function set with
GSM_SetIncomingUSSDCallback()
is not called with libgammu version1.36.5
but it does work correctly when using libgammu version1.33.0
Logs for libgammu version
1.33.0
where things work andGSM_DialService()
generates a response is below:Logs for libgammy version
1.36.5
where things do not work will follow afterwardslogs for libgammu version
1.36.5
follows:The text was updated successfully, but these errors were encountered: