WEC7, CmAcquireConnection() returns CMRE_CONNECTION_ACQUIRE_FAILED RRS feed

  • Question

  • Hi all,

    I'm developing an application, which uses the connection manager API to list all available Wi-Fi connections and to set up an ad hoc connection for a peer-to-peer network between two WEC7 devices. The devices normally have an OS without shell, but for testing/debugging we also can build a shell OS.

    Everything works so far that on the first device the ad hoc network can be setup from my application by defining a custom network name and connecting to the appropriate Wi-Fi adapter.

    The second device recognizes this ad hoc network but it is only possible to join it by means of the configuration tools available in the shell OS:

    • wireless network dialog, which lists the available Wi-Fi networks and allows to select and connect to one
    • Settings/Network and Dial-up connections) to set the custom IP address settings

    If I try to establish the connection on the second device from my application, the connection manager command CmAcquireConnection() fails with error code CMRE_CONNECTION_ACQUIRE_FAILED.

    I was able to debug the shell OS and to track the various parameters when doing the configuration/connection with the WEC7 configuration tools. Comparing them with the parameters set by my application did not show any difference. But still it fails to connect, whereas with the shell OS the connection can be established (ping each device from each other works fine).

    The return code CMRE_CONNECTION_ACQUIRE_FAILED is not even listed in the online documentation of CmAcquireConnection().

    Regarding the documentation I'm missing a howto anyway and also sample code seems not to be available. There is only the net UI code in c:\WINCE700\public\common\oak\drivers\netui\. Combined with shell OS debugging we could figure out most settings.

    Has anybody any idea what the reason could be for the CMRE_CONNECTION_ACQUIRE_FAILED?

    Is there any howto regarding WEC7 and Wi-Fi and has anybody some useful code examples?

    Any help is appreciated.

    Thanks in advance,



    Monday, December 21, 2015 1:42 PM

All replies

  • Problem solved!

    Following flag needs to be set:

    nwc.dwCtlFlags |= NWCTL_BROADCAST_SSID;

    Tuesday, December 22, 2015 10:42 AM