Skip to content

Draft: mbim-proxy: make proxy recover if device was closed

I'm trying to figure out why my modem is misbehaving. It's a Fibocom FM150-AE running in mbim mode.

What happens is that sometimes on boot or when the modem is attached to USB the opening sequence in mbim-proxy goes wrong.

  • the mbim open command is sent and times out a couple of times before eventually succeeding
  • one of the subsequent queries for device services or microsoft extensions either:
    • fails with MBIM_PROTOCOL_ERROR_NOT_OPENED or
    • times out

I have no idea why the modem behaves like this and it's probably buggy firmware or something else outside of libmbim.

If a call returns the error MBIM_PROTOCOL_ERROR_NOT_OPENED mbim-proxy takes notice of this but doesn't recover until being closed. So this PR tries to fix this by untracking the device so it is reopended next time.

This change allows me to issue a mmcli -S command and usually the modem is then detected. Otherwise I have to restart modem manager / mbim-proxy.

Merge request reports