FatMsm: failed to set infra mode OID, error 31 RRS feed

  • Question

  • Hi there,

    iMX51 + WinEC700.

    I initially run an application that registers the bluetooth ports.

    It uses the code:

    PORTEMUPortParams pp;
    memset (&pp, 0, sizeof(pp));
    pp.device = b; = c;
    pp.uiportflags = 0;
    pp.imtu = imtu;
    wsprintf( msg, L"+RegisterBluetoothCOMPort ndx=%d\r\n", ndx);
    HANDLE hDevicePort = RegisterBluetoothCOMPort(BT_COM_PREFIX, ndx, &pp);
    if (hDevicePort == NULL)
    	DWORD err = GetLastError();
    	if (err==2404)

    Sometimes happen that during this operation (done in a separate thread) the main thread freeze and i need to restart the device by the power button.

    In the debug output i saw the debug string from the battery driver but i also saw this line:

    PID:00D4004E TID:054300AE FatMsm: failed to set infra mode OID, error 31

    and i was not able to find who wrote it ... what does it mean?

    I have to say that before the code above i was powering down the bt module.


    Friday, March 28, 2014 4:51 PM

All replies

  • Hi,

    Do you have a NDIS wifi driver. The MSM module belongs to native wifi. As you have stated when you are trying to reset the device, something is causing the wifi driver to not perform as expected by native wifi and some OID has failed.



    Sunday, March 30, 2014 10:38 AM
  • Yes, your right.

    In the procedure i'm switching  off both the wifi and the bt (and other USB devices).

    PID:0525004A TID:04BE00E6 [SDI]: Start device init
    PID:0525004A TID:04BE00E6 [SDI] Set state[unknown] device[host 1]
    PID:0525004A TID:04BE00E6 [SDI] Set state[unknown] device[host 2]
    PID:0525004A TID:04BE00E6 [SDI] Set state[off] device[wifi]
    PID:00400002 TID:024E0036       USBHost : Detach Function [address(2) / layer (1)]
    PID:0525004A TID:04BE00E6 [SDI] Set state[off] device[vci]
    PID:0525004A TID:04BE00E6 [SDI] Set state[off] device[bluetooth]
    PID:0525004A TID:04BE00E6 [SDI] Set state[unknown] device[dock]
    PID:0525004A TID:04BE00E6 [SDI] Register com BSP[1]
    PID:0525004A TID:04BE00E6 +ubt_RegisterPort ndx=1
    PID:0525004A TID:04BE00E6 +RegisterBluetoothCOMPort ndx=1
    PID:0525004A TID:04BE00E6 -RegisterBluetoothCOMPort h=-691059820
    PID:00D4004E TID:02CF002A FatMsm: failed to set infra mode OID, error 31

    Happens that the wifi is detached but until the error goes up, the bt is not detached. since i need to restore the (eventual) bt virtual com ports, if the error is before the registration everything is ok, otherwise the system hangs. (On other devices (same type) I have no this error ...)

    By other tests my attention goes to the end of the registration process: here we have a RegFlushKey(HKLM) call to be sure the registry containing the bt keys is saved. 

    Is it possible that the system hangs inside this API? Should the registry stay locked until the error?


    • Edited by SteMMo Monday, March 31, 2014 9:34 AM
    Monday, March 31, 2014 9:31 AM