GNOME Bugzilla – Bug 708861
MM 1.x: don't continue probing DM ports if unescaping fails
Last modified: 2014-10-16 15:59:51 UTC
If a port responds with data, but unescaping fails, it's very likely not a DM port so we should just ignore it instead of trying 3 times. Might speed some devices up. The device here is a Option GIO322 (Icera-based) which speaks a non-DM protocol on the port. ModemManager[29194]: <debug> [1380220266.605946] [mm-qcdm-serial-port.c:205] debug_log(): (ttyHS2): --> 7e 00 78 f0 7e ModemManager[29194]: <debug> [1380220267.105570] [mm-qcdm-serial-port.c:205] debug_log(): (ttyHS2): <-- 7f 80 7f 80 d5 9d de 12 1f 00 09 a0 24 49 64 3a 20 2f 2f 73 6f 66 74 77 61 72 65 2f 72 65 6c 65 61 73 65 73 2f 63 75 73 74 2f 6f 70 74 69 6f 6e 2f 66 61 65 6d 61 5f 72 33 5f 31 31 2e 62 72 2f 6f 73 5f 61 62 73 2f 70 75 62 6c 69 63 2f 6f 73 5f 6c 6f 67 69 64 73 2e 68 23 33 20 24 2c 20 43 4c 32 33 35 31 20 77 69 74 68 20 30 20 6c 6f 63 61 6c 20 63 68 61 6e 67 65 73 2e 00 ModemManager[29194]: <debug> [1380220267.605567] [mm-qcdm-serial-port.c:205] debug_log(): (ttyHS2): <-- 7f 80 7f 80 a6 cc 53 13 1f 00 09 a0 24 49 64 3a 20 2f 2f 73 6f 66 74 77 61 72 65 2f 72 65 6c 65 61 73 65 73 2f 63 75 73 74 2f 6f 70 74 69 6f 6e 2f 66 61 65 6d 61 5f 72 33 5f 31 31 2e 62 72 2f 6f 73 5f 61 62 73 2f 70 75 62 6c 69 63 2f 6f 73 5f 6c 6f 67 69 64 73 2e 68 23 33 20 24 2c 20 43 4c 32 33 35 31 20 77 69 74 68 20 30 20 6c 6f 63 61 6c 20 63 68 61 6e 67 65 73 2e 00 ModemManager[29194]: <debug> [1380220268.105451] [mm-qcdm-serial-port.c:205] debug_log(): (ttyHS2): <-- 7f 80 7f 80 ef fb c8 13 1f 00 09 a0 24 49 64 3a 20 2f 2f 73 6f 66 74 77 61 72 65 2f 72 65 6c 65 61 73 65 73 2f 63 75 73 74 2f 6f 70 74 69 6f 6e 2f 66 61 65 6d 61 5f 72 33 5f 31 31 2e 62 72 2f 6f 73 5f 61 62 73 2f 70 75 62 6c 69 63 2f 6f 73 5f 6c 6f 67 69 64 73 2e 68 23 33 20 24 2c 20 43 4c 32 33 35 31 20 77 69 74 68 20 30 20 6c 6f 63 61 6c 20 63 68 61 6e 67 65 73 2e 00 ModemManager[29194]: <debug> [1380220268.333325] [mm-qcdm-serial-port.c:205] debug_log(): (ttyHS4): --> 7e 00 78 f0 7e ModemManager[29194]: <debug> [1380220268.605570] [mm-qcdm-serial-port.c:205] debug_log(): (ttyHS2): <-- 7f 80 7f 80 4f 2f 3e 14 1f 00 09 a0 24 49 64 3a 20 2f 2f 73 6f 66 74 77 61 72 65 2f 72 65 6c 65 61 73 65 73 2f 63 75 73 74 2f 6f 70 74 69 6f 6e 2f 66 61 65 6d 61 5f 72 33 5f 31 31 2e 62 72 2f 6f 73 5f 61 62 73 2f 70 75 62 6c 69 63 2f 6f 73 5f 6c 6f 67 69 64 73 2e 68 23 33 20 24 2c 20 43 4c 32 33 35 31 20 77 69 74 68 20 30 20 6c 6f 63 61 6c 20 63 68 61 6e 67 65 73 2e 00 ModemManager[29194]: <debug> [1380220269.105445] [mm-qcdm-serial-port.c:205] debug_log(): (ttyHS2): <-- 7f 80 7f 80 f6 5a b3 14 1f 00 09 a0 24 49 64 3a 20 2f 2f 73 6f 66 74 77 61 72 65 2f 72 65 6c 65 61 73 65 73 2f 63 75 73 74 2f 6f 70 74 69 6f 6e 2f 66 61 65 6d 61 5f 72 33 5f 31 31 2e 62 72 2f 6f 73 5f 61 62 73 2f 70 75 62 6c 69 63 2f 6f 73 5f 6c 6f 67 69 64 73 2e 68 23 33 20 24 2c 20 43 4c 32 33 35 31 20 77 69 74 68 20 30 20 6c 6f 63 61 6c 20 63 68 61 6e 67 65 73 2e 00 ModemManager[29194]: <debug> [1380220269.605206] [mm-qcdm-serial-port.c:205] debug_log(): (ttyHS2): <-- 7f 80 7f 80 7e 8d 28 15 1f 00 09 a0 24 49 64 3a 20 2f 2f 73 6f 66 74 77 61 72 65 2f 72 65 6c 65 61 73 65 73 2f 63 75 73 74 2f 6f 70 74 69 6f 6e 2f 66 61 65 6d 61 5f 72 33 5f 31 31 2e 62 72 2f 6f 73 5f 61 62 73 2f 70 75 62 6c 69 63 2f 6f 73 5f 6c 6f 67 69 64 73 2e 68 23 33 20 24 2c 20 43 4c 32 33 35 31 20 77 69 74 68 20 30 20 6c 6f 63 61 6c 20 63 68 61 6e 67 65 73 2e 00 ModemManager[29194]: <debug> [1380220269.605369] [mm-port-probe.c:610] serial_probe_qcdm_parse_response(): QCDM probe error: (0) Failed to unescape QCDM packet. ModemManager[29194]: <debug> [1380220269.605425] [mm-port-probe.c:257] mm_port_probe_set_result_qcdm(): (tty/ttyHS2) port is not QCDM-capable
Created attachment 258733 [details] [review] Patch. Let me know what you think.
Created attachment 258738 [details] [review] Patch v2. Updated patch, fixing unit test.
Patch looks OK, but I think it might be safer to create some MMQcdmSerialPortError values and use those specifically, in lieu of libqcdm actually providing them?
Created attachment 288611 [details] [review] Patch v3
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.