write(9, "A", 1) = -1 EAGAIN
Jean-Christian de Rivaz
jc at eclis.ch
Wed Sep 23 13:51:58 PDT 2015
Hello,
I use ModemManager 1.4.0 from Debian Jessie armhf on an embedded system
with a u-blox SARA-U270 modem over USB and the generic MM driver.
Sometimes MM fail to make the modem connected to the Internet because it
always get this:
write(9, "A", 1) = -1 EAGAIN (Resource temporarily unavailable)
Searching more on the system, I found the observations below:
1) This happens always when the modem try to connect. The registration
is not affected so far.
2) If it pass the connected state, the modem is not affected so far.
3) A tshark using usbmon show that the kernel don't send the expected
"A" char to the modem CDC.
4) The same tshark show that the modem still report +CIEV messages on
the same CDC.
5) Others CDC of the modem are still working well.
6) A restart of the ModemManager is enough to recover from this situation.
7) MM code have a kind of protection against this EAGIN in the form of
eagain_count:
http://cgit.freedesktop.org/ModemManager/ModemManager/tree/src/mm-port-serial.c#n593
8) I have not yet understand what MM will do when eagain_count expire,
but pragmatically this don't seem as effective as a restart of MM.
I don't know yet if the problem is in the modem, in the kernel, or in
MM. For a while I suspected a control flow problem, either with the
modem disabling CTS on the CDC or with a XOFF char send by the modem,
but this would not explain why the message from the modem are on the USB
and not reported to the application.
Any hint would be greatly appreciate,
Best Regards,
Jean-Christian de Rivaz
More information about the ModemManager-devel
mailing list