I've seen the same issue before with an Huawei modem.
It looks like not all modems can handle sending "ATE0 +CMEE=1" to the modem
and pcui port simultaneously.
Try removing this line from huawei_enable():
g_at_chat_send(data->modem, "ATE0 +CMEE=1", NULL, NULL, NULL, NULL);
Show replies by thread