"at+cops=?" not working with adl_atCmdCreate

I am experiencing the following problem while trying to implement roaming behaviour into our WMP100 application.

It looks like at command “at+cops=?” does not give the correct response when used with adl_atCmdCreate.

Look at the following code snippet:

adl_atCmdCreate(“at+cops=?”, FALSE, COPS_Handler, "+COPS: ", NULL);
bool COPS_Handler(adl_atResponse_t *paras)
{
debugPrintf(uri, “%s”, paras->StrData);
}

I expected debugPrintf to display something like this:
+COPS: (2,“T-Mobile D”,“T-Mobile D”,“26201”),(3,“o2 - de”,“o2 - de”,“26207”),(3,“Vodafone.de”,“voda DE”,“26202”),(3,“E-Plus”,“E-Plus”,“26203”)

Instead it just displays this:
+COPS:

Note : If I run the same “at+cops=?” on the AT command line, it gives the expected output. Aso if I replace “at+cops=?” with just “at+cops?” or any other AT command in the adl_atCmdCreate call, then it also gives the correct output. It is only the command “at+cops=?” that is not giving the correct response.

Here is the fw version that we use: R71a01gg.WMP100 2076692 052808 20:08

Hope someone has some advise as this is driving me nuts!

Yes, this is another undocumented Wavecom behaviour! :angry:

What actually happens is that it delivers the result as a number of separate responses:

  1. +COPS:
  2. (2,“T-Mobile D”,“T-Mobile D”,“26201”),
  3. (3,“o2 - de”,“o2 - de”,“26207”),
  4. (3,“Vodafone.de”,“voda DE”,“26202”),
  5. (3,“E-Plus”,“E-Plus”,“26203”)

So, instead of subscribing to just the "+COPS: " response, you should subscribe all responses, and rebuild the list in your application. :angry: :angry:

Hi awneil. Thanks for the quick response and this info. I’ll have to figure out how to subscribe to all of the responses, but at least now I know where to look. Again thanks a lot. :slight_smile:

Thanks again awneil. As you said, subscribing to all events sorted my problem. It now comes back as a couple of separate response like you described.