CommandCreate problem


#1

Hi everybody,

I have run to problem with my small appliction. It works fine in debug mode (VC6 + Target Monitorin Tool). When I tranfer it to target (Q24X6) it does not work correctly.

Main idea of my program is:

  • Read SIM PhoneBook Memory (1-15)
  • Go to Data Mode
  • Listen incoming data
  • Analyze it
  • Send SMS if needed

I have tracked down that problem is when I read PhoneBook. I can can read it correctly. But, somehow device drops out from Data Mode.

To me it seems that response of PhoneBook reading command somehow causes this drop out from Data Mode.

I have tried to put delay between PhoneBook reading and adl_fcmSwitchV24State.
Nothing seems to help.

I read PhoneBook with following command after ADL_SIM_EVENT_FULL_INIT

adl_atCmdCreate ( “at+cpbr=1,15”, FALSE, (adl_atRspHandler_t)CmdCPBRHandler, “*”, NULL );


CmdCPBRHandler looks like this:

char Cnt [ 1 ];
char Number [ MAX_PHONE_NUMBER_LEN ];
char Text [ MAX_TEXT_LEN ];

wm_strGetParameterString ( Cnt, paras->StrData, 1 );
wm_strGetParameterString ( Number, paras->StrData, 2 );
wm_strGetParameterString ( Text, paras->StrData, 4 );

if ( ( wm_isphonestring ( Number ) == TRUE ) &&
( Number [ 0 ] == ‘+’ || Number [ 0 ] == ‘0’ ) )
{
wm_strcpy ( PhoneNumbers[ wm_atoi ( Cnt ) - 1 ].PhoneNumber, Number );
wm_strcpy ( PhoneNumbers[ wm_atoi ( Cnt ) - 1 ].PhoneText, Text );
}

return TRUE;


Program goes thru this CmdCPBRHandler 15 times. Which is normal, I guess.

Can anyone help me?

Happy new year to all!

/murjan


#2

Dear,
Have you finished do it