[PATCH] ussd: Switch the state from USER_ACTION to IDLE
... when a USSD notification is received. Some networks send 0 (no further user action required) after the response timeout expires. That should result in the user input form getting removed from the ME screen. --- src/ussd.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/ussd.c b/src/ussd.c index 99fa753..84f64c6 100644 --- a/src/ussd.c +++ b/src/ussd.c @@ -512,6 +512,20 @@ void ofono_ussd_notify(struct ofono_ussd *ussd, int status, int dcs, ussd_change_state(ussd, new_state); goto free; + } else if (ussd->state == USSD_STATE_USER_ACTION && + status != OFONO_USSD_STATUS_ACTION_REQUIRED) { + ussd_change_state(ussd, USSD_STATE_IDLE); + + if (status == OFONO_USSD_STATUS_NOTIFY && str && str[0]) { + const char *path = __ofono_atom_get_path(ussd->atom); + + g_dbus_emit_signal(conn, path, + OFONO_SUPPLEMENTARY_SERVICES_INTERFACE, + "NotificationReceived", DBUS_TYPE_STRING, + &str, DBUS_TYPE_INVALID); + } + + goto free; } else { ofono_error("Received an unsolicited USSD but can't handle."); DBG("USSD is: status: %d, %s", status, str); -- 1.9.1 ___ ofono mailing list ofono@ofono.org https://lists.ofono.org/mailman/listinfo/ofono
gemalto: AGPS functionality
Hi, I am trying to add AGPS functionality to Gemalto modems. I took a look at interface AssistedSatelliteNavigation and implementation in drivers/atmodem/gnss.c. Unfortunately, Gemalto does not support AT+CPOS command but it uses a custom command: AT^SBNW. Moreover, the positioning file expected is not XML but binary format. The process of loading the binary is: - Download binary file from Gemalto server to local memory - Initiate binary write command: AT^SBNW="agps", - Copy binary file from local memory to modem over its application (or modem) interface AT^SBNW immediately returns "CONNECT". Then "AGPS READY: SEND FILE..." After the modem receives the exact amount of bytes specified in the command, it verifies the data and returns one of the following: "AGPS END OK", "TIME INFO ERROR", "BAD CRC" or "OK". So I am facing several issues: - How to send binary data from local memory to oFono? DBus message with array of bytes? - How to send binary data from oFono to modem interface? Does gatchat only support strings? - How to handle custom result codes? I already tried some hacks, and I had to blacklist the response "CONNECT" for instance. Or maybe it isn't worth the effort implementing it in oFono? Regards, Vincent ___ ofono mailing list ofono@ofono.org https://lists.ofono.org/mailman/listinfo/ofono