Hi Zhenhua, > +static gboolean search_entry(const char *str, struct error_entry *e, > + int maxentries, > + enum ofono_error_type type, > + struct ofono_error *error) > +{ > + int i; > + > + for (i = 0; i < maxentries; i++) { > + if (!strcmp(e[i].str, str)) { > + error->type = type; > + error->error = e[i].error; > + return TRUE; > + } > + } > + > + return FALSE; > +} This doesn't really make sense, the errors from the modem usually come in the form of +CMS ERROR: 123 assuming we enabled +CMEE=1. If we enabled +CMEE=2 then the numeric error code gets converted to a string. The former is preferable as the string might be different from what oFono has. What you're matching here will always result in an unknown error. Regards, -Denis