Sending data using GPRS based on timer

are you sure the global declaration of variable c is in the same file???

yes, it is

That is a definition of the variable ‘c’, with an initialisation.

That is merely an assignment - where is the definition of ‘c’ in that case?

Again, this is basic ‘C’ programming - nothing specifically to do with Open-AT!

awneil:
What i have to do to solve my problem.

I guess there is only one way to help you here… Let us see the whole file… You could for example put it onto Walter’s site (see http://www.wavecom.com/modules/movie/scenes/forums/viewtopic.php?t=596).

Best Regards,
Jan

As I said, this is a pure ‘C’ programming issue - nothing specifically to do with Wavecom or Open-AT.

The compiler is telling you that your ‘C’ syntax is incorrect - it was expecting a semicolon ‘;’ and found something else instead.

So, look at your source text - have you omitted a semicolon somewhere near where the error was reported?

Or perhaps you’ve mis-typed some keyword or variable name - the compiler doesn’t recognise it, and its best guess is that you left a semicolon out somewhere.

Have you really never had to deal with this kind of compiler error message before? If not, I think you probably need to gain some basic ‘C’ experience before getting into the intricacies of Open-AT…

Gentlemen:
I don’t think the problem is in the use of the variable c.
the global variable loses visibility only within evHandler … and it it surely assigned in the call to wip_UDPCreate function (not shown in the code though).

I would check the value of c, before calling wip_write as well as the return code of wip_write. If c is non-zero and the result of wip_write is zero then the problem is in the receptor of the UDP packet (IP/port wrong or packet is being blocked by firewalls).

Hi optomation,

your guess is as good as ours. But since the original poster doesn’t seem to be willing to share his code with us, we probably never will know for sure what the problem really is…

Best Regards,
Jan

Hi optomation and Jan,
I already posted the code, again i am giving my code

ascii Buffer[200]="Hello Server, client is sending the message based on timer"; 
void evHandler( wip_event_t *ev, enum state *ctx) 
{ 
   wip_channel_t c = ev->channel; 
    
   switch (ev->kind) 
   { 
   case WIP_CEV_DONE: 
      break; 
   case WIP_CEV_ERROR: 
      adl_atSendResponse(ADL_AT_RSP, "WIP_CEV_ERROR"); 
      break; 
   case WIP_CEV_OPEN: 
      adl_atSendResponse(ADL_AT_RSP, "WIP_CEV_OPEN"); 
      break; 
   case WIP_CEV_PEER_CLOSE: 
      adl_atSendResponse(ADL_AT_RSP, "WIP_CEV_PEER_CLOSE"); 
      break; 
   case WIP_CEV_PING: 
      break; 
   case WIP_CEV_READ: 
       
      break; 
   case WIP_CEV_WRITE: 
      adl_atSendResponse(ADL_AT_RSP, "WIP_CEV_WRITE"); 
adl_tmrSubscribe(TRUE, 100, ADL_TMR_TYPE_100MS, (adl_tmrHandler_t)Timerhdl1 ); 
                 break;       
   default: 
      break; 
   } 
} 

void Timerhdl1( u8 ID) 
{ 
   adl_atSendResponse(ADL_AT_RSP, "START TIMER Handler"); 
                wip_write( c, Buffer, strlen(Buffer)); 
}

Thanks
nlysspk

This part alone is useless. If you want us to help you should give us the whole file!

Best Regards,
Jan

Yes - and you have already been told what’s wrong with what you posted!

void Timerhdl1( u8 ID) 
{ 
   adl_atSendResponse(ADL_AT_RSP, "START TIMER Handler"); 
   wip_write( c, Buffer, strlen(Buffer)); 
}

You still haven’t shown the definition of the variable ‘c’ used in this wip_write call! :unamused:

As already pointed out to you, this function will not be using the localc’ defined within evHandler! :unamused: