Hi Lucas, > +static int mbm_create_data_chat(struct ofono_location_reporting *lr) > +{ > + struct gps_data *gd = ofono_location_reporting_get_data(lr); > + struct ofono_modem *modem; > + const char *gps_dev; > + GAtSyntax *syntax; > + GIOChannel *channel; > + int fd; > + > + modem = ofono_location_reporting_get_modem(lr); > + gps_dev = ofono_modem_get_string(modem, "GPSDevice"); > + > + channel = g_at_tty_open(gps_dev, NULL); > + if (channel == NULL) > + return -1; > + > + syntax = g_at_syntax_new_gsm_permissive(); > + gd->data_chat = g_at_chat_new(channel, syntax); > + fd = g_io_channel_unix_get_fd(channel); > + > + g_at_syntax_unref(syntax); > + g_io_channel_unref(channel); > + > + if (gd->data_chat == NULL) > + return -1; > + > + return fd; > +} > + Why do you bother creating a GAtChat for the NMEA port? It seems that a GIOChannel or a simple fd would be enough. Also, what happens if the channel is hupped by the modem? Shouldn't we have a watch in the core for that and set Enabled accordingly? Regards, -Denis