Troubles with GSM_SetIncomingSMSCallback (cal lback not firing)

Vladislav Stebluk <[email protected]>
Newsgroups gmane.linux.drivers.gammu
Message-ID <[email protected]>

>Четверг, 16 июля 2015, 11:21 +02:00 от Michal Čihař < [email protected] >:
>
>Hello
>
>Dne Thu, 16 Jul 2015 10:14:27 +0300
>Vladislav Stebluk < [email protected] > napsal(a):
>
>> 
>> Hello. I compiled the libgammu using visual studio 2013  and x64 config. When i try to receive sms message using the callback, it never fires for some reason. Can you help me? Here is a bit of my code (i'm using QT):
>
>Did you have any troubles compiling in MSVC? If so, I'd like to
>incorporate needed changes.
> 
>[..]
>>            GSM_SetIncomingSMSCallback(this->gsmStateMachine,&SerialPortWorker::SmsCallback,this);
>>            GSM_SetFastSMSSending(this->gsmStateMachine,TRUE);
>
>You need GSM_SetIncomingSMS(this->gsmStateMachine,TRUE); to enable the
>callback.
>
>-- 
>Michal Čihař | http://cihar.com |  http://blog.cihar.com
I do have GSM_SetIncomingSMS(this->gsmStateMachine,TRUE);  in my code, here im enabling all the callbacks:

          gboolean falg = TRUE;
           this->_error = GSM_SetIncomingUSSD(this->gsmStateMachine,falg);
           this->_error = GSM_SetIncomingCB(this->gsmStateMachine,falg);
           this->_error = GSM_SetIncomingCall(this->gsmStateMachine,falg);
           this->_error = GSM_SetIncomingSMS(this->gsmStateMachine,falg);

           GSM_SetIncomingSMSCallback(this->gsmStateMachine,&SerialPortWorker::SmsCallback,this);
           GSM_SetFastSMSSending(this->gsmStateMachine,TRUE);

It's just not firing. Can this be because of x64 build?

About compiling, i compiled only libgammu i don't really know about the rest. There was a small problem with 'strcasestr'. Library compiled successfully, but when trying to link it with my qt exe, i had link error, about identifier strcasestr not found. I had to remove 'extern' declaratuin in "string.h", and manually add the file "string.c" in libgammu project to get rid of this error.

#ifndef HAVE_STRCASESTR
/**
 * Case insensitive substring location, libc compatibility.
 *
 * \ingroup Unicode
 */
char *strcasestr(const char *s, const char *find);  //here i removed extern, after this added string.c to libgammu.vcproj
#endif

-- 
Vladislav Stebluk

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/

_______________________________________________
Gammu-users mailing list - https://lists.sourceforge.net/lists/listinfo/gammu-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.